Skip to content

Commit 701eed7

Browse files
committed
changes
1 parent fab069f commit 701eed7

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

codex-rs/app-server-protocol/src/protocol/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ server_notification_definitions! {
508508
McpToolCallProgress => "item/mcpToolCall/progress" (v2::McpToolCallProgressNotification),
509509
AccountUpdated => "account/updated" (v2::AccountUpdatedNotification),
510510
AccountRateLimitsUpdated => "account/rateLimits/updated" (v2::AccountRateLimitsUpdatedNotification),
511+
ReasoningDelta => "item/reasoning/delta" (v2::ReasoningDeltaNotification),
511512

512513
#[serde(rename = "account/login/completed")]
513514
#[ts(rename = "account/login/completed")]

codex-rs/app-server-protocol/src/protocol/v2.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,14 @@ pub struct AgentMessageDeltaNotification {
688688
pub delta: String,
689689
}
690690

691+
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
692+
#[serde(rename_all = "camelCase")]
693+
#[ts(export_to = "v2/")]
694+
pub struct ReasoningDeltaNotification {
695+
pub item_id: String,
696+
pub delta: String,
697+
}
698+
691699
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
692700
#[serde(rename_all = "camelCase")]
693701
#[ts(export_to = "v2/")]

codex-rs/app-server/src/codex_message_processor.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ use codex_app_server_protocol::ModelListParams;
6363
use codex_app_server_protocol::ModelListResponse;
6464
use codex_app_server_protocol::NewConversationParams;
6565
use codex_app_server_protocol::NewConversationResponse;
66+
use codex_app_server_protocol::ReasoningDeltaNotification;
6667
use codex_app_server_protocol::RemoveConversationListenerParams;
6768
use codex_app_server_protocol::RemoveConversationSubscriptionResponse;
6869
use codex_app_server_protocol::RequestId;
@@ -2584,6 +2585,15 @@ async fn apply_bespoke_event_handling(
25842585
.send_server_notification(ServerNotification::AgentMessageDelta(notification))
25852586
.await;
25862587
}
2588+
EventMsg::ReasoningContentDelta(event) => {
2589+
let notification = ReasoningDeltaNotification {
2590+
item_id: event.item_id,
2591+
delta: event.delta,
2592+
};
2593+
outgoing
2594+
.send_server_notification(ServerNotification::ReasoningDelta(notification))
2595+
.await;
2596+
}
25872597
EventMsg::ExecApprovalRequest(ExecApprovalRequestEvent {
25882598
call_id,
25892599
command,

0 commit comments

Comments
 (0)