sapper-iq 1.0.23 → 1.0.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 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sapper-iq",
3
- "version": "1.0.23",
3
+ "version": "1.0.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
@@ -166,7 +166,8 @@ WORKFLOW:
166
166
  }];
167
167
  }
168
168
 
169
- const ask = async () => {
169
+ // Main conversation loop - never exits unless user types 'exit'
170
+ while (true) {
170
171
  try {
171
172
  const input = await safeQuestion(chalk.blue.bold('\nIbrahim ➔ '));
172
173
 
@@ -182,7 +183,7 @@ WORKFLOW:
182
183
  role: 'system',
183
184
  content: messages[0].content // Keep system prompt
184
185
  }];
185
- return await ask();
186
+ continue;
186
187
  }
187
188
 
188
189
  messages.push({ role: 'user', content: input });
@@ -201,7 +202,8 @@ WORKFLOW:
201
202
  } catch (ollamaError) {
202
203
  spinner.stop();
203
204
  console.error(chalk.red('\n❌ Ollama error:'), ollamaError.message);
204
- return await ask();
205
+ active = false;
206
+ continue;
205
207
  }
206
208
  spinner.stop();
207
209
 
@@ -265,11 +267,9 @@ WORKFLOW:
265
267
  }
266
268
  } catch (error) {
267
269
  console.error(chalk.red('\n❌ Error:'), error.message);
270
+ // Loop continues automatically
268
271
  }
269
- // ALWAYS call ask() again with await - keep the conversation going
270
- await ask();
271
- };
272
- await ask();
272
+ }
273
273
  }
274
274
 
275
275
  runSapper();