Skip to content

Commit 7de72a6

Browse files
stephentoubCopilot
andauthored
Update grep replay snapshot for absolute paths (#1598)
Allow the builtin tools replay snapshot to match grep results that include the normalized workdir path, preserving the existing relative-path variant for older runtime output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f54e3ac commit 7de72a6

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

test/snapshots/builtin_tools/should_search_for_patterns_in_files.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,33 @@ conversations:
5050
The search found **2 lines** starting with 'ap':
5151
- Line 1: `apple`
5252
- Line 3: `apricot`
53+
- messages:
54+
- role: system
55+
content: ${system}
56+
- role: user
57+
content: Search for lines starting with 'ap' in the file 'data.txt'. Tell me which lines matched.
58+
- role: assistant
59+
tool_calls:
60+
- id: toolcall_0
61+
type: function
62+
function:
63+
name: report_intent
64+
arguments: '{"intent":"Searching file for pattern"}'
65+
- id: toolcall_1
66+
type: function
67+
function:
68+
name: grep
69+
arguments: '{"pattern":"^ap","path":"${workdir}/data.txt","output_mode":"content","-n":true}'
70+
- role: tool
71+
tool_call_id: toolcall_0
72+
content: Intent logged
73+
- role: tool
74+
tool_call_id: toolcall_1
75+
content: |-
76+
${workdir}/data.txt:1:apple
77+
${workdir}/data.txt:3:apricot
78+
- role: assistant
79+
content: |-
80+
The search found **2 lines** starting with 'ap':
81+
- Line 1: `apple`
82+
- Line 3: `apricot`

0 commit comments

Comments
 (0)