Skip to content

Commit b4fdeb8

Browse files
committed
Update str_replace argument names
1 parent 7562031 commit b4fdeb8

19 files changed

Lines changed: 752 additions & 370 deletions

File tree

agents-graveyard/editor/reviewer-editor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Write out what changes you would make using the tool call format below. Use this
3636
"path": "path/to/file",
3737
"replacements": [
3838
{
39-
"old": "exact old code",
40-
"new": "exact new code"
39+
"oldString": "exact old code",
40+
"newString": "exact new code"
4141
},
4242
{
43-
"old": "exact old code 2",
44-
"new": "exact new code 2"
43+
"oldString": "exact old code 2",
44+
"newString": "exact new code 2"
4545
},
4646
]
4747
}

agents/editor/best-of-n/editor-implementor.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ You can make multiple tool calls across multiple steps to complete the implement
5151
"path": "path/to/file",
5252
"replacements": [
5353
{
54-
"old": "exact old code",
55-
"new": "exact new code"
54+
"oldString": "exact old code",
55+
"newString": "exact new code"
5656
},
5757
{
58-
"old": "exact old code 2",
59-
"new": "exact new code 2"
58+
"oldString": "exact old code 2",
59+
"newString": "exact new code 2"
6060
},
6161
]
6262
}
@@ -72,9 +72,10 @@ OR for new files or major rewrites:
7272
"content": "Complete file content"
7373
}
7474
</codebuff_tool_call>
75-
${isGpt5 || isGemini
76-
? ``
77-
: `
75+
${
76+
isGpt5 || isGemini
77+
? ``
78+
: `
7879
IMPORTANT: Before you start writing your implementation, you should use <think> tags to think about the best way to implement the changes. You should think really really hard to make sure you implement the changes in the best way possible. Take as much time as you to think through all the cases to produce the best changes.
7980
8081
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes.
@@ -102,7 +103,7 @@ You can also use <think> tags interspersed between tool calls to think about the
102103
</codebuff_tool_call>
103104
104105
</example>`
105-
}
106+
}
106107
107108
After the edit tool calls, you can optionally mention any follow-up steps to take, like deleting a file, or a specific way to validate the changes. There's no need to use the set_output tool as your entire response will be included in the output.
108109

agents/editor/editor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Write out what changes you would make using the tool call format below. Use this
6161
"path": "path/to/file",
6262
"replacements": [
6363
{
64-
"old": "exact old code",
65-
"new": "exact new code"
64+
"oldString": "exact old code",
65+
"newString": "exact new code"
6666
},
6767
{
68-
"old": "exact old code 2",
69-
"new": "exact new code 2"
68+
"oldString": "exact old code 2",
69+
"newString": "exact new code 2"
7070
},
7171
]
7272
}

cli/src/components/tools/str-replace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const EditBody = ({ name, filePath, diffText, isCreate }: EditBodyProps) => {
7373
return (
7474
<box style={{ flexDirection: 'column', gap: 0, width: '100%' }}>
7575
<EditHeader name={name} filePath={filePath} />
76-
{!isCreate && (
76+
{!isCreate && diffText.length > 0 && (
7777
<box style={{ paddingLeft: 2, width: '100%' }}>
7878
<DiffViewer diffText={diffText} />
7979
</box>

0 commit comments

Comments
 (0)