mirror of
https://github.com/openai/codex.git
synced 2026-12-01 15:42:13 +00:00
Expose thread originators through the app-server API (#42458)
## What changed - Add the creation-time `originator` to app-server thread responses and `thread/started` notifications. - Persist originators in thread metadata and preserve the first recorded value across list, read, resume, rollout, and SQLite paths. - Add an `originators` allowlist to `thread/list` for hosted backends. The local app-server accepts omitted or empty values but rejects nonempty filters. ## Testing - Cover originator persistence across server restarts and list, read, and resume requests. - Verify local `thread/list` handling for nonempty, omitted, null, and empty originator filters. - Heap-allocate large TUI dispatcher futures in affected tests to keep them within the Windows test-thread stack. GitOrigin-RevId: 73ad6e61b8fdd2d93a22d1f971723a19ec7be3fc
This commit is contained in:
1 parent
8ff74cc9b1
commit
728cb12fe5
75 files changed
+511
-12
No files matched your search
@@ -1282,6 +1282,7 @@ async fn fill_missing_thread_item_metadata_from_state_db(
|
||||
|
||||
fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadItem) {
|
||||
let ThreadItem {
|
||||
originator,
|
||||
path: _state_path,
|
||||
thread_id: _state_thread_id,
|
||||
first_user_message,
|
||||
@@ -1306,6 +1307,10 @@ fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadIt
|
||||
recency_at,
|
||||
} = state_item;
|
||||
|
||||
if item.originator.is_none() {
|
||||
item.originator = originator;
|
||||
}
|
||||
|
||||
if item.first_user_message.is_none() {
|
||||
item.first_user_message = first_user_message;
|
||||
}
|
||||
@@ -2024,6 +2029,7 @@ fn thread_item_from_state_metadata(
|
||||
parent_thread_id: Option<ThreadId>,
|
||||
) -> ThreadItem {
|
||||
ThreadItem {
|
||||
originator: item.originator,
|
||||
path: item.rollout_path,
|
||||
thread_id: Some(item.id),
|
||||
first_user_message: item.first_user_message,
|
||||
|
||||
Reference in new issue
Block a user