This commit is contained in:
jimmyfraiture
2025-09-07 17:22:08 -07:00
parent e1809a8f13
commit 80eea492ff
6 changed files with 8 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ pub(crate) async fn stream_chat_completions(
ResponseItem::Message { role, .. } => last_emitted_role = Some(role.as_str()),
ResponseItem::FunctionCall { .. }
| ResponseItem::LocalShellCall { .. }
| ResponseItem::IShell { .. } => last_emitted_role = Some("assistant"),
| ResponseItem::UnifiedExec { .. } => last_emitted_role = Some("assistant"),
ResponseItem::FunctionCallOutput { .. } => last_emitted_role = Some("tool"),
ResponseItem::Reasoning { .. } | ResponseItem::Other => {}
ResponseItem::CustomToolCall { .. } => {}
@@ -121,7 +121,7 @@ pub(crate) async fn stream_chat_completions(
match &input[idx + 1] {
ResponseItem::FunctionCall { .. }
| ResponseItem::LocalShellCall { .. }
| ResponseItem::IShell { .. } => {
| ResponseItem::UnifiedExec { .. } => {
reasoning_by_anchor_index
.entry(idx + 1)
.and_modify(|v| v.push_str(&text))
@@ -226,7 +226,7 @@ pub(crate) async fn stream_chat_completions(
}
messages.push(msg);
}
ResponseItem::IShell { .. } => {
ResponseItem::UnifiedExec { .. } => {
// The interactive shell tool is currently exposed only via the
// Responses API. Ignore these items when using Chat
// Completions to maintain feature parity with existing

View File

@@ -1988,7 +1988,7 @@ async fn handle_response_item(
.await,
)
}
ResponseItem::IShell {
ResponseItem::UnifiedExec {
id,
session_id,
arguments,

View File

@@ -71,7 +71,7 @@ fn is_api_message(message: &ResponseItem) -> bool {
| ResponseItem::CustomToolCall { .. }
| ResponseItem::CustomToolCallOutput { .. }
| ResponseItem::LocalShellCall { .. }
| ResponseItem::IShell { .. }
| ResponseItem::UnifiedExec { .. }
| ResponseItem::Reasoning { .. } => true,
ResponseItem::WebSearchCall { .. } | ResponseItem::Other => false,
}

View File

@@ -91,7 +91,7 @@ pub(crate) fn map_response_item_to_event_messages(
ResponseItem::FunctionCall { .. }
| ResponseItem::FunctionCallOutput { .. }
| ResponseItem::LocalShellCall { .. }
| ResponseItem::IShell { .. }
| ResponseItem::UnifiedExec { .. }
| ResponseItem::CustomToolCall { .. }
| ResponseItem::CustomToolCallOutput { .. }
| ResponseItem::Other => Vec::new(),

View File

@@ -7,7 +7,7 @@ pub(crate) fn is_persisted_response_item(item: &ResponseItem) -> bool {
ResponseItem::Message { .. }
| ResponseItem::Reasoning { .. }
| ResponseItem::LocalShellCall { .. }
| ResponseItem::IShell { .. }
| ResponseItem::UnifiedExec { .. }
| ResponseItem::FunctionCall { .. }
| ResponseItem::FunctionCallOutput { .. }
| ResponseItem::CustomToolCall { .. }

View File

@@ -114,7 +114,7 @@ pub enum ResponseItem {
status: Option<String>,
action: WebSearchAction,
},
IShell {
UnifiedExec {
#[serde(skip_serializing)]
id: Option<String>,
/// Identifier for the interactive shell session. When absent, a new