sapper-iq 1.0.20 → 1.0.21

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/sapper.mjs +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sapper-iq",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "AI-powered development assistant that executes commands and builds projects",
5
5
  "main": "sapper.mjs",
6
6
  "bin": {
package/sapper.mjs CHANGED
@@ -202,7 +202,9 @@ WORKFLOW:
202
202
  console.log();
203
203
  messages.push({ role: 'assistant', content: msg });
204
204
 
205
- const toolMatches = [...msg.matchAll(/\[TOOL:(\w+)\]([^\]\n]+)(?:\]([\s\S]*?))?\[\/TOOL\]/g)];
205
+ // Fixed regex: .+? (non-greedy) stops correctly before [/TOOL]
206
+ // Old regex [^\]\n]+ was broken - it stopped at ] which is at END of [/TOOL]
207
+ const toolMatches = [...msg.matchAll(/\[TOOL:(\w+)\](.+?)(?:\]([\s\S]*?))?\[\/TOOL\]/g)];
206
208
 
207
209
  if (toolMatches.length > 0) {
208
210
  for (const match of toolMatches) {