dsh-git-branch
Manifest validShow the current workspace git branch beside the composer mode controls, with focus/visibility-driven refresh
dsh-git-branch
English | 中文
Show the current workspace git branch right after the composer mode controls (access mode / plan) in the DeepSeek Harness (DSH) Web UI. It renders only when the workspace is inside a git repository, and it refreshes automatically when you switch branches in another tool.
Where it appears
The composer tool row is laid out as [+ commands] [access mode] [plan] ← branch chip. This plugin registers into the conversation.input.left slot — the additive seat immediately after the resident mode chrome — so the branch chip sits right next to the mode controls.
- Branch:
⎇ main - Detached HEAD:
⎇ detached @ a1b2c3d - Not a git repository: nothing renders
- Click the chip: refresh immediately (tooltip explains)
Install
The package is a DSH bundle (it ships its own cordis.patch.yml), so dsh plugin add both installs the dependency and activates it — no manual config:
# from npm
dsh plugin --profile web add dsh-git-branch
# or a local checkout (development)
dsh plugin --profile web add ./dsh-git-branch
Then restart the profile and refresh the page:
# restart dsh web, then reload the browser tab
How it works:
package.jsondeclaresdsh.bundle.patch = ./cordis.patch.yml, which- inserts onegit-branchplugin row.dsh plugin adddetectsdsh.bundleand adds the package todsh.profile.bundles; on the next boot that patch layer takes effect, the host loads the host half, and the client half is served to the browser automatically.
Optional host config
To change the command name, override the row (same id) in your own profile cordis.patch.yml:
- id: git-branch
name: dsh-git-branch
config:
commandName: git-branch # optional; default is git-branch
Unknown config keys fail at load.
Client refresh constant
See the top of src/client/index.tsx (or lib/client.js):
POLL_INTERVAL_MS = 60000: slow safety-net poll;<= 0disables it.
How it works
- host:
lib/index.jsregisters the/git-branchcommand; the handler walks up fromsession.header.cwdto the nearest.git(worktrees and submodules included), parsesHEAD, and returns the result as JSON in the command'stextfield. - client:
lib/client.jsregisters theconversation.input.leftchip, fetches the branch throughctx.remote.commands.execute, and registers aconversation.chat.commandviewentry forgit-branchthat rendersnull, hiding the transport command from the transcript.
Refresh triggers (see DESIGN.md): mount / session-or-workspace switch → immediate; window focus → immediate; visibilitychange → visible → immediate; chip click → immediate; 60s poll → fallback.
Layout
dsh-git-branch/
├── package.json # dsh.bundle + dsh.client + peerDependencies
├── cordis.patch.yml # bundle patch: inserts the git-branch plugin row
├── LICENSE
├── src/
│ ├── index.ts # host half (TypeScript source)
│ └── client/index.tsx # client half (TypeScript source)
├── lib/
│ ├── index.js # host half (prebuilt)
│ ├── index.d.ts
│ ├── client.js # client half (prebuilt, window.__ModuleLoader__ format)
│ └── client.d.ts
├── DESIGN.md # git-branch refresh-rules design
├── README.md # English (this file)
└── README.zh.md # 中文
License
MIT
Comments
Loading…
From the same category
by zhu1090093659
DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
★ 8.3k
↓ 219/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-webby ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol
★ 4k
↓ 16.5k/wk
MIT
TypeScript
Oct 3, 2026
dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tuiby YuJunZhiXue
DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐
★ 3.1k
MIT
JavaScript
Oct 3, 2026
dsh plugin --profile web add dsh-purgeby bowenliang123
The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,
★ 1.8k
↓ 38.5k/wk
Apache-2.0
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-contextby vshulcz
One memory shared by Claude Code, Codex, Cursor, Copilot CLI, OpenClaw and 20 more coding agents, built from the session history already on disk. A fix found in one agent comes back in any of them, in
★ 1.1k
↓ 1.2k/wk
MIT
Go
Oct 3, 2026
dsh plugin --profile web add dsh-dejaby PC2005-cloud
DSH 桌面宠物:一行命令装好即用的透明动画小桌宠,支持多开、大小位置随心配置;还内置 DIY 素材链,能用 AI 视频自造专属宠物
★ 989
↓ 11.3k/wk
MIT
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-pet