diff --git a/dashboard/src/relay.rs b/dashboard/src/relay.rs index e7e7af00789b6b65bb151dfa11ea84bae0b896d7..1f5572bdbcef7ab2ac44efa4587353c045306736 100644 --- a/dashboard/src/relay.rs +++ b/dashboard/src/relay.rs @@ -359,7 +359,7 @@ fn schema(method: &str) -> Option { json!([]), ), "read_thread" => ( - json!({"provider":provider,"thread_id":id,"limit":{"type":"integer","minimum":1,"maximum":100,"default":20}}), + json!({"provider":provider,"thread_id":id,"cursor":{"type":"string","minLength":1,"maxLength":512},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20}}), json!(["provider", "thread_id"]), ), "send_message" => ( @@ -914,7 +914,10 @@ mod tests { command("read_thread", json!({"provider":"claude","thread_id":id})).unwrap()["limit"], 20 ); + assert_eq!(command("read_thread", json!({"provider":"codex","thread_id":id,"cursor":"page"})).unwrap()["cursor"], "page"); for (method, params) in [ + ("read_thread", json!({"provider":"codex","thread_id":id,"cursor":""})), + ("read_thread", json!({"provider":"codex","thread_id":id,"cursor":"x".repeat(513)})), ( "read_thread", json!({"provider":"codex","thread_id":"not-a-uuid"}),