yg-team-cli 2.5.5 → 2.5.7
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/README.md +8 -0
- package/dist/cli.js +5 -21
- package/dist/cli.js.map +1 -1
- package/dist/index.js +5 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -902,13 +902,10 @@ var ClaudeAI = class {
|
|
|
902
902
|
constructor(verbose = false) {
|
|
903
903
|
this.verbose = verbose;
|
|
904
904
|
}
|
|
905
|
-
/**
|
|
906
|
-
* 检查 Claude CLI 是否已安装
|
|
907
|
-
*/
|
|
908
905
|
async checkInstalled() {
|
|
909
906
|
try {
|
|
910
|
-
await execa("
|
|
911
|
-
return
|
|
907
|
+
const { exitCode } = await execa("which", ["claude"], { stdio: "ignore", reject: false });
|
|
908
|
+
return exitCode === 0;
|
|
912
909
|
} catch {
|
|
913
910
|
return false;
|
|
914
911
|
}
|
|
@@ -995,18 +992,10 @@ ${promptText}`;
|
|
|
995
992
|
/**
|
|
996
993
|
* 启动交互式会话
|
|
997
994
|
*/
|
|
998
|
-
async runTerminal(promptText
|
|
995
|
+
async runTerminal(promptText) {
|
|
999
996
|
logger.info("\u6B63\u5728\u542F\u52A8\u4EA4\u4E92\u5F0F Claude \u4F1A\u8BDD...");
|
|
1000
|
-
const args = ["--dangerously-skip-permissions"];
|
|
1001
|
-
args.push("--add-dir", process.cwd());
|
|
1002
997
|
try {
|
|
1003
|
-
|
|
1004
|
-
logger.info("\u590D\u5236\u4EE5\u4E0B\u6307\u4EE4\u53D1\u9001\u7ED9 Claude:");
|
|
1005
|
-
logger.separator("-", 20);
|
|
1006
|
-
console.log(promptText);
|
|
1007
|
-
logger.separator("-", 20);
|
|
1008
|
-
logger.newLine();
|
|
1009
|
-
await execa("claude", [...args, promptText], {
|
|
998
|
+
await execa("claude", ["--dangerously-skip-permissions", promptText], {
|
|
1010
999
|
stdio: "inherit",
|
|
1011
1000
|
env: { ...process.env, FORCE_COLOR: "1" }
|
|
1012
1001
|
});
|
|
@@ -1016,9 +1005,6 @@ ${promptText}`;
|
|
|
1016
1005
|
}
|
|
1017
1006
|
}
|
|
1018
1007
|
}
|
|
1019
|
-
/**
|
|
1020
|
-
* 发送对话(支持上下文)
|
|
1021
|
-
*/
|
|
1022
1008
|
/**
|
|
1023
1009
|
* 发送对话(支持上下文)
|
|
1024
1010
|
*/
|
|
@@ -2949,9 +2935,7 @@ async function executeDevelopment(specFile, milestone, todo) {
|
|
|
2949
2935
|
logger.info(' 2. \u6309 "a" \u63A5\u53D7\u6240\u6709\u7F16\u8F91\u5EFA\u8BAE\uFF0C\u6216\u9010\u4E2A\u9009\u62E9');
|
|
2950
2936
|
logger.info(" 3. \u5B8C\u6210\u540E\u4F7F\u7528 Ctrl+D \u6216\u8F93\u5165 :exit \u9000\u51FA Claude");
|
|
2951
2937
|
logger.newLine();
|
|
2952
|
-
await claudeAI.runTerminal(prompt
|
|
2953
|
-
contextFiles: ["TECH_STACK.md", "CONVENTIONS.md", "AI_MEMORY.md", specFile]
|
|
2954
|
-
});
|
|
2938
|
+
await claudeAI.runTerminal(prompt);
|
|
2955
2939
|
logger.newLine();
|
|
2956
2940
|
logger.separator("\u2500", 60);
|
|
2957
2941
|
logger.newLine();
|