@snapcommit/cli 1.2.0 → 1.2.1
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/dist/repl.js +5 -0
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -133,7 +133,9 @@ async function startREPL() {
|
|
|
133
133
|
}
|
|
134
134
|
if (line === 'commit' || line === 'c') {
|
|
135
135
|
const { commitCommand } = await Promise.resolve().then(() => __importStar(require('./commands/commit')));
|
|
136
|
+
rl.pause(); // Pause REPL readline to avoid conflicts
|
|
136
137
|
await commitCommand();
|
|
138
|
+
rl.resume(); // Resume REPL readline
|
|
137
139
|
rl.prompt();
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
@@ -224,10 +226,13 @@ async function startREPL() {
|
|
|
224
226
|
}
|
|
225
227
|
// Everything else is natural language
|
|
226
228
|
try {
|
|
229
|
+
rl.pause(); // Pause REPL readline to avoid conflicts
|
|
227
230
|
await (0, natural_1.naturalCommand)(line);
|
|
231
|
+
rl.resume(); // Resume REPL readline
|
|
228
232
|
}
|
|
229
233
|
catch (error) {
|
|
230
234
|
console.log(chalk_1.default.red(`\n❌ Error: ${error.message}\n`));
|
|
235
|
+
rl.resume(); // Make sure to resume even on error
|
|
231
236
|
}
|
|
232
237
|
rl.prompt();
|
|
233
238
|
});
|