Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions codex-rs/ext/goal/tests/goal_extension_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use codex_extension_api::ToolCallOutcome;
use codex_extension_api::ToolCallSource;
use codex_extension_api::ToolExecutor;
use codex_extension_api::ToolFinishInput;
use codex_extension_api::ToolName;
use codex_extension_api::ToolPayload;
use codex_extension_api::TurnStartInput;
use codex_extension_api::TurnStopInput;
Expand All @@ -27,6 +26,7 @@ use codex_protocol::protocol::SessionSource;
use codex_protocol::protocol::ThreadGoalStatus;
use codex_protocol::protocol::TokenUsage;
use codex_protocol::protocol::TokenUsageInfo;
use codex_protocol::protocol::TruncationPolicy;
use pretty_assertions::assert_eq;
use serde_json::json;
use tempfile::TempDir;
Expand All @@ -39,17 +39,14 @@ async fn installed_goal_tools_create_goal_and_fill_empty_preview() -> anyhow::Re
let tools = installed_tools(runtime.clone(), thread_id).await;

let create_tool = tool_by_name(&tools, "create_goal");
let invocation = ToolCall {
call_id: "call-create-goal".to_string(),
tool_name: ToolName::plain("create_goal"),
payload: ToolPayload::Function {
arguments: json!({
"objective": "ship goal extension backend",
"token_budget": 123,
})
.to_string(),
},
};
let invocation = tool_call(
"create_goal",
"call-create-goal",
json!({
"objective": "ship goal extension backend",
"token_budget": 123,
}),
);
let output = create_tool.handle(invocation.clone()).await?;
let result = output.code_mode_result(&invocation.payload);
assert_eq!(
Expand Down Expand Up @@ -534,8 +531,10 @@ fn tool_by_name<'a>(

fn tool_call(tool_name: &str, call_id: &str, arguments: serde_json::Value) -> ToolCall {
ToolCall {
turn_id: "turn-1".to_string(),
call_id: call_id.to_string(),
tool_name: codex_extension_api::ToolName::plain(tool_name),
truncation_policy: TruncationPolicy::Bytes(1024),
payload: ToolPayload::Function {
arguments: arguments.to_string(),
},
Expand Down
1 change: 0 additions & 1 deletion codex-rs/tui/src/chatwidget/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ impl ChatWidget {
| ServerNotification::AccountRateLimitsUpdated(_)
| ServerNotification::ThreadStarted(_)
| ServerNotification::ThreadStatusChanged(_)
| ServerNotification::ThreadSettingsUpdated(_)
| ServerNotification::ThreadArchived(_)
| ServerNotification::ThreadUnarchived(_)
| ServerNotification::RawResponseItemCompleted(_)
Expand Down
Loading