kodevu 0.1.62 → 0.1.63
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/package.json +1 -1
- package/src/config.js +6 -6
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -139,7 +139,7 @@ async function resolveAutoReviewers(debug) {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
if (availableReviewers.length === 0) {
|
|
142
|
-
throw
|
|
142
|
+
throw mkCliError(`No reviewer CLI found in PATH. Install one of: ${AUTO_SUPPORTED_REVIEWERS.join(", ")}`);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// Shuffle for variety
|
|
@@ -335,11 +335,11 @@ export async function resolveConfig(cliArgs = {}) {
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
if (cliArgs.rev && cliArgs.last) {
|
|
338
|
-
throw
|
|
338
|
+
throw mkCliError("Parameters --rev and --last are mutually exclusive. Please specify only one.");
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
if (cliArgs.uncommitted && (cliArgs.rev || cliArgs.last)) {
|
|
342
|
-
throw
|
|
342
|
+
throw mkCliError("Parameter --uncommitted is mutually exclusive with --rev and --last.");
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
if (!config.target) {
|
|
@@ -358,7 +358,7 @@ export async function resolveConfig(cliArgs = {}) {
|
|
|
358
358
|
try {
|
|
359
359
|
config.prompt = await fs.readFile(promptPath, "utf8");
|
|
360
360
|
} catch (err) {
|
|
361
|
-
throw
|
|
361
|
+
throw mkCliError(`Failed to read prompt file: ${promptPath} (${err.message})`);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
|
|
@@ -370,7 +370,7 @@ export async function resolveConfig(cliArgs = {}) {
|
|
|
370
370
|
config.fallbackReviewers = availableReviewers.map(r => r.reviewerName).slice(1);
|
|
371
371
|
config.reviewerWasAutoSelected = true;
|
|
372
372
|
} else if (!SUPPORTED_REVIEWERS.includes(config.reviewer)) {
|
|
373
|
-
throw
|
|
373
|
+
throw mkCliError(`"reviewer" must be one of: ${SUPPORTED_REVIEWERS.join(", ")}, or "auto"`);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
config.outputDir = resolvePath(config.outputDir);
|
|
@@ -391,7 +391,7 @@ export async function resolveConfig(cliArgs = {}) {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
if (config.reviewer === "openai" && !config.openaiApiKey) {
|
|
394
|
-
throw
|
|
394
|
+
throw mkCliError('Reviewer "openai" requires an API key. Set KODEVU_OPENAI_API_KEY or pass --openai-api-key.');
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
return config;
|