diff --git a/test/harness/replayingCapiProxy.test.ts b/test/harness/replayingCapiProxy.test.ts index 245b035c5c..b75a3f1b60 100644 --- a/test/harness/replayingCapiProxy.test.ts +++ b/test/harness/replayingCapiProxy.test.ts @@ -546,6 +546,107 @@ Always include PINEAPPLE_COCONUT_42. expect(toolMessage?.content).toBe("Tool 'report_intent' does not exist."); }); + test("strips view line-number prefixes from view tool results", async () => { + const requestBody = JSON.stringify({ + messages: [ + { role: "user", content: "Read the file" }, + { + role: "assistant", + tool_calls: [ + { + id: "tc1", + type: "function", + function: { + name: "view", + arguments: '{"path":"lines.txt","view_range":[2,4]}', + }, + }, + { + id: "tc2", + type: "function", + function: { name: "sql", arguments: '{"query":"SELECT 1"}' }, + }, + { + id: "tc3", + type: "function", + function: { name: "view", arguments: '{"path":"crlf.txt"}' }, + }, + ], + }, + { + role: "tool", + tool_call_id: "tc1", + content: "2. line2\n3. line3\n4. line4", + }, + { + role: "tool", + tool_call_id: "tc2", + content: "1. INSERT\n2. INSERT", + }, + { + role: "tool", + tool_call_id: "tc3", + content: "1. first\r\n2. second", + }, + ], + }); + const responseBody = JSON.stringify({ + choices: [{ message: { role: "assistant", content: "Done" } }], + }); + + const outputPath = await createProxy([ + { url: "/chat/completions", requestBody, responseBody }, + ]); + + const result = await readYamlOutput(outputPath); + const toolMessages = result.conversations[0].messages.filter( + (m) => m.role === "tool", + ); + expect(toolMessages.map((message) => message.content)).toEqual([ + "line2\nline3\nline4", + // Only `view` results carried line-number prefixes, so other tools that + // legitimately return numbered lines must be left alone. + "1. INSERT\n2. INSERT", + "first\r\nsecond", + ]); + }); + + test("stops stripping view line numbers at the first non-consecutive line", async () => { + const requestBody = JSON.stringify({ + messages: [ + { role: "user", content: "Read the file" }, + { + role: "assistant", + tool_calls: [ + { + id: "tc1", + type: "function", + function: { name: "view", arguments: '{"path":"steps.md"}' }, + }, + ], + }, + { + role: "tool", + tool_call_id: "tc1", + content: "1. first step\n1. second step", + }, + ], + }); + const responseBody = JSON.stringify({ + choices: [{ message: { role: "assistant", content: "Done" } }], + }); + + const outputPath = await createProxy([ + { url: "/chat/completions", requestBody, responseBody }, + ]); + + const result = await readYamlOutput(outputPath); + const toolMessage = result.conversations[0].messages.find( + (m) => m.role === "tool", + ); + expect(toolMessage?.content).toBe("first step\n1. second step"); + }); + test("normalizes interrupted tool execution results", async () => { const requestBody = JSON.stringify({ messages: [ @@ -1151,6 +1252,94 @@ Always include PINEAPPLE_COCONUT_42. } }); + test("matches view results recorded before line numbers were removed", async () => { + const cachePath = path.join(tempDir, "cache.yaml"); + // Snapshots now store the raw file content that current runtimes send. + const cacheContent = yaml.stringify({ + models: ["test-model"], + conversations: [ + { + messages: [ + { role: "system", content: "${system}" }, + { role: "user", content: "Read the file" }, + { + role: "assistant", + tool_calls: [ + { + id: "toolcall_0", + type: "function", + function: { + name: "view", + arguments: '{"path":"greeting.txt"}', + }, + }, + ], + }, + { + role: "tool", + tool_call_id: "toolcall_0", + content: "Hello\nWorld", + }, + { role: "assistant", content: "Done" }, + ], + }, + ], + } satisfies NormalizedData); + await writeFile(cachePath, cacheContent); + + const proxy = new ReplayingCapiProxy( + "http://localhost:9999", + cachePath, + workDir, + ); + const proxyUrl = await proxy.start(); + + try { + for (const viewResult of [ + // Older runtimes prefixed each line with its line number. + "1. Hello\n2. World", + // Current runtimes return the raw content. + "Hello\nWorld", + ]) { + const response = await makeRequest(proxyUrl, "/chat/completions", { + body: { + model: "test-model", + messages: [ + { role: "system", content: "System prompt" }, + { role: "user", content: "Read the file" }, + { + role: "assistant", + tool_calls: [ + { + id: "runtime-call-id", + type: "function", + function: { + name: "view", + arguments: '{"path":"greeting.txt"}', + }, + }, + ], + }, + { + role: "tool", + tool_call_id: "runtime-call-id", + content: viewResult, + }, + ], + }, + }); + + expect(response.status).toBe(200); + expect( + (JSON.parse(response.body) as ChatCompletion).choices[0].message + .content, + ).toBe("Done"); + } + } finally { + await proxy.stop(); + } + }); + test("expands workdir placeholder in cached response", async () => { const cachePath = path.join(tempDir, "cache.yaml"); const cacheContent = yaml.stringify({ diff --git a/test/harness/replayingCapiProxy.ts b/test/harness/replayingCapiProxy.ts index f30a9fbd77..eeaf5c6bc0 100644 --- a/test/harness/replayingCapiProxy.ts +++ b/test/harness/replayingCapiProxy.ts @@ -132,6 +132,7 @@ export class ReplayingCapiProxy extends CapturingHttpProxy { { toolName: "*", normalizer: normalizeAvailableToolNames }, { toolName: "*", normalizer: normalizeBackgroundAgentStartMessage }, { toolName: "read_agent", normalizer: normalizeReadAgentResult }, + { toolName: "view", normalizer: normalizeViewLineNumbers }, ]; /** @@ -1554,6 +1555,36 @@ function normalizeAvailableToolNames(result: string): string { ); } +// The runtime used to prefix every line of `view` output with `N. ` (the line +// number). copilot-agent-runtime#13802 shipped the winning experiment branch and +// made raw file content the unconditional behavior, so captures recorded against +// older runtimes carry the prefixes while current runtimes do not. Strip a leading +// run of consecutively numbered lines so both forms replay against the same +// snapshot. Trailing content such as the truncation notice is left untouched +// because it was never numbered. +function normalizeViewLineNumbers(result: string): string { + const lines = result.split("\n"); + let expected: number | undefined; + let index = 0; + for (; index < lines.length; index++) { + // Lines of a CRLF file keep their carriage return after splitting on "\n". + const carriageReturn = lines[index].endsWith("\r"); + const line = carriageReturn ? lines[index].slice(0, -1) : lines[index]; + const match = /^(\d+)\.(?: (.*))?$/.exec(line); + if (!match) break; + const lineNumber = Number(match[1]); + if (expected === undefined) { + if (lineNumber < 1) break; + } else if (lineNumber !== expected) { + break; + } + expected = lineNumber + 1; + lines[index] = `${match[2] ?? ""}${carriageReturn ? "\r" : ""}`; + } + + return index === 0 ? result : lines.join("\n").trimEnd(); +} + function normalizeInterruptedToolResult(result: string): string { return result.replace( /^(?:Failed to execute `[^`]+` tool(?: with arguments: [\s\S]*?)? due to error: (?:Error: )?Session aborted|)$/, diff --git a/test/snapshots/builtin_tools/should_create_a_new_file.yaml b/test/snapshots/builtin_tools/should_create_a_new_file.yaml index bf9288cf01..8afe8b38b6 100644 --- a/test/snapshots/builtin_tools/should_create_a_new_file.yaml +++ b/test/snapshots/builtin_tools/should_create_a_new_file.yaml @@ -54,6 +54,6 @@ conversations: arguments: '{"path":"${workdir}/new_file.txt"}' - role: tool tool_call_id: toolcall_2 - content: 1. Created by test + content: Created by test - role: assistant content: ✓ Done! Created `new_file.txt` with content "Created by test" and confirmed the content matches. diff --git a/test/snapshots/builtin_tools/should_edit_a_file_successfully.yaml b/test/snapshots/builtin_tools/should_edit_a_file_successfully.yaml index 0f21418628..3f4e986906 100644 --- a/test/snapshots/builtin_tools/should_edit_a_file_successfully.yaml +++ b/test/snapshots/builtin_tools/should_edit_a_file_successfully.yaml @@ -57,9 +57,8 @@ conversations: - role: tool tool_call_id: toolcall_2 content: |- - 1. Hi Universe - 2. Goodbye World - 3. + Hi Universe + Goodbye World - role: assistant content: |- Done! The file now contains: diff --git a/test/snapshots/builtin_tools/should_read_file_with_line_range.yaml b/test/snapshots/builtin_tools/should_read_file_with_line_range.yaml index cd17d86708..601ae0f04c 100644 --- a/test/snapshots/builtin_tools/should_read_file_with_line_range.yaml +++ b/test/snapshots/builtin_tools/should_read_file_with_line_range.yaml @@ -45,9 +45,9 @@ conversations: - role: tool tool_call_id: toolcall_1 content: |- - 2. line2 - 3. line3 - 4. line4 + line2 + line3 + line4 - role: assistant content: |- Lines 2 through 4 of 'lines.txt' contain: diff --git a/test/snapshots/client_options/should_use_client_cwd_for_default_workingdirectory.yaml b/test/snapshots/client_options/should_use_client_cwd_for_default_workingdirectory.yaml index 6d9167e94a..469d091288 100644 --- a/test/snapshots/client_options/should_use_client_cwd_for_default_workingdirectory.yaml +++ b/test/snapshots/client_options/should_use_client_cwd_for_default_workingdirectory.yaml @@ -25,6 +25,6 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. I am in the client cwd + content: I am in the client cwd - role: assistant content: 'The file `marker.txt` says: "I am in the client cwd"' diff --git a/test/snapshots/event_fidelity/should_emit_events_in_correct_order_for_tool_using_conversation.yaml b/test/snapshots/event_fidelity/should_emit_events_in_correct_order_for_tool_using_conversation.yaml index 8ce730f0fb..c8f272e6b9 100644 --- a/test/snapshots/event_fidelity/should_emit_events_in_correct_order_for_tool_using_conversation.yaml +++ b/test/snapshots/event_fidelity/should_emit_events_in_correct_order_for_tool_using_conversation.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Hello World + content: Hello World - role: assistant content: |- The file 'hello.txt' contains: diff --git a/test/snapshots/event_fidelity/should_emit_tool_execution_events_with_correct_fields.yaml b/test/snapshots/event_fidelity/should_emit_tool_execution_events_with_correct_fields.yaml index a6583a15ec..46fd7715ab 100644 --- a/test/snapshots/event_fidelity/should_emit_tool_execution_events_with_correct_fields.yaml +++ b/test/snapshots/event_fidelity/should_emit_tool_execution_events_with_correct_fields.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. test data + content: test data - role: assistant content: |- The file `data.txt` contains: diff --git a/test/snapshots/event_fidelity/should_preserve_message_order_in_getmessages_after_tool_use.yaml b/test/snapshots/event_fidelity/should_preserve_message_order_in_getmessages_after_tool_use.yaml index 2799cdec61..1797cc16b1 100644 --- a/test/snapshots/event_fidelity/should_preserve_message_order_in_getmessages_after_tool_use.yaml +++ b/test/snapshots/event_fidelity/should_preserve_message_order_in_getmessages_after_tool_use.yaml @@ -15,6 +15,6 @@ conversations: arguments: '{"path":"order.txt"}' - role: tool tool_call_id: toolcall_0 - content: 1. ORDER_CONTENT_42 + content: ORDER_CONTENT_42 - role: assistant content: The number in 'order.txt' is **42**. diff --git a/test/snapshots/hooks/invoke_both_hooks_for_single_tool_call.yaml b/test/snapshots/hooks/invoke_both_hooks_for_single_tool_call.yaml index 6a51857ab0..9ed9431545 100644 --- a/test/snapshots/hooks/invoke_both_hooks_for_single_tool_call.yaml +++ b/test/snapshots/hooks/invoke_both_hooks_for_single_tool_call.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Testing both hooks! + content: Testing both hooks! - role: assistant content: |- The file **both.txt** contains: diff --git a/test/snapshots/hooks/invoke_post_tool_use_hook_after_model_runs_a_tool.yaml b/test/snapshots/hooks/invoke_post_tool_use_hook_after_model_runs_a_tool.yaml index 18b324f098..2a5f1ae446 100644 --- a/test/snapshots/hooks/invoke_post_tool_use_hook_after_model_runs_a_tool.yaml +++ b/test/snapshots/hooks/invoke_post_tool_use_hook_after_model_runs_a_tool.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. World from the test! + content: World from the test! - role: assistant content: |- The file `world.txt` contains: diff --git a/test/snapshots/hooks/invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml b/test/snapshots/hooks/invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml index 1ce0fe67a0..f695c60f3d 100644 --- a/test/snapshots/hooks/invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml +++ b/test/snapshots/hooks/invoke_pre_tool_use_hook_when_model_runs_a_tool.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Hello from the test! + content: Hello from the test! - role: assistant content: |- The file **hello.txt** contains: diff --git a/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml b/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml index 6a51857ab0..9ed9431545 100644 --- a/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml +++ b/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_a_single_tool_call.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Testing both hooks! + content: Testing both hooks! - role: assistant content: |- The file **both.txt** contains: diff --git a/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml b/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml index 6a51857ab0..9ed9431545 100644 --- a/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml +++ b/test/snapshots/hooks/should_invoke_both_pretooluse_and_posttooluse_hooks_for_single_tool_call.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Testing both hooks! + content: Testing both hooks! - role: assistant content: |- The file **both.txt** contains: diff --git a/test/snapshots/hooks/should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml b/test/snapshots/hooks/should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml index 18b324f098..2a5f1ae446 100644 --- a/test/snapshots/hooks/should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml +++ b/test/snapshots/hooks/should_invoke_posttooluse_hook_after_model_runs_a_tool.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. World from the test! + content: World from the test! - role: assistant content: |- The file `world.txt` contains: diff --git a/test/snapshots/hooks/should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml b/test/snapshots/hooks/should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml index 1ce0fe67a0..f695c60f3d 100644 --- a/test/snapshots/hooks/should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml +++ b/test/snapshots/hooks/should_invoke_pretooluse_hook_when_model_runs_a_tool.yaml @@ -44,7 +44,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Hello from the test! + content: Hello from the test! - role: assistant content: |- The file **hello.txt** contains: diff --git a/test/snapshots/multi_turn/should_handle_file_creation_then_reading_across_turns.yaml b/test/snapshots/multi_turn/should_handle_file_creation_then_reading_across_turns.yaml index 0d79c3e1ab..170a223ac6 100644 --- a/test/snapshots/multi_turn/should_handle_file_creation_then_reading_across_turns.yaml +++ b/test/snapshots/multi_turn/should_handle_file_creation_then_reading_across_turns.yaml @@ -20,33 +20,6 @@ conversations: function: name: create arguments: '{"path":"${workdir}/greeting.txt","file_text":"Hello from multi-turn test"}' - - messages: - - role: system - content: ${system} - - role: user - content: Create a file called 'greeting.txt' with the content 'Hello from multi-turn test'. - - role: assistant - tool_calls: - - id: toolcall_0 - type: function - function: - name: report_intent - arguments: '{"intent":"Creating greeting file"}' - - id: toolcall_1 - type: function - function: - name: create - arguments: '{"path":"${workdir}/greeting.txt","file_text":"Hello from multi-turn test"}' - - role: tool - tool_call_id: toolcall_0 - content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell}, - ${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob, - task. - - role: tool - tool_call_id: toolcall_1 - content: Created file ${workdir}/greeting.txt with 26 characters - - role: assistant - content: Created `greeting.txt` with the content "Hello from multi-turn test". - messages: - role: system content: ${system} @@ -83,7 +56,7 @@ conversations: arguments: '{"path":"${workdir}/greeting.txt"}' - role: tool tool_call_id: toolcall_2 - content: 1. Hello from multi-turn test + content: Hello from multi-turn test - role: assistant content: |- The exact contents of `greeting.txt` are: diff --git a/test/snapshots/multi_turn/should_use_tool_results_from_previous_turns.yaml b/test/snapshots/multi_turn/should_use_tool_results_from_previous_turns.yaml index b930bb46ac..f9da9c0163 100644 --- a/test/snapshots/multi_turn/should_use_tool_results_from_previous_turns.yaml +++ b/test/snapshots/multi_turn/should_use_tool_results_from_previous_turns.yaml @@ -20,33 +20,6 @@ conversations: function: name: view arguments: '{"path":"${workdir}/secret.txt"}' - - messages: - - role: system - content: ${system} - - role: user - content: Read the file 'secret.txt' and tell me what the magic number is. - - role: assistant - tool_calls: - - id: toolcall_0 - type: function - function: - name: report_intent - arguments: '{"intent":"Reading secret file"}' - - id: toolcall_1 - type: function - function: - name: view - arguments: '{"path":"${workdir}/secret.txt"}' - - role: tool - tool_call_id: toolcall_0 - content: Tool 'report_intent' does not exist. Available tools that can be called are ${shell}, ${read_shell}, - ${stop_shell}, ${list_shell}, view, create, edit, web_fetch, skill, sql, read_agent, list_agents, grep, glob, - task. - - role: tool - tool_call_id: toolcall_1 - content: 1. The magic number is 42. - - role: assistant - content: The magic number is **42**. - messages: - role: system content: ${system} @@ -69,7 +42,7 @@ conversations: content: Tool 'report_intent' does not exist. - role: tool tool_call_id: toolcall_1 - content: 1. The magic number is 42. + content: The magic number is 42. - role: assistant content: The magic number is **42**. - role: user diff --git a/test/snapshots/permissions/permission_handler_for_write_operations.yaml b/test/snapshots/permissions/permission_handler_for_write_operations.yaml index a4ede6fcb1..3f05a8c6de 100644 --- a/test/snapshots/permissions/permission_handler_for_write_operations.yaml +++ b/test/snapshots/permissions/permission_handler_for_write_operations.yaml @@ -47,7 +47,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. original content + content: original content - role: assistant content: "Now I'll replace 'original' with 'modified':" - role: assistant @@ -82,7 +82,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. original content + content: original content - role: assistant content: "Now I'll replace 'original' with 'modified':" tool_calls: diff --git a/test/snapshots/permissions/should_invoke_permission_handler_for_write_operations.yaml b/test/snapshots/permissions/should_invoke_permission_handler_for_write_operations.yaml index a4ede6fcb1..3f05a8c6de 100644 --- a/test/snapshots/permissions/should_invoke_permission_handler_for_write_operations.yaml +++ b/test/snapshots/permissions/should_invoke_permission_handler_for_write_operations.yaml @@ -47,7 +47,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. original content + content: original content - role: assistant content: "Now I'll replace 'original' with 'modified':" - role: assistant @@ -82,7 +82,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. original content + content: original content - role: assistant content: "Now I'll replace 'original' with 'modified':" tool_calls: diff --git a/test/snapshots/session/should_send_with_file_attachment.yaml b/test/snapshots/session/should_send_with_file_attachment.yaml index 23e05d946b..2e8e4d1d2d 100644 --- a/test/snapshots/session/should_send_with_file_attachment.yaml +++ b/test/snapshots/session/should_send_with_file_attachment.yaml @@ -58,7 +58,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. FILE_ATTACHMENT_SENTINEL + content: FILE_ATTACHMENT_SENTINEL - role: assistant content: |- The file contains: diff --git a/test/snapshots/session_config/should_accept_message_attachments.yaml b/test/snapshots/session_config/should_accept_message_attachments.yaml index e9fbabb05e..5525d1fb04 100644 --- a/test/snapshots/session_config/should_accept_message_attachments.yaml +++ b/test/snapshots/session_config/should_accept_message_attachments.yaml @@ -61,7 +61,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. This file is attached + content: This file is attached - role: assistant content: |- The attached file contains a single line of text that says: "This file is attached" diff --git a/test/snapshots/session_config/should_apply_workingdirectory_on_session_resume.yaml b/test/snapshots/session_config/should_apply_workingdirectory_on_session_resume.yaml index 52cc114f94..9d3dd78ff1 100644 --- a/test/snapshots/session_config/should_apply_workingdirectory_on_session_resume.yaml +++ b/test/snapshots/session_config/should_apply_workingdirectory_on_session_resume.yaml @@ -25,7 +25,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. I am in the resume working directory + content: I am in the resume working directory - role: assistant content: |- The file `resume-marker.txt` says: diff --git a/test/snapshots/session_config/should_use_workingdirectory_for_tool_execution.yaml b/test/snapshots/session_config/should_use_workingdirectory_for_tool_execution.yaml index 18dfab04e6..40000d491b 100644 --- a/test/snapshots/session_config/should_use_workingdirectory_for_tool_execution.yaml +++ b/test/snapshots/session_config/should_use_workingdirectory_for_tool_execution.yaml @@ -44,6 +44,6 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. I am in the subdirectory + content: I am in the subdirectory - role: assistant content: 'The file marker.txt says: "I am in the subdirectory"' diff --git a/test/snapshots/subagent_hooks/should_invoke_pretooluse_and_posttooluse_hooks_for_sub_agent_tool_calls.yaml b/test/snapshots/subagent_hooks/should_invoke_pretooluse_and_posttooluse_hooks_for_sub_agent_tool_calls.yaml index c905726ee3..f920f8705b 100644 --- a/test/snapshots/subagent_hooks/should_invoke_pretooluse_and_posttooluse_hooks_for_sub_agent_tool_calls.yaml +++ b/test/snapshots/subagent_hooks/should_invoke_pretooluse_and_posttooluse_hooks_for_sub_agent_tool_calls.yaml @@ -56,7 +56,7 @@ conversations: arguments: '{"path":"${workdir}/subagent-test.txt"}' - role: tool tool_call_id: toolcall_0 - content: 1. Hello from subagent test! + content: Hello from subagent test! - role: assistant content: |- The complete contents of the file "subagent-test.txt" are: diff --git a/test/snapshots/system_message_transform/should_apply_transform_modifications_to_section_content.yaml b/test/snapshots/system_message_transform/should_apply_transform_modifications_to_section_content.yaml index 4b7c058b27..98e57919c6 100644 --- a/test/snapshots/system_message_transform/should_apply_transform_modifications_to_section_content.yaml +++ b/test/snapshots/system_message_transform/should_apply_transform_modifications_to_section_content.yaml @@ -26,7 +26,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Hello! + content: Hello! - role: assistant content: |- The file **hello.txt** contains: diff --git a/test/snapshots/system_message_transform/should_invoke_transform_callbacks_with_section_content.yaml b/test/snapshots/system_message_transform/should_invoke_transform_callbacks_with_section_content.yaml index 0b1d9755f0..c54f25e2aa 100644 --- a/test/snapshots/system_message_transform/should_invoke_transform_callbacks_with_section_content.yaml +++ b/test/snapshots/system_message_transform/should_invoke_transform_callbacks_with_section_content.yaml @@ -47,6 +47,6 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Hello transform! + content: Hello transform! - role: assistant content: 'The file `test.txt` contains: **"Hello transform!"**' diff --git a/test/snapshots/system_message_transform/should_work_with_static_overrides_and_transforms_together.yaml b/test/snapshots/system_message_transform/should_work_with_static_overrides_and_transforms_together.yaml index 0681b569dd..32d6367390 100644 --- a/test/snapshots/system_message_transform/should_work_with_static_overrides_and_transforms_together.yaml +++ b/test/snapshots/system_message_transform/should_work_with_static_overrides_and_transforms_together.yaml @@ -47,7 +47,7 @@ conversations: task. - role: tool tool_call_id: toolcall_1 - content: 1. Combo test! + content: Combo test! - role: assistant content: |- The file `combo.txt` contains: diff --git a/test/snapshots/tools/invokes_built_in_tools.yaml b/test/snapshots/tools/invokes_built_in_tools.yaml index 068cc4accf..0fba134424 100644 --- a/test/snapshots/tools/invokes_built_in_tools.yaml +++ b/test/snapshots/tools/invokes_built_in_tools.yaml @@ -15,6 +15,6 @@ conversations: arguments: '{"path":"${workdir}/README.md"}' - role: tool tool_call_id: toolcall_0 - content: "1. # ELIZA, the only chatbot you'll ever need" + content: "# ELIZA, the only chatbot you'll ever need" - role: assistant content: "The first line of README.md is: `# ELIZA, the only chatbot you'll ever need`"