yg-team-cli 2.5.3 → 2.5.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/README.md +4 -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/README.md
CHANGED
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
- **改进**: `breakdown` 现在仅请求生成里程碑部分,并精确合并到原 Spec 文件
|
|
51
51
|
- **修复**: 解决了 `breakdown` 命令可能会覆盖原文件技术设计内容的问题 (防止 Claude 的内容截断)
|
|
52
52
|
|
|
53
|
+
**v2.5.4** - 修复 dev 模式交互卡死问题
|
|
54
|
+
- **修复**: `dev` 命令现在真正进入交互式 Claude Code 会话,解决之前因非交互模式导致的长时间无反馈和卡死问题
|
|
55
|
+
- **改进**: `ClaudeAI` 类新增 `runTerminal` 方法支持 `stdio: 'inherit'` 交互模式
|
|
56
|
+
|
|
53
57
|
**v2.4.10** - 修复 Claude 返回权限确认而非实际内容问题
|
|
54
58
|
- **修复**: 添加 `--dangerously-skip-permissions` 参数跳过权限确认
|
|
55
59
|
- **问题**: v2.4.9 中 Claude CLI 在新目录首次运行时返回权限确认提示而非 spec 内容
|
package/dist/cli.js
CHANGED
|
@@ -544,6 +544,33 @@ ${promptText}`;
|
|
|
544
544
|
}
|
|
545
545
|
return await this.prompt(promptText, options);
|
|
546
546
|
}
|
|
547
|
+
/**
|
|
548
|
+
* 启动交互式会话
|
|
549
|
+
*/
|
|
550
|
+
async runTerminal(promptText, _options) {
|
|
551
|
+
logger.info("\u6B63\u5728\u542F\u52A8\u4EA4\u4E92\u5F0F Claude \u4F1A\u8BDD...");
|
|
552
|
+
const args = ["--dangerously-skip-permissions"];
|
|
553
|
+
args.push("--add-dir", process.cwd());
|
|
554
|
+
try {
|
|
555
|
+
logger.newLine();
|
|
556
|
+
logger.info("\u590D\u5236\u4EE5\u4E0B\u6307\u4EE4\u53D1\u9001\u7ED9 Claude:");
|
|
557
|
+
logger.separator("-", 20);
|
|
558
|
+
console.log(promptText);
|
|
559
|
+
logger.separator("-", 20);
|
|
560
|
+
logger.newLine();
|
|
561
|
+
await execa("claude", args, {
|
|
562
|
+
stdio: "inherit",
|
|
563
|
+
env: { ...process.env, FORCE_COLOR: "1" }
|
|
564
|
+
});
|
|
565
|
+
} catch (error) {
|
|
566
|
+
if (error.signal !== "SIGINT") {
|
|
567
|
+
throw error;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* 发送对话(支持上下文)
|
|
573
|
+
*/
|
|
547
574
|
/**
|
|
548
575
|
* 发送对话(支持上下文)
|
|
549
576
|
*/
|
|
@@ -2777,7 +2804,6 @@ async function selectSpec() {
|
|
|
2777
2804
|
logger.newLine();
|
|
2778
2805
|
const choices = sortedSpecs.map((spec, idx) => {
|
|
2779
2806
|
const statusIcon = getStatusIcon(spec.status);
|
|
2780
|
-
const statusColor = getStatusColor(spec.status);
|
|
2781
2807
|
const recommendInfo = idx === 0 ? "[\u63A8\u8350\u4ECE\u8FD9\u5F00\u59CB] " : "";
|
|
2782
2808
|
const depInfo = spec.dependencies.length > 0 ? `[\u4F9D\u8D56: ${spec.dependencies.join(", ")}] ` : "";
|
|
2783
2809
|
return {
|
|
@@ -2912,13 +2938,13 @@ async function executeDevelopment(specFile, milestone, todo) {
|
|
|
2912
2938
|
logger.info(' 2. \u6309 "a" \u63A5\u53D7\u6240\u6709\u7F16\u8F91\u5EFA\u8BAE\uFF0C\u6216\u9010\u4E2A\u9009\u62E9');
|
|
2913
2939
|
logger.info(" 3. \u5B8C\u6210\u540E\u4F7F\u7528 Ctrl+D \u6216\u8F93\u5165 :exit \u9000\u51FA Claude");
|
|
2914
2940
|
logger.newLine();
|
|
2915
|
-
|
|
2941
|
+
await claudeAI.runTerminal(prompt, {
|
|
2916
2942
|
contextFiles: ["TECH_STACK.md", "CONVENTIONS.md", "AI_MEMORY.md", specFile]
|
|
2917
2943
|
});
|
|
2918
2944
|
logger.newLine();
|
|
2919
2945
|
logger.separator("\u2500", 60);
|
|
2920
2946
|
logger.newLine();
|
|
2921
|
-
await generateSessionLog(specFile, milestone, todo, taskDescription,
|
|
2947
|
+
await generateSessionLog(specFile, milestone, todo, taskDescription, "\u4EA4\u4E92\u5F0F\u4F1A\u8BDD\u5DF2\u5B8C\u6210");
|
|
2922
2948
|
await askAndUpdateSpecStatus(specFile, milestone, todo);
|
|
2923
2949
|
logger.header("\u5F00\u53D1\u4EFB\u52A1\u5B8C\u6210!");
|
|
2924
2950
|
logger.success("\u4F1A\u8BDD\u65E5\u5FD7\u5DF2\u4FDD\u5B58");
|
|
@@ -3044,9 +3070,6 @@ function getStatusIcon(status) {
|
|
|
3044
3070
|
return "\u25CB";
|
|
3045
3071
|
}
|
|
3046
3072
|
}
|
|
3047
|
-
function getStatusColor(status) {
|
|
3048
|
-
return status;
|
|
3049
|
-
}
|
|
3050
3073
|
function buildDevPrompt(specFile, milestone, todo, taskDescription) {
|
|
3051
3074
|
return `Role: Senior Fullstack Developer
|
|
3052
3075
|
|