Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Agent Worktree MonitorNew to Visual Studio Code? Get it now.
Agent Worktree Monitor

Agent Worktree Monitor

linmengmeng

| (0) | Free
多 Agent Git Worktree 代码变更监控:worktree 发现、变更列表、基准分支统计、跨 worktree 重叠检测
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Agent Worktree Monitor for VS Code

多 Agent 并行开发(Claude Code / Codex / OpenCode 各占一个 Git Worktree)时,统一监控各 worktree 的分支、变更文件、增删行数与跨 worktree 文件重叠,双击打开原生 Diff。

只读工具:仅执行白名单只读 git 命令,无任何写操作、无网络请求、无遥测。

IntelliJ IDEA 版(上游项目):https://github.com/linmengmeng-1314/agent-worktree-monitor

功能(按阶段推进)

  • Phase 0 ✅ worktree 发现 + SCM 区 "Agent Worktrees" 树(分支名、主目录/locked 标记、短 SHA)+ 手动刷新
  • Phase 1 ✅ 两级树:worktree 行(变更计数)→ 变更文件行(git 风格彩色状态角标 M/A/D/R/U、目录、文件图标);点击文件行打开与 HEAD 的原生 Diff(新增/删除/重命名均有对应左右侧,未跟踪直接打开文件);刷新保持展开状态
  • Phase 2 ✅ 行数统计(文件行 +a −d,未跟踪计全增)、基准分支(显式配置 > 主 worktree 推断,已提交层 base...HEAD 统计与基准 diff)、双层来源标注、"Agent Overlaps" 跨 worktree 重叠视图、自动刷新(默认 10 秒可配 + 窗口聚焦触发,分层扫描签名不变不跑明细)
  • Phase 3 设置项、过滤排序、Marketplace 发布

使用

  1. 打开任意 git 仓库(主仓或任一 worktree 目录均可)
  2. 左侧源代码管理面板找到 Agent Worktrees 分区(首次可用 View: Open View... 搜 "Agent Worktrees" 唤出)
  3. 每个 worktree 一行(= 一个 Agent 工作区),行上带未提交/已提交统计;展开看它改了哪些文件,角标含义:M 修改 / A 新增 / D 删除 / R 重命名 / U 未跟踪 / C 已提交(蓝,相对基准分支)
  4. 点击文件行打开 diff(未提交 ↔ HEAD;已提交 ↔ 基准分支)
  5. Agent Overlaps 分区列出被 ≥2 个 worktree 同时修改的文件(重叠 ≠ 冲突,提示人工审查)
  6. 设置:agentWorktreeMonitor.baseBranch 指定基准分支(留空自动推断);agentWorktreeMonitor.autoRefreshInterval 自动刷新间隔(0 关闭)

本地开发

npm install
npm run compile

VS Code 里 F5 启动 Extension Development Host,打开任意 git 仓库即可在源代码管理面板看到 Agent Worktrees 视图。

License

Apache-2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft