yg-team-cli 2.5.3 → 2.5.5
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 +7 -0
- package/dist/cli.js +29 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -992,6 +992,33 @@ ${promptText}`;
|
|
|
992
992
|
}
|
|
993
993
|
return await this.prompt(promptText, options);
|
|
994
994
|
}
|
|
995
|
+
/**
|
|
996
|
+
* 启动交互式会话
|
|
997
|
+
*/
|
|
998
|
+
async runTerminal(promptText, _options) {
|
|
999
|
+
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
|
+
try {
|
|
1003
|
+
logger.newLine();
|
|
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], {
|
|
1010
|
+
stdio: "inherit",
|
|
1011
|
+
env: { ...process.env, FORCE_COLOR: "1" }
|
|
1012
|
+
});
|
|
1013
|
+
} catch (error) {
|
|
1014
|
+
if (error.signal !== "SIGINT") {
|
|
1015
|
+
throw error;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* 发送对话(支持上下文)
|
|
1021
|
+
*/
|
|
995
1022
|
/**
|
|
996
1023
|
* 发送对话(支持上下文)
|
|
997
1024
|
*/
|
|
@@ -2788,7 +2815,6 @@ async function selectSpec() {
|
|
|
2788
2815
|
logger.newLine();
|
|
2789
2816
|
const choices = sortedSpecs.map((spec, idx) => {
|
|
2790
2817
|
const statusIcon = getStatusIcon(spec.status);
|
|
2791
|
-
const statusColor = getStatusColor(spec.status);
|
|
2792
2818
|
const recommendInfo = idx === 0 ? "[\u63A8\u8350\u4ECE\u8FD9\u5F00\u59CB] " : "";
|
|
2793
2819
|
const depInfo = spec.dependencies.length > 0 ? `[\u4F9D\u8D56: ${spec.dependencies.join(", ")}] ` : "";
|
|
2794
2820
|
return {
|
|
@@ -2923,13 +2949,13 @@ async function executeDevelopment(specFile, milestone, todo) {
|
|
|
2923
2949
|
logger.info(' 2. \u6309 "a" \u63A5\u53D7\u6240\u6709\u7F16\u8F91\u5EFA\u8BAE\uFF0C\u6216\u9010\u4E2A\u9009\u62E9');
|
|
2924
2950
|
logger.info(" 3. \u5B8C\u6210\u540E\u4F7F\u7528 Ctrl+D \u6216\u8F93\u5165 :exit \u9000\u51FA Claude");
|
|
2925
2951
|
logger.newLine();
|
|
2926
|
-
|
|
2952
|
+
await claudeAI.runTerminal(prompt, {
|
|
2927
2953
|
contextFiles: ["TECH_STACK.md", "CONVENTIONS.md", "AI_MEMORY.md", specFile]
|
|
2928
2954
|
});
|
|
2929
2955
|
logger.newLine();
|
|
2930
2956
|
logger.separator("\u2500", 60);
|
|
2931
2957
|
logger.newLine();
|
|
2932
|
-
await generateSessionLog(specFile, milestone, todo, taskDescription,
|
|
2958
|
+
await generateSessionLog(specFile, milestone, todo, taskDescription, "\u4EA4\u4E92\u5F0F\u4F1A\u8BDD\u5DF2\u5B8C\u6210");
|
|
2933
2959
|
await askAndUpdateSpecStatus(specFile, milestone, todo);
|
|
2934
2960
|
logger.header("\u5F00\u53D1\u4EFB\u52A1\u5B8C\u6210!");
|
|
2935
2961
|
logger.success("\u4F1A\u8BDD\u65E5\u5FD7\u5DF2\u4FDD\u5B58");
|
|
@@ -3055,9 +3081,6 @@ function getStatusIcon(status) {
|
|
|
3055
3081
|
return "\u25CB";
|
|
3056
3082
|
}
|
|
3057
3083
|
}
|
|
3058
|
-
function getStatusColor(status) {
|
|
3059
|
-
return status;
|
|
3060
|
-
}
|
|
3061
3084
|
function buildDevPrompt(specFile, milestone, todo, taskDescription) {
|
|
3062
3085
|
return `Role: Senior Fullstack Developer
|
|
3063
3086
|
|