clawt 2.10.1 → 2.11.0

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.
@@ -60,7 +60,11 @@
60
60
 
61
61
  run 命令有两种模式(自 claudeCodeCommand 特性后):
62
62
  - 不传 `--tasks`:交互式界面模式(单 worktree + `launchInteractiveClaude` + spawnSync)
63
- - 传 `--tasks`:并行任务模式(多 worktree + `executeClaudeTask` + spawnProcess)
63
+ - 传 `--tasks`:并行任务模式(多 worktree + `executeBatchTasks` + spawnProcess)
64
+ - 批量任务执行逻辑从 `src/commands/run.ts` 提取到 `src/utils/task-executor.ts`(公共函数 `executeBatchTasks`)
65
+ - 进度面板渲染逻辑从 `src/utils/progress.ts` 拆分出 `src/utils/progress-render.ts`(纯渲染函数 + TaskProgress 类型)
66
+ - `formatDuration` 从 `src/utils/progress.ts` 移至 `src/utils/formatter.ts`
67
+ - 进度面板每个任务行末尾显示 worktree 路径(终端可点击跳转)
64
68
 
65
69
  ## 命令清单(11 个)
66
70
 
package/README.md CHANGED
@@ -44,13 +44,36 @@ clawt remove -b feature-auth
44
44
  ### `clawt run` — 创建 worktree 并执行任务
45
45
 
46
46
  ```bash
47
+ # 单 worktree,打开 Claude Code 交互式界面(最常用)
48
+ clawt run -b <branch>
49
+
47
50
  # 多任务并行(每个 --tasks 对应一个独立 worktree)
48
51
  clawt run -b <branch> --tasks "任务1" --tasks "任务2"
49
52
 
50
- # 单 worktree,打开 Claude Code 交互式界面
51
- clawt run -b <branch>
53
+ # 从任务文件读取任务列表(使用文件中定义的分支名)
54
+ clawt run -f tasks.md
55
+
56
+ # 从任务文件读取任务,但用 -b 自动编号分支(文件中分支名可省略)
57
+ clawt run -f tasks.md -b feat
52
58
  ```
53
59
 
60
+ **任务文件格式:**
61
+
62
+ ```markdown
63
+ <!-- CLAWT-TASKS:START -->
64
+ # branch: feat-login
65
+ 实现用户登录功能
66
+ <!-- CLAWT-TASKS:END -->
67
+
68
+ <!-- CLAWT-TASKS:START -->
69
+ # branch: fix-bug
70
+ 修复内存泄漏问题
71
+ 支持多行任务描述
72
+ <!-- CLAWT-TASKS:END -->
73
+ ```
74
+
75
+ > 使用 `-b` 时,文件中的 `# branch: ...` 行可省略,分支名由 `-b` 值自动编号(如 `feat-1`、`feat-2`)。
76
+
54
77
  按 `Ctrl+C` 可中断所有任务。
55
78
 
56
79
  ### `clawt resume` — 恢复之前的 Claude Code 会话