cciwon-code-review-cli 2.1.1 → 2.1.2
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/lib/chat-mode.js +17 -9
- package/package.json +1 -1
package/lib/chat-mode.js
CHANGED
|
@@ -285,15 +285,23 @@ class ChatMode {
|
|
|
285
285
|
*/
|
|
286
286
|
askQuestion(question) {
|
|
287
287
|
return new Promise((resolve) => {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
// REPL이 실행 중이면 기존 interface 사용
|
|
289
|
+
if (this.rl) {
|
|
290
|
+
this.rl.question(chalk.bold.cyan(question), (answer) => {
|
|
291
|
+
resolve(answer);
|
|
292
|
+
});
|
|
293
|
+
} else {
|
|
294
|
+
// REPL 시작 전 (초기 질문용)
|
|
295
|
+
const rl = readline.createInterface({
|
|
296
|
+
input: process.stdin,
|
|
297
|
+
output: process.stdout
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
rl.question(chalk.bold.cyan(question), (answer) => {
|
|
301
|
+
rl.close();
|
|
302
|
+
resolve(answer);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
297
305
|
});
|
|
298
306
|
}
|
|
299
307
|
}
|