sapper-iq 1.1.19 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sapper.mjs +9 -41
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -503,44 +503,13 @@ async function runSapper() {
|
|
|
503
503
|
if (messages.length === 0) {
|
|
504
504
|
messages = [{
|
|
505
505
|
role: 'system',
|
|
506
|
-
content: `You are Sapper,
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
-
|
|
510
|
-
-
|
|
511
|
-
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
[TOOL:LIST]path[/TOOL]
|
|
515
|
-
→ List files in a directory
|
|
516
|
-
→ Example: [TOOL:LIST].[/TOOL]
|
|
517
|
-
|
|
518
|
-
[TOOL:READ]path[/TOOL]
|
|
519
|
-
→ Read a file's contents
|
|
520
|
-
→ Example: [TOOL:READ]./package.json[/TOOL]
|
|
521
|
-
|
|
522
|
-
[TOOL:WRITE]path]content[/TOOL]
|
|
523
|
-
→ Create or overwrite a file (needs user confirmation)
|
|
524
|
-
→ Example: [TOOL:WRITE]./index.js]console.log("hello")[/TOOL]
|
|
525
|
-
|
|
526
|
-
[TOOL:PATCH]path]old_text|||new_text[/TOOL]
|
|
527
|
-
→ Replace specific text in a file (needs user confirmation)
|
|
528
|
-
→ Example: [TOOL:PATCH]./app.js]old code|||new code[/TOOL]
|
|
529
|
-
|
|
530
|
-
[TOOL:SEARCH]pattern[/TOOL]
|
|
531
|
-
→ Search for text across all files
|
|
532
|
-
→ Example: [TOOL:SEARCH]function login[/TOOL]
|
|
533
|
-
|
|
534
|
-
[TOOL:SHELL]command[/TOOL]
|
|
535
|
-
→ Run a terminal command (needs user confirmation)
|
|
536
|
-
→ Example: [TOOL:SHELL]npm install express[/TOOL]
|
|
537
|
-
|
|
538
|
-
PATH RULES:
|
|
539
|
-
- Always use relative paths: ./file.js, ./src/app.js
|
|
540
|
-
- NEVER use absolute paths like /file.js
|
|
541
|
-
- Use . for current directory
|
|
542
|
-
|
|
543
|
-
`
|
|
506
|
+
content: `You are Sapper, an AGENT, You can use tools to take action:
|
|
507
|
+
- [TOOL:LIST]path[/TOOL] - List directory
|
|
508
|
+
- [TOOL:READ]path[/TOOL] - Read file
|
|
509
|
+
- [TOOL:SEARCH]pattern[/TOOL] - Search codebase
|
|
510
|
+
- [TOOL:WRITE]path]content[/TOOL] - Create/overwrite file
|
|
511
|
+
- [TOOL:PATCH]path]old|||new[/TOOL] - Edit file
|
|
512
|
+
- [TOOL:SHELL]command[/TOOL] - Run terminal command`
|
|
544
513
|
}];
|
|
545
514
|
}
|
|
546
515
|
|
|
@@ -623,14 +592,13 @@ PATH RULES:
|
|
|
623
592
|
// 4. Add reminder to stay in Agent Mode (not chatbot mode)
|
|
624
593
|
messages.push({
|
|
625
594
|
role: 'system',
|
|
626
|
-
content: `CONTEXT PRUNED. REMINDER: You are an AGENT,
|
|
595
|
+
content: `CONTEXT PRUNED. REMINDER: You are an AGENT, You can use tools to take action:
|
|
627
596
|
- [TOOL:LIST]path[/TOOL] - List directory
|
|
628
597
|
- [TOOL:READ]path[/TOOL] - Read file
|
|
629
598
|
- [TOOL:SEARCH]pattern[/TOOL] - Search codebase
|
|
630
599
|
- [TOOL:WRITE]path]content[/TOOL] - Create/overwrite file
|
|
631
600
|
- [TOOL:PATCH]path]old|||new[/TOOL] - Edit file
|
|
632
|
-
- [TOOL:SHELL]command[/TOOL] - Run terminal command
|
|
633
|
-
Do NOT just display content. Actually WRITE files using the tool.`
|
|
601
|
+
- [TOOL:SHELL]command[/TOOL] - Run terminal command.`
|
|
634
602
|
});
|
|
635
603
|
|
|
636
604
|
// 5. Save to context file so it persists
|