Skip to content

Commit fc30ff6

Browse files
committed
update from KJ7LNW comment
1 parent a93c2e0 commit fc30ff6

File tree

2 files changed

+78
-13
lines changed

2 files changed

+78
-13
lines changed

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

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ Examples:
8585
</args>
8686
</read_file>
8787
88-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
88+
IMPORTANT: You MUST use this Efficient Reading Strategy:
89+
- You MUST read all related files and implementations together in a single operation
90+
- You MUST obtain all necessary context before proceeding with changes
91+
- You MUST combine adjacent line ranges (<10 lines apart)
92+
- You MUST use multiple ranges for content separated by >10 lines
93+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
8994
9095
## fetch_instructions
9196
Description: Request to fetch instructions to perform a task
@@ -568,7 +573,12 @@ Examples:
568573
</args>
569574
</read_file>
570575
571-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
576+
IMPORTANT: You MUST use this Efficient Reading Strategy:
577+
- You MUST read all related files and implementations together in a single operation
578+
- You MUST obtain all necessary context before proceeding with changes
579+
- You MUST combine adjacent line ranges (<10 lines apart)
580+
- You MUST use multiple ranges for content separated by >10 lines
581+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
572582
573583
## fetch_instructions
574584
Description: Request to fetch instructions to perform a task
@@ -1051,7 +1061,12 @@ Examples:
10511061
</args>
10521062
</read_file>
10531063
1054-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
1064+
IMPORTANT: You MUST use this Efficient Reading Strategy:
1065+
- You MUST read all related files and implementations together in a single operation
1066+
- You MUST obtain all necessary context before proceeding with changes
1067+
- You MUST combine adjacent line ranges (<10 lines apart)
1068+
- You MUST use multiple ranges for content separated by >10 lines
1069+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
10551070
10561071
## fetch_instructions
10571072
Description: Request to fetch instructions to perform a task
@@ -1534,7 +1549,12 @@ Examples:
15341549
</args>
15351550
</read_file>
15361551
1537-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
1552+
IMPORTANT: You MUST use this Efficient Reading Strategy:
1553+
- You MUST read all related files and implementations together in a single operation
1554+
- You MUST obtain all necessary context before proceeding with changes
1555+
- You MUST combine adjacent line ranges (<10 lines apart)
1556+
- You MUST use multiple ranges for content separated by >10 lines
1557+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
15381558
15391559
## fetch_instructions
15401560
Description: Request to fetch instructions to perform a task
@@ -2073,7 +2093,12 @@ Examples:
20732093
</args>
20742094
</read_file>
20752095
2076-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
2096+
IMPORTANT: You MUST use this Efficient Reading Strategy:
2097+
- You MUST read all related files and implementations together in a single operation
2098+
- You MUST obtain all necessary context before proceeding with changes
2099+
- You MUST combine adjacent line ranges (<10 lines apart)
2100+
- You MUST use multiple ranges for content separated by >10 lines
2101+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
20772102
20782103
## fetch_instructions
20792104
Description: Request to fetch instructions to perform a task
@@ -2624,7 +2649,12 @@ Examples:
26242649
</args>
26252650
</read_file>
26262651
2627-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
2652+
IMPORTANT: You MUST use this Efficient Reading Strategy:
2653+
- You MUST read all related files and implementations together in a single operation
2654+
- You MUST obtain all necessary context before proceeding with changes
2655+
- You MUST combine adjacent line ranges (<10 lines apart)
2656+
- You MUST use multiple ranges for content separated by >10 lines
2657+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
26282658
26292659
## fetch_instructions
26302660
Description: Request to fetch instructions to perform a task
@@ -3163,7 +3193,12 @@ Examples:
31633193
</args>
31643194
</read_file>
31653195
3166-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
3196+
IMPORTANT: You MUST use this Efficient Reading Strategy:
3197+
- You MUST read all related files and implementations together in a single operation
3198+
- You MUST obtain all necessary context before proceeding with changes
3199+
- You MUST combine adjacent line ranges (<10 lines apart)
3200+
- You MUST use multiple ranges for content separated by >10 lines
3201+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
31673202
31683203
## fetch_instructions
31693204
Description: Request to fetch instructions to perform a task
@@ -3736,7 +3771,12 @@ Examples:
37363771
</args>
37373772
</read_file>
37383773
3739-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
3774+
IMPORTANT: You MUST use this Efficient Reading Strategy:
3775+
- You MUST read all related files and implementations together in a single operation
3776+
- You MUST obtain all necessary context before proceeding with changes
3777+
- You MUST combine adjacent line ranges (<10 lines apart)
3778+
- You MUST use multiple ranges for content separated by >10 lines
3779+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
37403780
37413781
## fetch_instructions
37423782
Description: Request to fetch instructions to perform a task
@@ -4261,7 +4301,12 @@ Examples:
42614301
</args>
42624302
</read_file>
42634303
4264-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
4304+
IMPORTANT: You MUST use this Efficient Reading Strategy:
4305+
- You MUST read all related files and implementations together in a single operation
4306+
- You MUST obtain all necessary context before proceeding with changes
4307+
- You MUST combine adjacent line ranges (<10 lines apart)
4308+
- You MUST use multiple ranges for content separated by >10 lines
4309+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
42654310
42664311
## fetch_instructions
42674312
Description: Request to fetch instructions to perform a task
@@ -4821,7 +4866,12 @@ Examples:
48214866
</args>
48224867
</read_file>
48234868
4824-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
4869+
IMPORTANT: You MUST use this Efficient Reading Strategy:
4870+
- You MUST read all related files and implementations together in a single operation
4871+
- You MUST obtain all necessary context before proceeding with changes
4872+
- You MUST combine adjacent line ranges (<10 lines apart)
4873+
- You MUST use multiple ranges for content separated by >10 lines
4874+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
48254875
48264876
## fetch_instructions
48274877
Description: Request to fetch instructions to perform a task
@@ -5295,7 +5345,12 @@ Examples:
52955345
</args>
52965346
</read_file>
52975347
5298-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
5348+
IMPORTANT: You MUST use this Efficient Reading Strategy:
5349+
- You MUST read all related files and implementations together in a single operation
5350+
- You MUST obtain all necessary context before proceeding with changes
5351+
- You MUST combine adjacent line ranges (<10 lines apart)
5352+
- You MUST use multiple ranges for content separated by >10 lines
5353+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
52995354
53005355
## fetch_instructions
53015356
Description: Request to fetch instructions to perform a task
@@ -5686,7 +5741,12 @@ Examples:
56865741
</args>
56875742
</read_file>
56885743
5689-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.
5744+
IMPORTANT: You MUST use this Efficient Reading Strategy:
5745+
- You MUST read all related files and implementations together in a single operation
5746+
- You MUST obtain all necessary context before proceeding with changes
5747+
- You MUST combine adjacent line ranges (<10 lines apart)
5748+
- You MUST use multiple ranges for content separated by >10 lines
5749+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal
56905750
56915751
## fetch_instructions
56925752
Description: Request to fetch instructions to perform a task

src/core/prompts/tools/read-file.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,10 @@ Examples:
5656
</args>
5757
</read_file>
5858
59-
Note: Line ranges enable efficient streaming of specific portions from large files like logs or datasets.`
59+
IMPORTANT: You MUST use this Efficient Reading Strategy:
60+
- You MUST read all related files and implementations together in a single operation
61+
- You MUST obtain all necessary context before proceeding with changes
62+
- You MUST combine adjacent line ranges (<10 lines apart)
63+
- You MUST use multiple ranges for content separated by >10 lines
64+
- You MUST include sufficient line context for planned modifications while keeping ranges minimal`
6065
}

0 commit comments

Comments
 (0)