sapper-iq 1.1.23 → 1.1.24

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 +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sapper-iq",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
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
@@ -874,7 +874,13 @@ async function runSapper() {
874
874
  if (type.toLowerCase() === 'list') result = tools.list(path);
875
875
  else if (type.toLowerCase() === 'read') result = tools.read(path);
876
876
  else if (type.toLowerCase() === 'mkdir') result = tools.mkdir(path);
877
- else if (type.toLowerCase() === 'write') result = await tools.write(path, content);
877
+ else if (type.toLowerCase() === 'write') {
878
+ if (!content || content.trim() === '') {
879
+ result = 'Error: WRITE requires content. Use [TOOL:WRITE]path]content here[/TOOL]';
880
+ } else {
881
+ result = await tools.write(path, content);
882
+ }
883
+ }
878
884
  else if (type.toLowerCase() === 'patch') {
879
885
  // PATCH format: [TOOL:PATCH]path]OLD_TEXT|||NEW_TEXT[/TOOL]
880
886
  const parts = content?.split('|||');