yg-team-cli 2.1.3 → 2.1.4
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/cli.js +6 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.js +6 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -455,7 +455,6 @@ var init_claude = __esm({
|
|
|
455
455
|
* 发送 prompt 到 Claude
|
|
456
456
|
*/
|
|
457
457
|
async prompt(promptText, options) {
|
|
458
|
-
const spinner = logger.startLoading("\u6B63\u5728\u8C03\u7528 Claude...");
|
|
459
458
|
try {
|
|
460
459
|
let finalPrompt = promptText;
|
|
461
460
|
const validContextFiles = [];
|
|
@@ -492,21 +491,12 @@ ${promptText}`;
|
|
|
492
491
|
}
|
|
493
492
|
const args = ["-p", finalPrompt];
|
|
494
493
|
const result = await execa("claude", args, {
|
|
495
|
-
stdio:
|
|
496
|
-
timeout: options?.timeout || 3e5
|
|
494
|
+
stdio: "inherit",
|
|
495
|
+
timeout: options?.timeout || 3e5
|
|
497
496
|
// 默认 5 分钟
|
|
498
|
-
reject: false
|
|
499
|
-
// 不自动拒绝非零退出码
|
|
500
497
|
});
|
|
501
|
-
spinner.succeed("Claude \u54CD\u5E94\u5B8C\u6210");
|
|
502
|
-
if (result.exitCode !== 0 && !result.stdout) {
|
|
503
|
-
const stderr = result.stderr || "";
|
|
504
|
-
throw new Error(`Claude \u547D\u4EE4\u6267\u884C\u5931\u8D25 (\u9000\u51FA\u7801: ${result.exitCode})${stderr ? `
|
|
505
|
-
${stderr}` : ""}`);
|
|
506
|
-
}
|
|
507
498
|
return result.stdout || "";
|
|
508
499
|
} catch (error) {
|
|
509
|
-
spinner.fail("Claude \u8C03\u7528\u5931\u8D25");
|
|
510
500
|
if (error.killed && error.signal === "SIGTERM") {
|
|
511
501
|
throw new Error("Claude \u6267\u884C\u8D85\u65F6");
|
|
512
502
|
}
|
|
@@ -2452,12 +2442,14 @@ async function executeDevelopment(specFile, milestone, todo) {
|
|
|
2452
2442
|
const prompt = buildDevPrompt(specFile, milestone, todo, taskDescription);
|
|
2453
2443
|
logger.newLine();
|
|
2454
2444
|
logger.separator("\u2500", 60);
|
|
2455
|
-
logger.info("
|
|
2445
|
+
logger.info("\u5373\u5C06\u8C03\u7528 Claude AI...");
|
|
2456
2446
|
logger.separator("\u2500", 60);
|
|
2457
2447
|
logger.newLine();
|
|
2458
2448
|
logger.info(` \u4EFB\u52A1\u63CF\u8FF0: ${taskDescription}`);
|
|
2459
2449
|
logger.info(` Spec \u6587\u4EF6: ${specFile}`);
|
|
2460
2450
|
logger.newLine();
|
|
2451
|
+
logger.info("\u{1F4DD} Claude \u5C06\u5728\u4E0B\u65B9\u6253\u5F00\u4EA4\u4E92\u754C\u9762\uFF0C\u8BF7\u6309\u7167\u63D0\u793A\u5B8C\u6210\u5F00\u53D1\u4EFB\u52A1");
|
|
2452
|
+
logger.newLine();
|
|
2461
2453
|
const result = await claudeAI.prompt(prompt, {
|
|
2462
2454
|
contextFiles: ["TECH_STACK.md", "CONVENTIONS.md", "AI_MEMORY.md", specFile]
|
|
2463
2455
|
});
|
|
@@ -5873,7 +5865,7 @@ var init_index = __esm({
|
|
|
5873
5865
|
init_config();
|
|
5874
5866
|
init_diff();
|
|
5875
5867
|
program = new Command16();
|
|
5876
|
-
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version("2.1.
|
|
5868
|
+
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version("2.1.4");
|
|
5877
5869
|
program.option("-v, --verbose", "\u8BE6\u7EC6\u8F93\u51FA\u6A21\u5F0F").option("--debug", "\u8C03\u8BD5\u6A21\u5F0F");
|
|
5878
5870
|
program.addCommand(initCommand);
|
|
5879
5871
|
program.addCommand(splitPrdCommand);
|