yg-team-cli 2.1.2 → 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 +8 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.js +8 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -892,7 +892,6 @@ var ClaudeAI = class {
|
|
|
892
892
|
* 发送 prompt 到 Claude
|
|
893
893
|
*/
|
|
894
894
|
async prompt(promptText, options) {
|
|
895
|
-
const spinner = logger.startLoading("\u6B63\u5728\u8C03\u7528 Claude...");
|
|
896
895
|
try {
|
|
897
896
|
let finalPrompt = promptText;
|
|
898
897
|
const validContextFiles = [];
|
|
@@ -927,23 +926,14 @@ ${promptText}`;
|
|
|
927
926
|
}
|
|
928
927
|
}
|
|
929
928
|
}
|
|
930
|
-
const args = ["
|
|
929
|
+
const args = ["-p", finalPrompt];
|
|
931
930
|
const result = await execa("claude", args, {
|
|
932
|
-
stdio:
|
|
933
|
-
timeout: options?.timeout || 3e5
|
|
931
|
+
stdio: "inherit",
|
|
932
|
+
timeout: options?.timeout || 3e5
|
|
934
933
|
// 默认 5 分钟
|
|
935
|
-
reject: false
|
|
936
|
-
// 不自动拒绝非零退出码
|
|
937
934
|
});
|
|
938
|
-
spinner.succeed("Claude \u54CD\u5E94\u5B8C\u6210");
|
|
939
|
-
if (result.exitCode !== 0 && !result.stdout) {
|
|
940
|
-
const stderr = result.stderr || "";
|
|
941
|
-
throw new Error(`Claude \u547D\u4EE4\u6267\u884C\u5931\u8D25 (\u9000\u51FA\u7801: ${result.exitCode})${stderr ? `
|
|
942
|
-
${stderr}` : ""}`);
|
|
943
|
-
}
|
|
944
935
|
return result.stdout || "";
|
|
945
936
|
} catch (error) {
|
|
946
|
-
spinner.fail("Claude \u8C03\u7528\u5931\u8D25");
|
|
947
937
|
if (error.killed && error.signal === "SIGTERM") {
|
|
948
938
|
throw new Error("Claude \u6267\u884C\u8D85\u65F6");
|
|
949
939
|
}
|
|
@@ -974,7 +964,7 @@ ${stderr}` : ""}`);
|
|
|
974
964
|
const role = msg.role === "system" ? "\u7CFB\u7EDF\u6307\u4EE4" : `${msg.role === "user" ? "\u7528\u6237" : "\u52A9\u624B"}`;
|
|
975
965
|
return `[${role}]: ${msg.content}`;
|
|
976
966
|
}).join("\n\n");
|
|
977
|
-
const args = ["
|
|
967
|
+
const args = ["-p", fullPrompt];
|
|
978
968
|
const result = await execa("claude", args, {
|
|
979
969
|
stdio: this.verbose ? "inherit" : "pipe",
|
|
980
970
|
timeout: options?.timeout || 3e5,
|
|
@@ -2467,12 +2457,14 @@ async function executeDevelopment(specFile, milestone, todo) {
|
|
|
2467
2457
|
const prompt = buildDevPrompt(specFile, milestone, todo, taskDescription);
|
|
2468
2458
|
logger.newLine();
|
|
2469
2459
|
logger.separator("\u2500", 60);
|
|
2470
|
-
logger.info("
|
|
2460
|
+
logger.info("\u5373\u5C06\u8C03\u7528 Claude AI...");
|
|
2471
2461
|
logger.separator("\u2500", 60);
|
|
2472
2462
|
logger.newLine();
|
|
2473
2463
|
logger.info(` \u4EFB\u52A1\u63CF\u8FF0: ${taskDescription}`);
|
|
2474
2464
|
logger.info(` Spec \u6587\u4EF6: ${specFile}`);
|
|
2475
2465
|
logger.newLine();
|
|
2466
|
+
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");
|
|
2467
|
+
logger.newLine();
|
|
2476
2468
|
const result = await claudeAI.prompt(prompt, {
|
|
2477
2469
|
contextFiles: ["TECH_STACK.md", "CONVENTIONS.md", "AI_MEMORY.md", specFile]
|
|
2478
2470
|
});
|
|
@@ -5693,7 +5685,7 @@ var Table = class {
|
|
|
5693
5685
|
|
|
5694
5686
|
// src/index.ts
|
|
5695
5687
|
var program = new Command16();
|
|
5696
|
-
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version("2.1.
|
|
5688
|
+
program.name("team-cli").description("AI-Native \u56E2\u961F\u7814\u53D1\u811A\u624B\u67B6").version("2.1.4");
|
|
5697
5689
|
program.option("-v, --verbose", "\u8BE6\u7EC6\u8F93\u51FA\u6A21\u5F0F").option("--debug", "\u8C03\u8BD5\u6A21\u5F0F");
|
|
5698
5690
|
program.addCommand(initCommand);
|
|
5699
5691
|
program.addCommand(splitPrdCommand);
|