`retainOnArchive`, a volatile field of the worktree service's Config, skips cleanup admission while it is on; it is read at each archive, so a change applies to later archives only. The service keeps its instance off the generated Settings pages, and the Forge client draws the switch as the `plugins.row.config` page of the bundle's `worktree` row, staged through the shared Plugins form until one explicit save. Docs: the worktree, Forge, and bundle READMEs, the archive-worktrees upgrade guide, the config and client catalogs, and the explicit-worktree-creation note.
4.0 KiB
description, kind
| description | kind |
|---|---|
| 从插件页面启用变更请求面板与 worktree Session。 | package-bundle |
@deepseek-ai/dsh-experimental-forge-bundle
English | 中文
概述
查看每个 Session 的变更请求、检查与代码差异,在 Git 工作树中开始新 Session,或在对话中让模型创建工作树。在 Web 或 Desktop 的插件页面启用“变更请求与工作树”;发布的 profile 默认禁用该功能。GitHub 状态来自宿主上已登录的 gh 命令行;创建本地工作树无需 GitHub 认证。
目录
使用本包
打开插件页面,在官方分组中启用“变更请求与工作树”。在 Git 工作区中,发出第一条消息之前在输入框中勾选“工作树”,Session 就会在新的 worktree 中开始。Session 的目录位于 Git 检出中时,标题栏按钮会打开面板。Session 用 gh pr create 创建、用 gh pr view、gh pr edit 或 gh pr checkout 打开的 GitHub pull request,以及 Session 所在分支上或之后 git push 更新的 pull request,无需额外操作即会作为变更请求出现。在终端运行 gh auth login --hostname <host> 登录;缺少登录时,面板会显示这条命令。面板包说明了每个控件。
同一个开关也启用模型的 create_worktree 工具。关闭后面板和工具一起移除,已有检出目录与分支仍然保留。已选中独立工作树组合包的 profile,请在启用本组合包前按升级指南调整配置。
了解实现
维护者细节——点击展开
组合包以六个顶层行挂载 Forge 注册表、GitHub 提供方、Session 绑定、工作树模型工具和面板。工具与面板共用同一个 worktree 服务,因此一条 worktree 行覆盖同时配置两者,归档一个 Session 只回收一次其检出目录;该行在插件页上的“归档时不删除工作树”开关同时为两者关闭清理。面板记录 Session 开始前请求的工作树;模型创建的工作树不会获得面板的恢复记录,但两种工作树都参与归档清理。这些行使用基于 base 的 profile 提供的 Session 投影、工作目录、文件系统、子进程和沙箱服务;归档清理还需要这些 profile 的 Workspace 注册表与 Session 查询。
深入探索
Forge 子系统 · Session 绑定 · 面板
模型体验
间接影响:通过 create_worktree 工具,以及以工作树开始的 Session 的面板目录通知。
KV Cache 影响
启用或关闭组合包会改变模型的工具 schema 列表。调用追加工具结果和目录上下文;参见工具的缓存行为。
已知限制与待办工作
- 只有 GitHub 一个代码托管提供方,且本 Bundle 只服务 github.com;GitHub Enterprise 主机需要用 profile patch 把它列入
forge-github行的hosts。没有提供方识别 GitLab 等其他平台。 - 模型目前还没有读取已绑定变更请求的工具。
开发备注
维护者的工作上下文——点击展开
无。