sapper-iq 1.0.14 → 1.0.15
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 +14 -0
package/package.json
CHANGED
package/sapper.mjs
CHANGED
|
@@ -155,6 +155,20 @@ Don't keep executing tools endlessly - provide insights after reading!`
|
|
|
155
155
|
const ask = () => {
|
|
156
156
|
safeQuestion(chalk.blue.bold('\nIbrahim ➔ ')).then(async (input) => {
|
|
157
157
|
if (input.toLowerCase() === 'exit') process.exit();
|
|
158
|
+
|
|
159
|
+
// Handle reset command
|
|
160
|
+
if (input.toLowerCase() === '/reset' || input.toLowerCase() === '/clear') {
|
|
161
|
+
if (fs.existsSync(CONTEXT_FILE)) {
|
|
162
|
+
fs.unlinkSync(CONTEXT_FILE);
|
|
163
|
+
console.log(chalk.green('✅ Context cleared! Starting fresh...\n'));
|
|
164
|
+
}
|
|
165
|
+
messages = [{
|
|
166
|
+
role: 'system',
|
|
167
|
+
content: messages[0].content // Keep system prompt
|
|
168
|
+
}];
|
|
169
|
+
return ask();
|
|
170
|
+
}
|
|
171
|
+
|
|
158
172
|
messages.push({ role: 'user', content: input });
|
|
159
173
|
|
|
160
174
|
let active = true;
|