Skip to content

Commit c228e63

Browse files
Update insert_content tool description for clarity and detail (#2892)
1 parent 41db2ca commit c228e63

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/core/prompts/__tests__/__snapshots__/system.test.ts.snap

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Example: Requesting to write to frontend-config.json
180180
</write_to_file>
181181
182182
## insert_content
183-
Description: Insert new content at a specific line position in a file.
183+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
184184
185185
Parameters:
186186
- path: (required) File path relative to workspace directory /test/path
@@ -647,7 +647,7 @@ Example: Requesting to write to frontend-config.json
647647
</write_to_file>
648648
649649
## insert_content
650-
Description: Insert new content at a specific line position in a file.
650+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
651651
652652
Parameters:
653653
- path: (required) File path relative to workspace directory /test/path
@@ -1114,7 +1114,7 @@ Example: Requesting to write to frontend-config.json
11141114
</write_to_file>
11151115
11161116
## insert_content
1117-
Description: Insert new content at a specific line position in a file.
1117+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
11181118
11191119
Parameters:
11201120
- path: (required) File path relative to workspace directory /test/path
@@ -1581,7 +1581,7 @@ Example: Requesting to write to frontend-config.json
15811581
</write_to_file>
15821582
15831583
## insert_content
1584-
Description: Insert new content at a specific line position in a file.
1584+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
15851585
15861586
Parameters:
15871587
- path: (required) File path relative to workspace directory /test/path
@@ -2104,7 +2104,7 @@ Example: Requesting to write to frontend-config.json
21042104
</write_to_file>
21052105
21062106
## insert_content
2107-
Description: Insert new content at a specific line position in a file.
2107+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
21082108
21092109
Parameters:
21102110
- path: (required) File path relative to workspace directory /test/path
@@ -2639,7 +2639,7 @@ Example: Requesting to write to frontend-config.json
26392639
</write_to_file>
26402640
26412641
## insert_content
2642-
Description: Insert new content at a specific line position in a file.
2642+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
26432643
26442644
Parameters:
26452645
- path: (required) File path relative to workspace directory /test/path
@@ -3252,7 +3252,7 @@ Example: Requesting to write to frontend-config.json
32523252
</write_to_file>
32533253
32543254
## insert_content
3255-
Description: Insert new content at a specific line position in a file.
3255+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
32563256
32573257
Parameters:
32583258
- path: (required) File path relative to workspace directory /test/path
@@ -3719,7 +3719,7 @@ Example: Requesting to write to frontend-config.json
37193719
</write_to_file>
37203720
37213721
## insert_content
3722-
Description: Insert new content at a specific line position in a file.
3722+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
37233723
37243724
Parameters:
37253725
- path: (required) File path relative to workspace directory /test/path
@@ -4228,7 +4228,7 @@ Example: Requesting to write to frontend-config.json
42284228
</write_to_file>
42294229
42304230
## insert_content
4231-
Description: Insert new content at a specific line position in a file.
4231+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
42324232
42334233
Parameters:
42344234
- path: (required) File path relative to workspace directory /test/path
@@ -4772,7 +4772,7 @@ Example: Requesting to write to frontend-config.json
47724772
</write_to_file>
47734773
47744774
## insert_content
4775-
Description: Insert new content at a specific line position in a file.
4775+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
47764776
47774777
Parameters:
47784778
- path: (required) File path relative to workspace directory /test/path
@@ -5605,7 +5605,7 @@ Example: Requesting to write to frontend-config.json
56055605
</write_to_file>
56065606
56075607
## insert_content
5608-
Description: Insert new content at a specific line position in a file.
5608+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
56095609
56105610
Parameters:
56115611
- path: (required) File path relative to workspace directory /test/path

src/core/prompts/tools/insert-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ToolArgs } from "./types"
22

33
export function getInsertContentDescription(args: ToolArgs): string {
44
return `## insert_content
5-
Description: Insert new content at a specific line position in a file.
5+
Description: Use this tool specifically for adding new lines of content into a file without modifying existing content. Specify the line number to insert before, or use line 0 to append to the end. Ideal for adding imports, functions, configuration blocks, log entries, or any multi-line text block.
66
77
Parameters:
88
- path: (required) File path relative to workspace directory ${args.cwd.toPosix()}

0 commit comments

Comments
 (0)