sapper-iq 1.0.18 → 1.0.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 +8 -9
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -152,8 +152,7 @@ READING GUIDELINES:
|
|
|
152
152
|
- If user says "analyze src folder" → Read ALL files in src/
|
|
153
153
|
- If user says "read everything" → List directory, then read all files
|
|
154
154
|
- If < 20 files total: Read them all
|
|
155
|
-
- If > 20 files: Ask user which area to focus on
|
|
156
|
-
- If > 50 files: Read key files first, then ask user for focus area
|
|
155
|
+
- If > 20 files: Ask user which area to focus on
|
|
157
156
|
|
|
158
157
|
TOOL FORMAT (CRITICAL - FOLLOW EXACTLY):
|
|
159
158
|
✅ CORRECT: [TOOL:LIST].[/TOOL]
|
|
@@ -221,20 +220,20 @@ WORKFLOW:
|
|
|
221
220
|
}
|
|
222
221
|
fs.writeFileSync(CONTEXT_FILE, JSON.stringify(messages));
|
|
223
222
|
|
|
224
|
-
// Warn if reading
|
|
223
|
+
// Warn if reading many files at once
|
|
225
224
|
if (toolMatches.length > 30) {
|
|
226
|
-
console.log(chalk.yellow('\n⚠️ Reading 30+ files! This might take time.
|
|
225
|
+
console.log(chalk.yellow('\n⚠️ Reading 30+ files! This might take time.'));
|
|
227
226
|
}
|
|
228
227
|
} else {
|
|
229
|
-
// No tools - check
|
|
228
|
+
// No tools found - check if malformed command
|
|
230
229
|
if (msg.includes('[TOOL:') && msg.includes('[/]')) {
|
|
231
|
-
console.log(chalk.red('\n❌ Malformed tool:
|
|
230
|
+
console.log(chalk.red('\n❌ Malformed tool command detected! Expected format: [TOOL:TYPE]path[/TOOL]'));
|
|
232
231
|
messages.push({
|
|
233
232
|
role: 'user',
|
|
234
|
-
content: 'ERROR:
|
|
233
|
+
content: 'ERROR: Your tool command is malformed. Use [TOOL:TYPE]path]content[/TOOL] or [TOOL:TYPE]path[/TOOL]'
|
|
235
234
|
});
|
|
236
235
|
} else {
|
|
237
|
-
// Normal response - save and
|
|
236
|
+
// Normal response without tools - save context and wait for next input
|
|
238
237
|
fs.writeFileSync(CONTEXT_FILE, JSON.stringify(messages));
|
|
239
238
|
active = false;
|
|
240
239
|
}
|
|
@@ -242,7 +241,7 @@ WORKFLOW:
|
|
|
242
241
|
}
|
|
243
242
|
ask();
|
|
244
243
|
}).catch((error) => {
|
|
245
|
-
console.error(chalk.red('\n❌ Error
|
|
244
|
+
console.error(chalk.red('\n❌ Error:'), error.message);
|
|
246
245
|
ask(); // Continue despite error
|
|
247
246
|
});
|
|
248
247
|
};
|