Restore thread ids in extension tool call fixtures

This commit is contained in:
won
2026-06-02 12:01:31 -07:00
parent 3a70c828e6
commit 441c015f17
2 changed files with 7 additions and 0 deletions
@@ -1211,6 +1211,7 @@ fn tool_by_name<'a>(
fn tool_call(tool_name: &str, call_id: &str, arguments: serde_json::Value) -> ToolCall {
ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: call_id.to_string(),
tool_name: codex_extension_api::ToolName::plain(tool_name),
+6
View File
@@ -208,6 +208,7 @@ async fn add_ad_hoc_note_tool_creates_note_file() {
let output = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::ADD_AD_HOC_NOTE_TOOL_NAME),
@@ -251,6 +252,7 @@ async fn add_ad_hoc_note_tool_rejects_paths_as_filenames() {
let result = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::ADD_AD_HOC_NOTE_TOOL_NAME),
@@ -295,6 +297,7 @@ async fn read_tool_reads_memory_file() {
let output = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::READ_TOOL_NAME),
@@ -342,6 +345,7 @@ async fn search_tool_accepts_multiple_queries() {
let output = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::SEARCH_TOOL_NAME),
@@ -415,6 +419,7 @@ async fn search_tool_accepts_windowed_all_match_mode() {
let output = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::SEARCH_TOOL_NAME),
@@ -468,6 +473,7 @@ async fn search_tool_rejects_legacy_single_query() {
let result = tool
.handle(ToolCall {
thread_id: "thread-1".to_string(),
turn_id: "turn-1".to_string(),
call_id: "call-1".to_string(),
tool_name: memory_tool_name(crate::SEARCH_TOOL_NAME),