cciwon-code-review-cli 2.0.7 → 2.0.9
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 +6 -5
- package/lib/diff-viewer.js +6 -1
- package/package.json +1 -1
package/lib/chat-mode.js
CHANGED
|
@@ -160,13 +160,14 @@ class ChatMode {
|
|
|
160
160
|
// 서버에 리뷰 요청
|
|
161
161
|
console.log(chalk.gray(`🚀 서버로 리뷰 요청 중...`));
|
|
162
162
|
const result = await this.client.reviewCode(content, language);
|
|
163
|
-
const reveiwTextOnly =
|
|
164
|
-
parserDiffAndShowInVSCode(result.reivew, filePath);
|
|
165
|
-
console.log(reviewTextOnly);
|
|
166
163
|
console.log(chalk.gray(`✓ 리뷰 완료\n`));
|
|
167
164
|
|
|
168
|
-
//
|
|
169
|
-
|
|
165
|
+
// diff를 파싱하고 VSCode로 표시, 리뷰 텍스트만 반환
|
|
166
|
+
const reviewTextOnly = parseDiffAndShowInVSCode(result.review, filePath);
|
|
167
|
+
|
|
168
|
+
// 결과 출력 (리뷰 텍스트만)
|
|
169
|
+
console.log(chalk.bold.cyan('=== 코드 리뷰 결과 ==='));
|
|
170
|
+
console.log(reviewTextOnly);
|
|
170
171
|
console.log('');
|
|
171
172
|
|
|
172
173
|
} catch (error) {
|
package/lib/diff-viewer.js
CHANGED
|
@@ -88,7 +88,12 @@ function parseDiffAndShowInVSCode(reviewText, originalFilePath) {
|
|
|
88
88
|
execSync(`code --diff "${originalFile}" "${modifiedFile}"`, { stdio: 'ignore' });
|
|
89
89
|
console.log(chalk.green(`\n📝 VSCode에서 diff를 열었습니다 (${index + 1}/${diffs.length})`));
|
|
90
90
|
} catch (e) {
|
|
91
|
-
console.log(chalk.yellow(`\n⚠️ VSCode를 열 수
|
|
91
|
+
console.log(chalk.yellow(`\n⚠️ VSCode를 열 수 없습니다.`));
|
|
92
|
+
console.log(chalk.yellow(`에러: ${e.message}`));
|
|
93
|
+
console.log(chalk.gray(`\n💡 VSCode 'code' 명령어를 설치하세요:`));
|
|
94
|
+
console.log(chalk.gray(` 1. VSCode 열기`));
|
|
95
|
+
console.log(chalk.gray(` 2. Cmd+Shift+P → "Shell Command: Install 'code' command in PATH"`));
|
|
96
|
+
console.log(chalk.gray(`\ndiff 내용:`));
|
|
92
97
|
console.log(chalk.gray(diff.diffLines.join('\n')));
|
|
93
98
|
}
|
|
94
99
|
|