At a glance
What it does
A DeepSeek Harness Web sidebar that groups Git worktrees by repository and synchronizes their workspaces.
Web Profile
@deepseek-ai/dsh-client-connection >=0.1.5-rc.1 <0.2.0; @deepseek-ai/dsh-workspace >=0.1.5-rc.1 <0.2.0
Evidence-verified
Checked Sep 15, 2026, 2:02 PM UTC
Code-evidenced contributions
What it adds to DSH
Groups DSH Web workspaces as repository → worktree and keeps registered worktrees synchronized with Git.
Mechanism evidence ↗Before you choose it
This DSH Web bundle replaces the workspace browsing area with a repository → worktree hierarchy. Adding one workspace from a Git repository causes its other worktrees to be discovered and registered; removed worktrees are unregistered after a five-second grace period. Existing sessions in a registered worktree can be attached to that workspace, while non-Git workspaces remain flat.
Best for
DeepSeek Harness Web users who actively use Git worktrees and want related branches and sessions organized under each repository.
Common tasks
- Browse main and linked worktrees as a grouped project tree in the left sidebar.
- Automatically register newly added Git worktrees and remove registrations for deleted ones.
- Keep a manually deleted worktree workspace hidden through its tombstone behavior.
- Rename repository display names or refresh a repository’s worktree scan.
Permissions and data
Uses DSH workspace and session services plus local Git worktree discovery to organize the sidebar.
Permissions- Registers, deletes, retitles, and orders DSH workspace records for managed worktrees.
- Attaches existing sessions whose working directory matches a newly registered worktree.
- Runs read-only Git worktree listing with fixed command arguments.
- Stores tombstones, repository display names, and worktree associations in ~/.dsh/storages/dsh-left-panel.json.
- Does not claim to alter session logs, session working directories, or archive collections.
- Uses the local Git executable and DeepSeek Harness Web services; no third-party external service is described.
- No separate credentials are described; its API routes reuse the host’s existing authentication boundary.
Limitations
- The package shadows an official DSH sidebar slot, so DSH UI changes may require updating its derived browser code.
- If a worktree directory is unavailable for more than five seconds, it can be unregistered; re-registering it does not automatically restore old session grouping.
- A session can belong to only one workspace.
- Remote browsers without a native directory picker fall back to entering an absolute path.
What DSHub checked
- The supplied README reports typecheck, build, 37 tests, and isolated real-host DSH Web checks for synchronization, tombstones, authentication behavior, and session migration.
- The supplied package manifest and Cordis patch verify a DSH bundle named dsh-left-panel.
What DSHub did not check
- Installation and runtime behavior were not independently executed during this curation.
- The npm tarball identity was verified, but its contents were not audited.
Pinned install
Install dsh-left-panel
This plugin bundle does not have a DSH Plugin install action. Use its source documentation for the delivery method.
Maintainer source
Project README
dsh-left-panel
DeepSeek Harness(DSH)Web 侧边栏的 git 多工作树(worktree)增强:把左侧边栏的工作区列表重组为**项目(git 仓库,仅分组)→ worktree(真实工作区,可开会话)**的两层结构,并自动跟随 git worktree 的增删注册/注销工作区。
- 底层语义不变:每个 worktree 就是一个真实的 DSH Workspace(会话 cwd = worktree 目录),会话、日志、归档行为与原生完全一致;本插件只做注册/注销与展示分组。
- 自动同步是唯一行为:向某个 git 仓库的任意工作树添加工作区后,插件扫描
git worktree list,把该仓库其余 worktree 自动注册为工作区(以分支名命名,detached 用短 hash);worktree 被移除后自动注销(5 秒宽限,避免抖动)。主工作树永不自动注销。没有"自动/手动"开关,也不需要手动注册。 - 墓碑机制:你手动删除某个 worktree 的工作区 = 那一行直接消失(不留"已忽略"占位),插件也不再自动重建它;想恢复就把那个目录重新"添加工作区",插件随即接手管理(分支改名继续跟随)。
- 界面克制:仓库行只显示项目名(不显示数量、不显示同步状态、主工作树不加标记);仓库行仅在 git 扫描失败时出现一个
!;仓库菜单只有「重命名」与「刷新」。 - 项目与工作树都能重命名:worktree 标题仍写入 DSH Workspace,但重名只在所属项目内校验,因此不同项目都能使用
main;仓库节点不是工作区记录,所以项目名存在插件自身状态里(repoNames),菜单里「重命名」改它、清空即恢复默认(主工作树目录名)。 - 刷新:仓库菜单的「刷新」立即重扫该仓库的 worktree 并回读最新快照;日常无需手动——启动、工作区变动、git 文件系统事件与 30 秒轮询都会自动对齐。
- 新会话选择器:新会话页的工作区菜单同样按「项目 → worktree」分组,普通工作区保持单行,添加工作区入口固定在底部。
- 拖动排序:项目节点、普通工作区行与项目内 worktree 子行都能拖动。项目节点拖动其名下整组工作区;worktree 子行只允许在所属项目内移动。两层顺序都复用 DSH 的同一条持久 Workspace 顺序,卸载插件后仍然成立。
- 既有会话迁移:注册某个 worktree 时,cwd 指向该目录的既有会话会被自动挂入这个新工作区(走官方
attachSession,cwd 校验由官方保证无法挂错)。因此你过去在没有该工作区时于 worktree 目录里创建、一直躺在"未分组"里的会话,安装后会直接出现在对应的 worktree 下——会话日志不动,只是归属到正确分组。 - 保留原生交互:本插件的整体替换基于官方
ui-workspace浏览器(派生自@deepseek-ai/dsh-client-ui-workspace0.1.5-rc.2,MIT),展开/折叠、搜索、会话打开、重命名/删除、fork、归档、拖拽排序、单列表模式等全部保留。
实现方式(遮蔽说明)
本插件以更低优先级(-1)**遮蔽(shadow)**官方 sidebar.workspaces 槽位。官方 ui-workspace 插件仍正常加载——它的 uiWorkspace 服务、useWorkspaces 数据钩子、会话选择器等都由本插件复用,仅左侧栏浏览区由本插件的派生版本渲染。升级 DSH 后若官方浏览器行为变化,需要同步派生新版本。
安装 / 卸载对既有数据的影响
安装(dsh plugin --profile web add … 或 --patch 加载)前,插件只调用官方 workspaceRegistry.create(path, title)、Workspace.attachSession/ setTitle、workspaceRegistry.delete(id) 与 insertBefore,不写会话日志、不改会话 cwd、不动归档集合。具体影响:
| 动作 | 对既有数据的影响 |
|---|---|
| 安装 | 新增 worktree 工作区记录;既有工作区与会话原样保留。新记录插到各自仓库主工作区之后,其它工作区的相对顺序不变(绝对位置可能后移)。 |
| 迁移 | cwd 指向新注册 worktree 的既有会话被挂入该工作区(原先显示在"未分组")。会话 id、日志、cwd 都不变。 |
| 改名 | 仅在"该工作区标题仍等于插件当初写入的分支名"且分支确实变了时跟随改名;你手动改过的标题永不被覆盖。 |
| 删除 | 仅注销插件自己注册、且已消失的 worktree 工作区;主工作树永不自动注销。 |
| 卸载 | 插件从 boot graph 移除、RPC 路由 404;所有工作区、会话日志、归属账本全部保留。自动注册的 worktree 工作区成为普通平铺条目(不自动删除,需自行清理或保留)。~/.dsh/storages/dsh-left-panel.json(墓碑、项目显示名、worktree 关联)残留但完全惰性,可安全删除。工作区顺序不会回滚。 |
唯一的有损路径:worktree 目录临时不可见(如外置卷未挂载)超过 5 秒宽限,会被当作"已删除"注销;重新可见时按新工作区注册,其旧会话落回"未分组"且不会自动回来(官方限制:重新添加路径不恢复旧会话分组)。主工作树与普通工作区不受影响。需要更保守时可以把宽限调大或改为"仅 git 枚举不再列出时才注销"。
以上行为在隔离 DSH_HOME 中用真实宿主实测过三阶段:装插件前在 worktree 目录建会话(落在未分组)→ 装插件后该会话被挂入 worktree 工作区 → 卸载后工作区、账本、会话日志全部保留。
已验证(0.1.5-rc.2,真实宿主)
pnpm typecheck、pnpm build、pnpm test(37 个测试:porcelain 解析、同步决策含宽限期/墓碑/主树保护、状态持久化、真实 git 仓库驱动的服务集成(含既有会话迁移、墓碑解除、项目重命名、端点面收敛)、客户端层级折叠(含"删除后不再补回行")、构建产物冒烟)全部通过。- 隔离
DSH_HOME启动真实dsh web,通过官方 RPC 添加仓库主目录:两个 linked worktree 在数秒内被自动注册,以分支名命名,紧跟主工作区排序。 git worktree add/remove实时联动(fs.watch + 轮询兜底);目录消失与 git 枚举消失都走宽限注销。- 手动删除 worktree 工作区 → 那一行立即消失且不再自动重建(宿主实测:工作区列表保持干净);把该目录重新添加回来 → 墓碑自动清除,插件重新接管(分支改名继续跟随)。
- 非 git 目录保持原生单行展示,不受影响。
- 插件路由带 cookie 200 / 无 cookie 401(复用官方
/api信任围栏);client bundle 被宿主组合进 boot graph 并正确下发。 - 三阶段数据影响实测:装插件前在 worktree 目录建的会话 → 装插件后自动挂入对应 worktree 工作区 → 卸载后工作区/账本/会话日志全部保留。
安装
# 本地路径(需要 pnpm)
dsh plugin --profile web add /abs/path/to/left-panel
# 未全局安装 dsh CLI 时
npx @deepseek-ai/dsh plugin --profile web add /abs/path/to/left-panel
安装或首次加入 bundle 图后重启 dsh web;client 更新后浏览器硬刷新。
本地开发
pnpm install
pnpm typecheck && pnpm build && pnpm test
--patch 覆盖层开发(无需安装到 profile):
dsh web --patch ./dev.patch.yml
dev.patch.yml 指向 lib/index.js(宿主会读取最近的 package.json 获得两端声明),已加入 .gitignore。入口的裸导入由 profile 的 node_modules 解析;若报模块找不到,软链 profile 的包:
mkdir -p node_modules
ln -s ~/.dsh/profiles/node_modules/@deepseek-ai node_modules/@deepseek-ai
架构
浏览器 client 半 宿主 host 半
┌─────────────────────────┐ /api RPC ┌──────────────────────────┐
│ 遮蔽 sidebar.workspaces │ ────────────▶ │ WorktreeSyncService │
│ 项目→worktree→会话 树渲染 │ ◀──────────── │ · git worktree 扫描/监听 │
│ useWorkspaces/useSessions│ 全量快照 │ · 同步引擎(注册/注销/改名) │
└─────────────────────────┘ │ · 墓碑与每仓库开关(持久化) │
│ workspaceRegistry(官方服务) │
└──────────────────────────┘
- RPC:宿主在共享
/api通道上注册精确 Fetch 路由(/api/left-panel/<endpoint>,Connection RPC 信封),浏览器端继续用connection.rpc.call('/api', 'left-panel/<endpoint>')。鉴权与 Host/Origin 围栏完全复用官方通道,插件零自建鉴权。端点只有三个:list(读快照)、sync(重扫并回读,即菜单的「刷新」)、setRepoName(项目显示名)。 - 同步引擎(
src/sync.ts,纯函数):决定 create/delete/retitle;分支切换会跟随改名,用户手工改名后不再覆盖;主工作树不自动删除;移除走REMOVAL_GRACE_MS宽限防抖。 - 状态:
~/.dsh/storages/dsh-left-panel.json(原子写;DSH_HOME可重定位),存墓碑、每仓库开关、已知 worktree 与插件命名记录。 - 触发:启动、
domain/changed(区分插件自删与用户删除)、fs.watch仓库.git目录(去抖 400ms)、30s 轮询兜底、客户端主动 sync。 - git 访问(
src/git.ts):固定 argv spawn,环境变量清洗(剔除*KEY*/*SECRET*/*TOKEN*/*PASSWORD*),15s 超时,只读命令。
边界与限制
- 一个会话仍只属于一个工作区(DSH 领域不变量);worktree 会话不会计入父仓库工作区,也不会跨 worktree 迁移。
- 官方已知限制:删除工作区注册后重新添加,旧会话不会自动回到该工作区(显示在"未分组"下)。
- 「添加工作区」走宿主原生目录选择器(
uiWorkspace.pickDirectory);无选择器环境(远程浏览器访问)降级为手输绝对路径。 - 会话正文搜索(250ms debounce 后的 Host 内容搜索)依赖官方
session.search服务,未起时降级为名称匹配提示。
发布前检查表
-
package.json的dsh.bundle.patch与cordis.patch.yml一致。 -
pnpm typecheck && pnpm build && pnpm test通过。 - 真实
dsh web --patch端到端复查:自动注册、双向同步、墓碑、会话创建。 - 仓库加 topics:
dsh-plugin、deepseek-harness。
致谢
客户端浏览器基于 deepseek-harness 的 @deepseek-ai/dsh-client-ui-workspace(MIT,Copyright (c) 2026 DeepSeek)派生,派生文件头部均已标注。
Operate deliberately
Install and manage
Prerequisites and target Profile
Target: Web Profile
Delivery: Dsh Bundle Git — trynewthin/dsh-left-panel#2d160ff196f8ba078c3b829675a17b07e00053d7。
Verify, update, and remove
Show lifecycle commands
dsh plugin --profile web listCompatibility and access
DeepSeek Harness Web bundle; Node.js >=22.19.0: @deepseek-ai/dsh-client-connection >=0.1.5-rc.1 <0.2.0; @deepseek-ai/dsh-workspace >=0.1.5-rc.1 <0.2.0。
Review compatibility evidence ↗
Risk facts
Can create, unregister, rename, and reattach DSH workspace associations for Git worktrees.
Evidence ↗Shadows the official sidebar workspace slot with a derived browser implementation.
Evidence ↗Evidence and editorial reviewManifest, Bundle patch, distribution and freshness
Immutable evidence
Review status and source activity
MIT-licensed bundle with a pinned Git source and verified structure. Review its workspace-registration behavior before using it with important session organization.
AI reviewed Sep 15, 2026, 2:03 PM UTC。GitHub facts last checked Sep 15, 2026, 2:03 PM UTC。
No material source change has been recorded since this evidence baseline.