cciwon-code-review-cli 2.1.0 → 2.1.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/lib/chat-mode.js +17 -6
- package/package.json +1 -1
package/lib/chat-mode.js
CHANGED
|
@@ -148,16 +148,27 @@ class ChatMode {
|
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
let filePath;
|
|
152
|
+
|
|
151
153
|
if (matchedFiles.length > 1) {
|
|
152
|
-
console.log(chalk.yellow('\n⚠️ 여러 파일이
|
|
153
|
-
matchedFiles.forEach(file => {
|
|
154
|
-
console.log(chalk.
|
|
154
|
+
console.log(chalk.yellow('\n⚠️ 여러 파일이 매칭됩니다:'));
|
|
155
|
+
matchedFiles.forEach((file, index) => {
|
|
156
|
+
console.log(chalk.cyan(` ${index + 1}. ${file}`));
|
|
155
157
|
});
|
|
156
158
|
console.log('');
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
const answer = await this.askQuestion(`선택 (1-${matchedFiles.length}): `);
|
|
161
|
+
const selection = parseInt(answer);
|
|
162
|
+
|
|
163
|
+
if (isNaN(selection) || selection < 1 || selection > matchedFiles.length) {
|
|
164
|
+
console.log(chalk.red('\n❌ 잘못된 선택입니다.\n'));
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
filePath = matchedFiles[selection - 1];
|
|
169
|
+
} else {
|
|
170
|
+
filePath = matchedFiles[0];
|
|
171
|
+
}
|
|
161
172
|
|
|
162
173
|
// 파일 내용 읽기
|
|
163
174
|
try {
|