Skip to content

Commit ace2bcf

Browse files
authored
Merge branch 'aws:main' into feature/mcp
2 parents e3f4af2 + 20e3680 commit ace2bcf

File tree

1 file changed

+2
-0
lines changed
  • server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools

1 file changed

+2
-0
lines changed

server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fsWrite.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ export class FsWrite {
155155
and otherwise create a new file\n * The `append` command will add content to the end of an existing file, \
156156
automatically adding a newline if the file does not end with one. \
157157
The file must exist.\n Notes for using the `strReplace` command:\n * \
158+
IMPORTANT: For the `fsWrite` tool, only use the `strReplace` command for simple, isolated single-line replacements. \
159+
If you are editing multiple lines, always prefer the `create` command and replace the entire file content instead.\n * \
158160
The `oldStr` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!\n * \
159161
If the `oldStr` parameter is not unique in the file, the replacement will not be performed. \
160162
Make sure to include enough context in `oldStr` to make it unique\n * \

0 commit comments

Comments
 (0)