yg-team-cli 2.5.7 → 2.5.8

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 CHANGED
@@ -65,6 +65,10 @@
65
65
  - **修复**: 优化内部检查逻辑,使用更轻量的 `which` 进行环境检查,避免因 `--version` 检查逻辑导致的潜在多次触发
66
66
  - **优化**: 简化 `runTerminal` 传参逻辑,移除冗余参数,确保单次稳定启动交互式会话
67
67
 
68
+ **v2.5.8** - Milestone 选择样式优化
69
+ - **新增**: `team-cli dev` 选择里程碑时,现在会直观显示已完成、进行中和未开始的状态图标及进度 (如 `[4/7]`)
70
+ - **改进**: 增强了 Spec 文件的解析逻辑,能够更准确地识别已标记为 `[x]` 的任务项
71
+
68
72
  **v2.4.10** - 修复 Claude 返回权限确认而非实际内容问题
69
73
  - **修复**: 添加 `--dangerously-skip-permissions` 参数跳过权限确认
70
74
  - **问题**: v2.4.9 中 Claude CLI 在新目录首次运行时返回权限确认提示而非 spec 内容
package/dist/cli.js CHANGED
@@ -2836,11 +2836,17 @@ async function selectMilestone(specFile) {
2836
2836
  return "\u6574\u4E2A spec";
2837
2837
  }
2838
2838
  }
2839
- const choices = milestones.map((m, idx) => ({
2840
- name: `${idx + 1}. ${m.title} (${m.todos.length} \u4E2A\u4EFB\u52A1)`,
2841
- value: m.title,
2842
- short: m.title
2843
- }));
2839
+ const choices = milestones.map((m, idx) => {
2840
+ const isDone = m.completedCount === m.todos.length && m.todos.length > 0;
2841
+ const statusIcon = isDone ? "\u2713" : m.completedCount > 0 ? "\u27F3" : "\u25CB";
2842
+ const progress = `[${m.completedCount}/${m.todos.length}]`;
2843
+ const label = isDone ? `\u2713 ${m.title}` : `${statusIcon} ${progress} ${m.title}`;
2844
+ return {
2845
+ name: `${idx + 1}. ${label} (${m.todos.length} \u4E2A\u4EFB\u52A1)`,
2846
+ value: m.title,
2847
+ short: m.title
2848
+ };
2849
+ });
2844
2850
  choices.push({
2845
2851
  name: `${milestones.length + 1}. \u6574\u4E2A spec (\u5168\u90E8 milestones)`,
2846
2852
  value: "\u6574\u4E2A spec",
@@ -2981,7 +2987,7 @@ function parseMilestones(spec) {
2981
2987
  milestones.push(currentMilestone);
2982
2988
  }
2983
2989
  const title = line.replace(/^###\s+/, "").trim();
2984
- currentMilestone = { title, todos: [] };
2990
+ currentMilestone = { title, todos: [], completedCount: 0 };
2985
2991
  inMilestone = true;
2986
2992
  continue;
2987
2993
  }
@@ -2991,9 +2997,13 @@ function parseMilestones(spec) {
2991
2997
  currentMilestone = null;
2992
2998
  continue;
2993
2999
  }
2994
- const todoMatch = line.match(/^-\s+\[[ x ]\]\s*(.+)/);
3000
+ const todoMatch = line.match(/^-\s+\[([ xX])\]\s*(.+)/);
2995
3001
  if (todoMatch) {
2996
- currentMilestone.todos.push(todoMatch[1].trim());
3002
+ const isCompleted = todoMatch[1].toLowerCase() === "x";
3003
+ if (isCompleted) {
3004
+ currentMilestone.completedCount++;
3005
+ }
3006
+ currentMilestone.todos.push(todoMatch[2].trim());
2997
3007
  }
2998
3008
  }
2999
3009
  }