You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -479,7 +479,7 @@ Join us at https://www.reddit.com/r/RooCode to share your custom modes and be pa
479
479
## [2.1.14]
480
480
481
481
- Fix bug where diffs were not being applied correctly and try Aider's [unified diff prompt](https://github.com/Aider-AI/aider/blob/3995accd0ca71cea90ef76d516837f8c2731b9fe/aider/coders/udiff_prompts.py#L75-L105)
482
-
- If diffs are enabled, automatically reject write_to_file commands that lead to truncated output
482
+
- If diffs are enabled, automatically reject create_file commands that lead to truncated output
Copy file name to clipboardExpand all lines: src/api/transform/o1-format.ts
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -67,13 +67,13 @@ Description: Perform a regex search across files in a specified directory, provi
67
67
</read_file>
68
68
Description: Read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string.
69
69
70
-
6. write_to_file:
71
-
<write_to_file>
70
+
6. create_file:
71
+
<create_file>
72
72
<path>File path here</path>
73
73
<content>
74
74
Your file content here
75
75
</content>
76
-
</write_to_file>
76
+
</create_file>
77
77
Description: Write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. Always provide the full intended content of the file, without any truncation. This tool will automatically create any directories needed to write the file.
78
78
79
79
7. ask_followup_question:
@@ -107,7 +107,7 @@ Example 2: Using multiple tools
107
107
108
108
Let's create two new configuration files for the web application: one for the frontend and one for the backend.
109
109
110
-
<write_to_file>
110
+
<create_file>
111
111
<path>./frontend-config.json</path>
112
112
<content>
113
113
{
@@ -125,9 +125,9 @@ Let's create two new configuration files for the web application: one for the fr
125
125
"version": "1.0.0"
126
126
}
127
127
</content>
128
-
</write_to_file>
128
+
</create_file>
129
129
130
-
<write_to_file>
130
+
<create_file>
131
131
<path>./backend-config.yaml</path>
132
132
<content>
133
133
database:
@@ -154,7 +154,7 @@ externalServices:
154
154
emailProvider: sendgrid
155
155
storageProvider: aws-s3
156
156
</content>
157
-
</write_to_file>
157
+
</create_file>
158
158
159
159
Example 3: Asking a follow-up question
160
160
@@ -239,7 +239,7 @@ const toolNames = [
239
239
"list_code_definition_names",
240
240
"search_files",
241
241
"read_file",
242
-
"write_to_file",
242
+
"create_file",
243
243
"ask_followup_question",
244
244
"attempt_completion",
245
245
]
@@ -331,7 +331,7 @@ function validateToolInput(toolName: string, tool_input: Record<string, string>)
331
331
return"path"intool_input
332
332
case"search_files":
333
333
return"path"intool_input&&"regex"intool_input
334
-
case"write_to_file":
334
+
case"create_file":
335
335
return"path"intool_input&&"content"intool_input
336
336
case"ask_followup_question":
337
337
return"question"intool_input
@@ -349,10 +349,10 @@ function validateToolInput(toolName: string, tool_input: Record<string, string>)
Copy file name to clipboardExpand all lines: src/core/Cline.ts
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -698,7 +698,7 @@ export class Cline {
698
698
text:
699
699
`[TASK RESUMPTION] This task was interrupted ${agoText}. It may or may not be complete, so please reassess the task context. Be aware that the project state may have changed since then. The current working directory is now '${cwd.toPosix()}'. If the task has not been completed, retry the last step before interruption and proceed with completing the task.\n\nNote: If you previously attempted a tool use that the user did not provide a result for, you should assume the tool use was not successful and assess whether you should retry. If the last tool was a browser_action, the browser has been closed and you must launch a new browser if needed.${
700
700
wasRecent
701
-
? "\n\nIMPORTANT: If the last tool use was a write_to_file that was interrupted, the file was reverted back to its original state before the interrupted edit, and you do NOT need to re-read the file as you already have its up-to-date contents."
701
+
? "\n\nIMPORTANT: If the last tool use was a create_file that was interrupted, the file was reverted back to its original state before the interrupted edit, and you do NOT need to re-read the file as you already have its up-to-date contents."
702
702
: ""
703
703
}`+
704
704
(responseText
@@ -1102,7 +1102,7 @@ export class Cline {
1102
1102
return`[${block.name} for '${block.params.command}']`
1103
1103
case"read_file":
1104
1104
return`[${block.name} for '${block.params.path}']`
1105
-
case"write_to_file":
1105
+
case"create_file":
1106
1106
return`[${block.name} for '${block.params.path}']`
1107
1107
case"edit_file":
1108
1108
return`[${block.name} for '${block.params.path}']`
`The browser action has been executed. The console logs and screenshot have been captured for your analysis.\n\nConsole logs:\n${
2196
2196
browserActionResult.logs||"(No new logs)"
2197
-
}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser. For example, if after analyzing the logs and screenshot you need to edit a file, you must first close the browser before you can use the write_to_file tool.)`,
2197
+
}\n\n(REMEMBER: if you need to proceed to using non-\`browser_action\` tools or launch a new browser, you MUST first close this browser. For example, if after analyzing the logs and screenshot you need to edit a file, you must first close the browser before you can use the create_file tool.)`,
Seeing out of bounds is fine, it means that the next too call is being built up and ready to add to assistantMessageContent to present.
2714
-
When you see the UI inactive during this, it means that a tool is breaking without presenting any UI. For example the write_to_file tool was breaking when relpath was undefined, and for invalid relpath it never presented UI.
2714
+
When you see the UI inactive during this, it means that a tool is breaking without presenting any UI. For example the create_file tool was breaking when relpath was undefined, and for invalid relpath it never presented UI.
2715
2715
*/
2716
2716
this.presentAssistantMessageLocked=false// this needs to be placed here, if not then calling this.presentAssistantMessage below would fail (sometimes) since it's locked
2717
2717
// NOTE: when tool is rejected, iterator stream is interrupted and it waits for userMessageContentReady to be true. Future calls to present will skip execution since didRejectTool and iterate until contentIndex is set to message length and it sets userMessageContentReady to true itself (instead of preemptively doing it in iterator)
Copy file name to clipboardExpand all lines: src/core/assistant-message/parse-assistant-message.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -61,9 +61,9 @@ export function parseAssistantMessage(assistantMessage: string) {
61
61
62
62
// there's no current param, and not starting a new param
63
63
64
-
// special case for write_to_file where file contents could contain the closing tag, in which case the param would have closed and we end up with the rest of the file contents here. To work around this, we get the string between the starting content tag and the LAST content tag.
64
+
// special case for create_file where file contents could contain the closing tag, in which case the param would have closed and we end up with the rest of the file contents here. To work around this, we get the string between the starting content tag and the LAST content tag.
0 commit comments