Skip to content

hwjcode v1.1.76

Choose a tag to compare

@github-actions github-actions released this 04 Jul 12:44
fix: worktree 建在子目录而非 git root + agent 绑定错误 (v1.1.76)

问题1:worktree 建在子目录而非仓库根目录
根因:WorktreeManager.getWorktreesRoot() 使用 projectRoot(用户传入的路径)
而非 gitRoot。当 project_path 是 git 仓库的子目录时,worktree 建在子目录下。
修复:getWorktreesRoot() 改为优先使用 gitRoot。

问题2:worktree 内容不完整
根因:问题1的连锁反应。worktree 建在子目录意味着该 worktree 目录的父结构
不正确,虽然 git worktree 本身是完整快照,但实际体验路径不对。
修复:问题1修复后自动解决(worktree 在 git root 下 = 完整仓库快照)。

问题3:Agent 绑定错误(全部绑了 claude-code)
根因:batch_create_project_groups 工具的 agent 参数描述太弱('Optional delegate
agent. Omit for Easy Code self.'),主 agent(Claude Code)倾向于给自己建群
时填上 agent='claude-code'。
修复:强化工具描述和参数说明,明确要求'仅在用户明确要求时才设 agent 字段'。

新增测试:
- getWorktreesRoot 在子目录场景下正确解析到 git root
- create() 从子目录创建 worktree 时正确放在 git root 下
- 验证 worktree 内容包含完整仓库快照

验证: tsc 零错误, 30 worktree 测试全部通过