mirror of
https://github.com/openai/codex.git
synced 2026-11-05 16:29:31 +00:00
[codex] Add user input client ids (#24653)
## Summary Adds an optional `clientId` field to app-server v2 `UserInput` and carries it through the core `UserInput` model so clients can correlate echoed user input items without relying on payload equality. ## Details - Adds `client_id: Option<String>` to core `UserInput` variants. - Exposes the v2 app-server field as `clientId` on the wire and in generated TypeScript. - Preserves the id when converting between app-server v2 and core protocol types. - Regenerates app-server schema fixtures. ## Validation - `just fmt` - `just write-app-server-schema` - `cargo test -p codex-app-server-protocol` - `cargo test -p codex-protocol` - `just fix -p codex-app-server-protocol` - `just fix -p codex-protocol` - `git diff --check`
This commit is contained in:
1 parent
a027135bc6
commit
e92c952b2e
113 files changed
+793
-97
No files matched your search
@@ -283,6 +283,7 @@ async fn live_app_server_user_message_item_completed_does_not_duplicate_rendered
|
||||
completed_at_ms: 0,
|
||||
item: AppServerThreadItem::UserMessage {
|
||||
id: "user-1".to_string(),
|
||||
client_id: None,
|
||||
content: vec![AppServerUserInput::Text {
|
||||
text: "Hi, are you there?".to_string(),
|
||||
text_elements: Vec::new(),
|
||||
|
||||
@@ -722,6 +722,7 @@ pub(super) fn replay_user_message_inputs(
|
||||
chat.replay_thread_item(
|
||||
AppServerThreadItem::UserMessage {
|
||||
id: item_id.to_string(),
|
||||
client_id: None,
|
||||
content,
|
||||
},
|
||||
"turn-1".to_string(),
|
||||
@@ -946,6 +947,7 @@ pub(super) fn complete_user_message_for_inputs(
|
||||
completed_at_ms: 0,
|
||||
item: AppServerThreadItem::UserMessage {
|
||||
id: item_id.to_string(),
|
||||
client_id: None,
|
||||
content,
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -182,6 +182,7 @@ async fn live_app_server_review_prompt_item_is_not_rendered() {
|
||||
completed_at_ms: 0,
|
||||
item: AppServerThreadItem::UserMessage {
|
||||
id: "review-prompt".to_string(),
|
||||
client_id: None,
|
||||
content: vec![AppServerUserInput::Text {
|
||||
text: "Review the code changes against the base branch 'main'.".to_string(),
|
||||
text_elements: Vec::new(),
|
||||
|
||||
@@ -578,6 +578,7 @@ impl ChatWidget {
|
||||
UserInput::Text {
|
||||
text,
|
||||
text_elements: current_text_elements,
|
||||
..
|
||||
} => append_text_with_rebased_elements(
|
||||
&mut message,
|
||||
&mut text_elements,
|
||||
|
||||
Reference in new issue
Block a user