Skip to content

Commit bbaff63

Browse files
committed
Fix: Prompt fs_write tool to prefer creating shorter files
1 parent 1db4762 commit bbaff63

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

crates/q_cli/src/cli/chat/tools/tool_index.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"name": "fs_write",
43-
"description": "Custom editing tool for creating and editing files\n * The `create` command will override the file at `path` if it already exists as a file, and otherwise create a new file\n * If a `command` generates a long output, it will be truncated and marked with `<response clipped>` \n Notes for using the `str_replace` command:\n * The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!\n * If the `old_str` parameter is not unique in the file, the replacement will not be performed. Make sure to include enough context in `old_str` to make it unique\n * The `new_str` parameter should contain the edited lines that should replace the `old_str`",
43+
"description": "A tool for creating and editing files\n * The `create` command will override the file at `path` if it already exists as a file, and otherwise create a new file\n * Please prefer creating smaller files even when asked otherwise as large file creations are likely to fail.\n Notes for using the `str_replace` command:\n * The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!\n * If the `old_str` parameter is not unique in the file, the replacement will not be performed. Make sure to include enough context in `old_str` to make it unique\n * The `new_str` parameter should contain the edited lines that should replace the `old_str`",
4444
"input_schema": {
4545
"type": "object",
4646
"properties": {
@@ -104,12 +104,7 @@
104104
"description": "Human readable description of the api that is being called."
105105
}
106106
},
107-
"required": [
108-
"region",
109-
"service_name",
110-
"operation_name",
111-
"label"
112-
]
107+
"required": ["region", "service_name", "operation_name", "label"]
113108
}
114109
}
115110
]

0 commit comments

Comments
 (0)