sales-frontend-gemini-cli 0.4.3 → 0.5.0
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/common/helper.cjs +227 -20
- package/dist/common/helper.cjs.map +1 -1
- package/dist/common/helper.d.cts +30 -1
- package/dist/common/helper.d.ts +30 -1
- package/dist/common/helper.js +226 -21
- package/dist/common/helper.js.map +1 -1
- package/dist/common/types.d.cts +3 -1
- package/dist/common/types.d.ts +3 -1
- package/dist/pr-review/claude/claude-commander.cjs +10 -3
- package/dist/pr-review/claude/claude-commander.cjs.map +1 -1
- package/dist/pr-review/claude/claude-commander.js +10 -3
- package/dist/pr-review/claude/claude-commander.js.map +1 -1
- package/dist/pr-review/claude/installation-claude.cjs +1 -1
- package/dist/pr-review/claude/installation-claude.cjs.map +1 -1
- package/dist/pr-review/claude/installation-claude.js +1 -1
- package/dist/pr-review/claude/installation-claude.js.map +1 -1
- package/dist/pr-review/codex/codex-commander.cjs +14 -4
- package/dist/pr-review/codex/codex-commander.cjs.map +1 -1
- package/dist/pr-review/codex/codex-commander.d.cts +1 -1
- package/dist/pr-review/codex/codex-commander.d.ts +1 -1
- package/dist/pr-review/codex/codex-commander.js +14 -4
- package/dist/pr-review/codex/codex-commander.js.map +1 -1
- package/dist/pr-review/codex/installation-codex.cjs +1 -1
- package/dist/pr-review/codex/installation-codex.cjs.map +1 -1
- package/dist/pr-review/codex/installation-codex.js +1 -1
- package/dist/pr-review/codex/installation-codex.js.map +1 -1
- package/dist/pr-review/gemini/gemini-commander.cjs +12 -12
- package/dist/pr-review/gemini/gemini-commander.cjs.map +1 -1
- package/dist/pr-review/gemini/gemini-commander.js +12 -12
- package/dist/pr-review/gemini/gemini-commander.js.map +1 -1
- package/dist/pr-review/gemini/installation-gemini.cjs +1 -1
- package/dist/pr-review/gemini/installation-gemini.cjs.map +1 -1
- package/dist/pr-review/gemini/installation-gemini.js +1 -1
- package/dist/pr-review/gemini/installation-gemini.js.map +1 -1
- package/dist/pr-review/review-one-by-one.cjs +296 -42
- package/dist/pr-review/review-one-by-one.cjs.map +1 -1
- package/dist/pr-review/review-one-by-one.js +296 -42
- package/dist/pr-review/review-one-by-one.js.map +1 -1
- package/dist/pr-review/review.cjs +327 -42
- package/dist/pr-review/review.cjs.map +1 -1
- package/dist/pr-review/review.js +327 -42
- package/dist/pr-review/review.js.map +1 -1
- package/package.json +1 -1
package/dist/common/helper.js
CHANGED
|
@@ -71,6 +71,9 @@ var ignoreList = [
|
|
|
71
71
|
function isTestMode(args = process.argv.slice(2)) {
|
|
72
72
|
return args.includes("--test");
|
|
73
73
|
}
|
|
74
|
+
function shouldStreamAIOutput(args = process.argv.slice(2)) {
|
|
75
|
+
return args.includes("--stream-output");
|
|
76
|
+
}
|
|
74
77
|
function clearTraceMessages() {
|
|
75
78
|
traceMessages.length = 0;
|
|
76
79
|
}
|
|
@@ -197,15 +200,51 @@ function runGitCommand(args, options = {}) {
|
|
|
197
200
|
throw error;
|
|
198
201
|
}
|
|
199
202
|
}
|
|
203
|
+
function resolveShellLaunchConfig() {
|
|
204
|
+
const candidates = [];
|
|
205
|
+
const seen = /* @__PURE__ */ new Set();
|
|
206
|
+
const appendCandidate = (executable, shellArgs) => {
|
|
207
|
+
const normalizedExecutable = executable?.trim();
|
|
208
|
+
if (!normalizedExecutable) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (path.isAbsolute(normalizedExecutable) && !fs.existsSync(normalizedExecutable)) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const key = `${normalizedExecutable}::${shellArgs.join("\0")}`;
|
|
215
|
+
if (seen.has(key)) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
seen.add(key);
|
|
219
|
+
candidates.push({
|
|
220
|
+
executable: normalizedExecutable,
|
|
221
|
+
shellArgs
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
const shellFromEnv = process.env.SHELL?.trim();
|
|
225
|
+
const envShellName = shellFromEnv ? path.basename(shellFromEnv) : "";
|
|
226
|
+
if (["bash", "zsh", "ksh"].includes(envShellName)) {
|
|
227
|
+
appendCandidate(shellFromEnv, ["-lc"]);
|
|
228
|
+
}
|
|
229
|
+
["/bin/bash", "/usr/bin/bash", "bash", "/bin/zsh", "/usr/bin/zsh", "zsh"].forEach((shellPath) => {
|
|
230
|
+
appendCandidate(shellPath, ["-lc"]);
|
|
231
|
+
});
|
|
232
|
+
["/bin/sh", "/usr/bin/sh", "sh"].forEach((shellPath) => {
|
|
233
|
+
appendCandidate(shellPath, ["-c"]);
|
|
234
|
+
});
|
|
235
|
+
return candidates[0] || { executable: "sh", shellArgs: ["-c"] };
|
|
236
|
+
}
|
|
200
237
|
async function executeShellCommandWithProgress(command, options = {}) {
|
|
201
238
|
const { progressIntervalMs = 1e4, progressMessage = "\u23F3 \uBA85\uB839\uC744 \uC2E4\uD589\uD558\uB294 \uC911\uC785\uB2C8\uB2E4...", streamOutput = false } = options;
|
|
202
239
|
const { spawn } = await import('child_process');
|
|
240
|
+
const shellLaunchConfig = resolveShellLaunchConfig();
|
|
203
241
|
return new Promise((resolve, reject) => {
|
|
204
242
|
let stdout = "";
|
|
205
243
|
let stderr = "";
|
|
206
244
|
const startedAt = Date.now();
|
|
207
245
|
console.log(progressMessage);
|
|
208
|
-
|
|
246
|
+
helperTrace("shell-command:launcher", `${shellLaunchConfig.executable} ${shellLaunchConfig.shellArgs.join(" ")}`);
|
|
247
|
+
const child = spawn(shellLaunchConfig.executable, [...shellLaunchConfig.shellArgs, command], {
|
|
209
248
|
stdio: ["ignore", "pipe", "pipe"]
|
|
210
249
|
});
|
|
211
250
|
const progressTimer = setInterval(() => {
|
|
@@ -240,11 +279,41 @@ async function executeShellCommandWithProgress(command, options = {}) {
|
|
|
240
279
|
return;
|
|
241
280
|
}
|
|
242
281
|
const exitSummary = signal ? `signal=${signal}` : `code=${String(code ?? "unknown")}`;
|
|
243
|
-
|
|
244
|
-
|
|
282
|
+
const failureDetails = {
|
|
283
|
+
code,
|
|
284
|
+
command,
|
|
285
|
+
signal,
|
|
286
|
+
stderr,
|
|
287
|
+
stdout
|
|
288
|
+
};
|
|
289
|
+
reject(createShellCommandExecutionError(failureDetails, exitSummary));
|
|
245
290
|
});
|
|
246
291
|
});
|
|
247
292
|
}
|
|
293
|
+
function getShellCommandFailurePreview(failureDetails) {
|
|
294
|
+
const stderrText = failureDetails.stderr.trim();
|
|
295
|
+
const stdoutText = failureDetails.stdout.trim();
|
|
296
|
+
const combinedOutput = stderrText || stdoutText;
|
|
297
|
+
if (!combinedOutput) {
|
|
298
|
+
return "";
|
|
299
|
+
}
|
|
300
|
+
const MAX_PREVIEW_LENGTH = 4e3;
|
|
301
|
+
if (combinedOutput.length <= MAX_PREVIEW_LENGTH) {
|
|
302
|
+
return combinedOutput;
|
|
303
|
+
}
|
|
304
|
+
return combinedOutput.slice(-4e3);
|
|
305
|
+
}
|
|
306
|
+
function createShellCommandExecutionError(failureDetails, exitSummary) {
|
|
307
|
+
const failurePreview = getShellCommandFailurePreview(failureDetails);
|
|
308
|
+
const error = new Error(`\uC258 \uBA85\uB839 \uC2E4\uD589 \uC2E4\uD328 (${exitSummary})${failurePreview ? `
|
|
309
|
+
${failurePreview}` : ""}`);
|
|
310
|
+
error.code = failureDetails.code;
|
|
311
|
+
error.signal = failureDetails.signal;
|
|
312
|
+
error.stdout = failureDetails.stdout;
|
|
313
|
+
error.stderr = failureDetails.stderr;
|
|
314
|
+
error.command = failureDetails.command;
|
|
315
|
+
return error;
|
|
316
|
+
}
|
|
248
317
|
function formatReviewTargetFiles(files, visibleCount = 5) {
|
|
249
318
|
if (files.length === 0) {
|
|
250
319
|
return "(\uC5C6\uC74C)";
|
|
@@ -317,7 +386,7 @@ function serializeError(error) {
|
|
|
317
386
|
}
|
|
318
387
|
if (error && typeof error === "object") {
|
|
319
388
|
const errorLike = error;
|
|
320
|
-
const extraKeys = ["code", "errno", "syscall", "path", "cmd", "status", "signal", "spawnargs"];
|
|
389
|
+
const extraKeys = ["code", "errno", "syscall", "path", "cmd", "status", "signal", "spawnargs", "command"];
|
|
321
390
|
extraKeys.forEach((key) => {
|
|
322
391
|
if (errorLike[key] !== void 0) {
|
|
323
392
|
serialized[key] = errorLike[key];
|
|
@@ -423,6 +492,87 @@ ${section.markdown}`).join("\n")}
|
|
|
423
492
|
return "";
|
|
424
493
|
}
|
|
425
494
|
}
|
|
495
|
+
function getExecutionLogSummary(status, title) {
|
|
496
|
+
if (title) {
|
|
497
|
+
return title;
|
|
498
|
+
}
|
|
499
|
+
switch (status) {
|
|
500
|
+
case "success":
|
|
501
|
+
return "\uB9AC\uBDF0 \uC2E4\uD589\uC774 \uC131\uACF5\uC801\uC73C\uB85C \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.";
|
|
502
|
+
case "failed":
|
|
503
|
+
return "\uB9AC\uBDF0 \uC2E4\uD589 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.";
|
|
504
|
+
case "partial_failure":
|
|
505
|
+
return "\uB9AC\uBDF0 \uC2E4\uD589\uC740 \uC644\uB8CC\uB418\uC5C8\uC9C0\uB9CC \uC77C\uBD80 \uB2E8\uACC4\uC5D0\uC11C \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.";
|
|
506
|
+
default:
|
|
507
|
+
return "\uB9AC\uBDF0 \uC2E4\uD589\uC774 \uCDE8\uC18C\uB418\uC5C8\uAC70\uB098 \uB9AC\uBDF0 \uB300\uC0C1\uC774 \uC5C6\uC5B4 \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.";
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function formatExecutionDuration(startedAt, finishedAt) {
|
|
511
|
+
const durationMs = Math.max(0, finishedAt.getTime() - startedAt.getTime());
|
|
512
|
+
if (durationMs < 1e3) {
|
|
513
|
+
return `${durationMs}ms`;
|
|
514
|
+
}
|
|
515
|
+
const durationSeconds = durationMs / 1e3;
|
|
516
|
+
if (durationSeconds < 60) {
|
|
517
|
+
return `${durationSeconds.toFixed(1)}s`;
|
|
518
|
+
}
|
|
519
|
+
const minutes = Math.floor(durationSeconds / 60);
|
|
520
|
+
const seconds = Math.round(durationSeconds % 60);
|
|
521
|
+
return `${minutes}m ${seconds}s`;
|
|
522
|
+
}
|
|
523
|
+
function writeExecutionLog(options = {}) {
|
|
524
|
+
try {
|
|
525
|
+
const startedAt = options.startedAt ?? /* @__PURE__ */ new Date();
|
|
526
|
+
const finishedAt = options.finishedAt ?? /* @__PURE__ */ new Date();
|
|
527
|
+
const status = options.status ?? "success";
|
|
528
|
+
helperTrace("execution-log:write:start", options.scope || "unknown");
|
|
529
|
+
createReportDirectory();
|
|
530
|
+
const reportPath = getAvailableFilePath(REPORT_DIR, `${getNowString(finishedAt)}-execution-log`, ".md");
|
|
531
|
+
const traceSnapshot = options.traceMessages ?? getTraceMessages();
|
|
532
|
+
const extraSections = options.extraSections || [];
|
|
533
|
+
const serializedError = options.error ? serializeError(options.error) : null;
|
|
534
|
+
const report = `# Execution Log
|
|
535
|
+
|
|
536
|
+
- \uC2DC\uC791 \uC2DC\uAC01: ${getHumanReadableNowString(startedAt)}
|
|
537
|
+
- \uC885\uB8CC \uC2DC\uAC01: ${getHumanReadableNowString(finishedAt)}
|
|
538
|
+
- \uC2E4\uD589 \uC2DC\uAC04: ${formatExecutionDuration(startedAt, finishedAt)}
|
|
539
|
+
- \uC0C1\uD0DC: \`${status}\`
|
|
540
|
+
- Scope: \`${options.scope || "unknown"}\`
|
|
541
|
+
- \uC791\uC5C5 \uACBD\uB85C: \`${process.cwd()}\`
|
|
542
|
+
- \uC2E4\uD589 \uC778\uC790: \`${JSON.stringify(options.args ?? process.argv.slice(2))}\`
|
|
543
|
+
- \uC2E4\uD589 \uD658\uACBD: \`${process.platform} ${process.arch} / Node ${process.version}\`
|
|
544
|
+
|
|
545
|
+
## Summary
|
|
546
|
+
|
|
547
|
+
${getExecutionLogSummary(status, options.title)}
|
|
548
|
+
${serializedError ? `
|
|
549
|
+
|
|
550
|
+
## Error
|
|
551
|
+
|
|
552
|
+
\`\`\`json
|
|
553
|
+
${JSON.stringify(serializedError, null, 2)}
|
|
554
|
+
\`\`\`` : ""}
|
|
555
|
+
|
|
556
|
+
## Trace
|
|
557
|
+
|
|
558
|
+
\`\`\`json
|
|
559
|
+
${JSON.stringify(traceSnapshot, null, 2)}
|
|
560
|
+
\`\`\`${extraSections.length ? `
|
|
561
|
+
${extraSections.map((section) => `
|
|
562
|
+
## ${section.heading}
|
|
563
|
+
|
|
564
|
+
${section.markdown}`).join("\n")}
|
|
565
|
+
` : "\n"}
|
|
566
|
+
`;
|
|
567
|
+
fs.writeFileSync(reportPath, report);
|
|
568
|
+
helperTrace("execution-log:write:done", reportPath);
|
|
569
|
+
return reportPath;
|
|
570
|
+
} catch (writeError) {
|
|
571
|
+
console.error("\u26A0\uFE0F \uC2E4\uD589 \uB85C\uADF8 \uD30C\uC77C \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.");
|
|
572
|
+
console.error(writeError);
|
|
573
|
+
return "";
|
|
574
|
+
}
|
|
575
|
+
}
|
|
426
576
|
function exitWithError(message, options = {}) {
|
|
427
577
|
const reportPath = writeErrorReport(options.error || new Error(message), {
|
|
428
578
|
...options,
|
|
@@ -480,6 +630,62 @@ function truncateCommitSubject(subject) {
|
|
|
480
630
|
}
|
|
481
631
|
return `${subject.slice(0, 69)}...`;
|
|
482
632
|
}
|
|
633
|
+
function formatReviewTargetFileCount(fileCount) {
|
|
634
|
+
return fileCount === 0 ? "\uBCC0\uACBD \uC5C6\uC74C" : `${fileCount}\uAC1C \uD30C\uC77C`;
|
|
635
|
+
}
|
|
636
|
+
function buildReviewTargetSectionTitle(target) {
|
|
637
|
+
return target.kind === "commit" ? `${target.hash} ${target.subject}` : `${target.hash} | ${target.subject}`;
|
|
638
|
+
}
|
|
639
|
+
function buildReviewTargetSummaryLine(target) {
|
|
640
|
+
if (target.kind === "commit") {
|
|
641
|
+
return `- ${target.hash} | ${target.subject} | ${target.author} | ${target.relativeDate}`;
|
|
642
|
+
}
|
|
643
|
+
return `- ${target.hash} | ${target.subject}`;
|
|
644
|
+
}
|
|
645
|
+
function buildReviewTargetDiffArgs(target, filePath) {
|
|
646
|
+
const reviewPathspecArgs = getReviewPathspecArgs();
|
|
647
|
+
if (target.kind === "commit") {
|
|
648
|
+
return filePath ? ["show", "--stat", "--patch", "--format=", target.hash, "--", filePath] : ["show", "--stat", "--patch", "--format=", target.hash, "--", ...reviewPathspecArgs];
|
|
649
|
+
}
|
|
650
|
+
const diffArgs = ["diff"];
|
|
651
|
+
if (target.kind === "staged") {
|
|
652
|
+
diffArgs.push("--cached");
|
|
653
|
+
}
|
|
654
|
+
diffArgs.push("--stat", "--patch", "--");
|
|
655
|
+
return filePath ? [...diffArgs, filePath] : [...diffArgs, ...reviewPathspecArgs];
|
|
656
|
+
}
|
|
657
|
+
function buildReviewTargetFileArgs(target) {
|
|
658
|
+
const reviewPathspecArgs = getReviewPathspecArgs();
|
|
659
|
+
if (target.kind === "commit") {
|
|
660
|
+
return ["show", "--pretty=format:", "--name-only", target.hash, "--", ...reviewPathspecArgs];
|
|
661
|
+
}
|
|
662
|
+
const diffArgs = ["diff"];
|
|
663
|
+
if (target.kind === "staged") {
|
|
664
|
+
diffArgs.push("--cached");
|
|
665
|
+
}
|
|
666
|
+
return [...diffArgs, "--name-only", "--", ...reviewPathspecArgs];
|
|
667
|
+
}
|
|
668
|
+
function getReviewTargetFiles(target) {
|
|
669
|
+
const output = runGitCommand(buildReviewTargetFileArgs(target), {
|
|
670
|
+
allowFailure: true
|
|
671
|
+
});
|
|
672
|
+
return output.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
673
|
+
}
|
|
674
|
+
function createWorkingTreeReviewOption(kind) {
|
|
675
|
+
const files = getReviewTargetFiles({
|
|
676
|
+
hash: kind,
|
|
677
|
+
kind});
|
|
678
|
+
const subject = kind === "unstaged" ? "\uC544\uC9C1 git add \uD558\uC9C0 \uC54A\uC740 \uBCC0\uACBD\uC0AC\uD56D" : "git add \uB41C \uBCC0\uACBD\uC0AC\uD56D";
|
|
679
|
+
return {
|
|
680
|
+
author: "",
|
|
681
|
+
description: `${subject} | ${formatReviewTargetFileCount(files.length)}`,
|
|
682
|
+
hash: kind,
|
|
683
|
+
kind,
|
|
684
|
+
label: kind,
|
|
685
|
+
relativeDate: "",
|
|
686
|
+
subject
|
|
687
|
+
};
|
|
688
|
+
}
|
|
483
689
|
function getRecentCommitOptions() {
|
|
484
690
|
const output = runGitCommand(
|
|
485
691
|
["log", `-${COMMIT_FETCH_LIMIT}`, "--date=relative", "--pretty=format:%h%x09%an%x09%ar%x09%s"],
|
|
@@ -495,62 +701,61 @@ function getRecentCommitOptions() {
|
|
|
495
701
|
author,
|
|
496
702
|
description: `${author} | ${relativeDate}`,
|
|
497
703
|
hash,
|
|
704
|
+
kind: "commit",
|
|
498
705
|
label: `${hash} | ${truncateCommitSubject(subject)}`,
|
|
499
706
|
relativeDate,
|
|
500
707
|
subject
|
|
501
708
|
};
|
|
502
709
|
});
|
|
503
710
|
}
|
|
711
|
+
function getReviewTargetOptions() {
|
|
712
|
+
return [createWorkingTreeReviewOption("unstaged"), createWorkingTreeReviewOption("staged"), ...getRecentCommitOptions()];
|
|
713
|
+
}
|
|
504
714
|
function buildSelectedCommitSummary(commits) {
|
|
505
|
-
return commits.map((commit) =>
|
|
715
|
+
return commits.map((commit) => buildReviewTargetSummaryLine(commit)).join("\n");
|
|
506
716
|
}
|
|
507
717
|
function getReviewPathspecArgs() {
|
|
508
718
|
const { includePatterns, excludePatterns } = getGitDiffPathspecs();
|
|
509
719
|
return [...includePatterns, ...excludePatterns];
|
|
510
720
|
}
|
|
511
721
|
function buildSelectedCommitDiff(commits) {
|
|
512
|
-
const reviewPathspecArgs = getReviewPathspecArgs();
|
|
513
722
|
const sections = commits.map((commit) => {
|
|
514
|
-
const diff = runGitCommand(
|
|
723
|
+
const diff = runGitCommand(buildReviewTargetDiffArgs(commit), {
|
|
515
724
|
allowFailure: true,
|
|
516
725
|
trimOutput: false
|
|
517
726
|
}).trim();
|
|
518
727
|
if (!diff) {
|
|
519
728
|
return "";
|
|
520
729
|
}
|
|
521
|
-
return [`## ${commit
|
|
730
|
+
return [`## ${buildReviewTargetSectionTitle(commit)}`, diff].join("\n\n");
|
|
522
731
|
}).filter(Boolean).join("\n\n");
|
|
523
732
|
if (!sections) {
|
|
524
733
|
return "";
|
|
525
734
|
}
|
|
526
|
-
return ["# \uC120\uD0DD\uD55C \
|
|
735
|
+
return ["# \uC120\uD0DD\uD55C \uB9AC\uBDF0 \uB300\uC0C1", buildSelectedCommitSummary(commits), "", "# \uB9AC\uBDF0 \uB300\uC0C1 diff", sections].join("\n");
|
|
527
736
|
}
|
|
528
737
|
function getSelectedCommitFiles(commits) {
|
|
529
|
-
const reviewPathspecArgs = getReviewPathspecArgs();
|
|
530
738
|
const files = /* @__PURE__ */ new Set();
|
|
531
739
|
commits.forEach((commit) => {
|
|
532
|
-
|
|
533
|
-
allowFailure: true
|
|
534
|
-
});
|
|
535
|
-
output.split("\n").map((line) => line.trim()).filter(Boolean).forEach((filePath) => files.add(filePath));
|
|
740
|
+
getReviewTargetFiles(commit).forEach((filePath) => files.add(filePath));
|
|
536
741
|
});
|
|
537
742
|
return [...files];
|
|
538
743
|
}
|
|
539
744
|
function buildSelectedFileDiff(commits, filePath) {
|
|
540
745
|
const sections = commits.map((commit) => {
|
|
541
|
-
const diff = runGitCommand(
|
|
746
|
+
const diff = runGitCommand(buildReviewTargetDiffArgs(commit, filePath), {
|
|
542
747
|
allowFailure: true,
|
|
543
748
|
trimOutput: false
|
|
544
749
|
}).trim();
|
|
545
750
|
if (!diff) {
|
|
546
751
|
return "";
|
|
547
752
|
}
|
|
548
|
-
return [`## ${commit
|
|
753
|
+
return [`## ${buildReviewTargetSectionTitle(commit)}`, diff].join("\n\n");
|
|
549
754
|
}).filter(Boolean).join("\n\n");
|
|
550
755
|
if (!sections) {
|
|
551
756
|
return "";
|
|
552
757
|
}
|
|
553
|
-
return ["# \uC120\uD0DD\uD55C \
|
|
758
|
+
return ["# \uC120\uD0DD\uD55C \uB9AC\uBDF0 \uB300\uC0C1", buildSelectedCommitSummary(commits), "", `# \uD30C\uC77C: ${filePath}`, sections].join("\n\n");
|
|
554
759
|
}
|
|
555
760
|
function openReport(reportPath) {
|
|
556
761
|
const resolvedPath = path.resolve(reportPath);
|
|
@@ -736,13 +941,13 @@ async function showMultiSelect(question, options, windowSize = COMMIT_SELECTION_
|
|
|
736
941
|
});
|
|
737
942
|
}
|
|
738
943
|
async function selectReviewCommits() {
|
|
739
|
-
const commits =
|
|
944
|
+
const commits = getReviewTargetOptions();
|
|
740
945
|
if (commits.length === 0) {
|
|
741
|
-
console.log("\u2139\uFE0F \uB9AC\uBDF0\uD560 \
|
|
946
|
+
console.log("\u2139\uFE0F \uB9AC\uBDF0\uD560 \uB300\uC0C1\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.");
|
|
742
947
|
return [];
|
|
743
948
|
}
|
|
744
949
|
return showMultiSelect(
|
|
745
|
-
"\uB9AC\uBDF0\uD560 \
|
|
950
|
+
"\uB9AC\uBDF0\uD560 \uB300\uC0C1\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.",
|
|
746
951
|
commits.map((commit) => ({
|
|
747
952
|
description: commit.description,
|
|
748
953
|
label: commit.label,
|
|
@@ -839,6 +1044,6 @@ async function showSelectionAIService() {
|
|
|
839
1044
|
});
|
|
840
1045
|
}
|
|
841
1046
|
|
|
842
|
-
export { AIServices, COMMIT_FETCH_LIMIT, COMMIT_SELECTION_WINDOW, REPORT_DIR, buildSelectedCommitDiff, buildSelectedCommitSummary, buildSelectedFileDiff, clearTraceMessages, codingConventionRulesPath, createReportDirectory, createTraceLogger, deleteFile, deleteTempDiff, executeShellCommandWithProgress, exitWithError, formatReviewTargetFiles, getAvailableFilePath, getErrorLogTimestamp, getErrorSummary, getGitDiffFilter, getNextFilePath, getNowString, getRecentCommitOptions, getSelectedCommitFiles, getTraceMessages, ignoreList, isTestMode, namingRulesPath, openReport, reviewFormOneByOnePath, reviewFormPath, rulesPath, selectAIService, selectReviewCommits, showMultiSelect, showSelectionAIService, tempDiffPath, writeErrorReport };
|
|
1047
|
+
export { AIServices, COMMIT_FETCH_LIMIT, COMMIT_SELECTION_WINDOW, REPORT_DIR, buildSelectedCommitDiff, buildSelectedCommitSummary, buildSelectedFileDiff, clearTraceMessages, codingConventionRulesPath, createReportDirectory, createTraceLogger, deleteFile, deleteTempDiff, executeShellCommandWithProgress, exitWithError, formatReviewTargetFiles, getAvailableFilePath, getErrorLogTimestamp, getErrorSummary, getGitDiffFilter, getNextFilePath, getNowString, getRecentCommitOptions, getSelectedCommitFiles, getTraceMessages, ignoreList, isTestMode, namingRulesPath, openReport, reviewFormOneByOnePath, reviewFormPath, rulesPath, selectAIService, selectReviewCommits, shouldStreamAIOutput, showMultiSelect, showSelectionAIService, tempDiffPath, writeErrorReport, writeExecutionLog };
|
|
843
1048
|
//# sourceMappingURL=helper.js.map
|
|
844
1049
|
//# sourceMappingURL=helper.js.map
|