mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Support paginated thread history in app-server list APIs (#33152)
## Why Clients could discover threads with paginated history, but could not page their turns through `thread/turns/list`. ## What changed - Route `thread/turns/list` for paginated threads through the thread store, preserving cursors, sort direction, turn status, timing, errors, and the requested `summary` or `notLoaded` item view. - Reject the `full` turn item view for paginated threads and direct clients to `thread/items/list` for complete item pagination. - Return each item page entry with both its containing `turnId` and `item`, so clients can regroup thread-wide pages into turns. - Expose local thread-store turn and item pagination through the `ThreadStore` implementation. ## Testing Added app-server coverage for paging projected turns and items, item views, cursors, turn metadata, and rejection of the unsupported `full` view. GitOrigin-RevId: 9c4a127a9b4fa91313f0e87494c62fe2e3a06f19
This commit is contained in:
1 parent
4da39dbea7
commit
e0a3641e6c
11 files changed
+532
-19
No files matched your search
@@ -344,6 +344,14 @@ impl ThreadStore for LocalThreadStore {
|
||||
Box::pin(async move { list_threads::list_threads(self, params).await })
|
||||
}
|
||||
|
||||
fn list_turns(&self, params: ListTurnsParams) -> ThreadStoreFuture<'_, TurnPage> {
|
||||
Box::pin(LocalThreadStore::list_turns(self, params))
|
||||
}
|
||||
|
||||
fn list_items(&self, params: ListItemsParams) -> ThreadStoreFuture<'_, ItemPage> {
|
||||
Box::pin(LocalThreadStore::list_items(self, params))
|
||||
}
|
||||
|
||||
fn search_threads(
|
||||
&self,
|
||||
params: SearchThreadsParams,
|
||||
|
||||
Reference in new issue
Block a user