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.
- package/package.json +1 -1
- package/sapper.mjs +7 -7
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -166,7 +166,8 @@ WORKFLOW:
|
|
|
166
166
|
}];
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
270
|
-
await ask();
|
|
271
|
-
};
|
|
272
|
-
await ask();
|
|
272
|
+
}
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
runSapper();
|