mirror of
https://github.com/openai/codex.git
synced 2026-04-30 19:32:04 +03:00
[app-server] add new RawResponseItem v2 event (#8152)
``codex/event/raw_response_item` (v1) -> `rawResponseItem/completed`
(v1).
test client log:
````
< {
< "method": "codex/event/raw_response_item",
< "params": {
< "conversationId": "019b29f7-b089-7140-a535-3fe681562c15",
< "id": "0",
< "msg": {
< "item": {
< "arguments": "{\"command\":\"sed -n '1,160p' Cargo.toml\",\"workdir\":\"/Users/celia/code/codex/codex-rs\"}",
< "call_id": "call_DrqbdB2jPxezPWc19YVEEt3h",
< "name": "shell_command",
< "type": "function_call"
< },
< "type": "raw_response_item"
< }
< }
< }
< {
< "method": "rawResponseItem/completed",
< "params": {
< "item": {
< "arguments": "{\"command\":\"sed -n '1,160p' Cargo.toml\",\"workdir\":\"/Users/celia/code/codex/codex-rs\"}",
< "call_id": "call_DrqbdB2jPxezPWc19YVEEt3h",
< "name": "shell_command",
< "type": "function_call"
< },
< "threadId": "019b29f7-b089-7140-a535-3fe681562c15",
< "turnId": "0"
< }
< }
```
This commit is contained in:
@@ -1373,9 +1373,13 @@ impl CodexMessageProcessor {
|
||||
};
|
||||
|
||||
// Auto-attach a conversation listener when starting a thread.
|
||||
// Use the same behavior as the v1 API with experimental_raw_events=false.
|
||||
// Use the same behavior as the v1 API, with opt-in support for raw item events.
|
||||
if let Err(err) = self
|
||||
.attach_conversation_listener(conversation_id, false, ApiVersion::V2)
|
||||
.attach_conversation_listener(
|
||||
conversation_id,
|
||||
params.experimental_raw_events,
|
||||
ApiVersion::V2,
|
||||
)
|
||||
.await
|
||||
{
|
||||
tracing::warn!(
|
||||
|
||||
Reference in New Issue
Block a user