A Git Graph tab for DSH Web: a faithful port of vscode-git-graph 1.30.0 that registers a native tab in the dsh-better-sidebar right rail (prerequisite), auto-binds to the session workspace, runs the full git operations (checkout/merge/rebase/push/tag/stash) directly on the host, and opens file diffs in the built-in DiffTab.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-dev-git-graph
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:kp-z/dsh-dev-git-graph#path:/packages/dsh-dev-git-graph
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness (dsh) plugin that adds a Git Graph panel to every conversation tab in the DSH Web GUI — a faithful port of mhutchie/vscode-git-graph 1.30.0.
It automatically binds to the current session's workspace and renders the commit graph (branch lanes, commit messages, dates, authors, refs), with the full set of git operations from the original extension available via right-click: checkout, merge, rebase, push/pull, tag, stash, and more.
Features
- Session tab: a "Git 树" tab appears alongside Chat / Trajectory for any conversation with a workspace.
- Auto-bound repo: the graph is loaded for the session's working directory; no manual repo selection needed.
- Full git operations: checkout, cherry-pick, revert, merge, rebase, push, fetch, tag, stash — driven by the original extension's ~60 commands, executed directly against your local git.
- Theming: maps DSH design tokens (
--dsw-alias-*) onto the graph UI; follows the host's light / dark mode. - No external processes: the host runs
gitdirectly viachild_process.spawn(array args, no shell injection) and serves the frontend same-origin.
Install
dsh plugin --profile web add dsh-dev-git-graph
# restart `dsh web`, then open any conversation — a "Git 树" tab shows the workspace's commit graph
Better Sidebar integration (required)
This plugin's only UI entry is a native Git Graph tab inside dsh-better-sidebar's right sidebar (+ menu, single-instance, auto-bound to the session workspace via scope.repoRoot/scope.cwd; clicking a file's diff opens the built-in DiffTab). Install better-sidebar first — without it the plugin registers no UI.
# full one-line install (better-sidebar first, then this plugin)
cd ~/.dsh && dsh plugin --profile web add dsh-better-sidebar && dsh plugin --profile web add dsh-dev-git-graph
How it works
flowchart LR
subgraph GUI["DSH Web GUI"]
TAB["conversation.view tab Git 树"] --> IFRAME["iframe /dsh-dev-git-graph/gg/index.html?repo=cwd"]
end
subgraph HOST["dsh web host plugin"]
R1["GET /dsh-dev-git-graph/gg/* static + inject boot data"] -.-> IFRAME
IFRAME -->|postMessage bridge| R2["POST /dsh-dev-git-graph/gg/api ~60 commands"]
R2 --> DS["vendored dataSource.ts child_process.spawn git"] --> REPO[("local git repo = session workspace")]
end
- Static:
GET /dsh-dev-git-graph/gg/serves the bundled frontend (media/), injectingwindow.__DSH_GG_BOOT__with{ apiBase, repo, initialState, ... }. - API:
POST /dsh-dev-git-graph/gg/apimirrors the original extension'sgitGraphView.respondToMessagecommand set. - Data:
vendor/git-graph/dataSource.tsruns git viachild_process.spawnwith array arguments.
Differences from vscode-git-graph
| Area | Behaviour |
|---|---|
| VS Code-only commands | openFile / viewDiff / openTerminal / createPullRequest / createArchive return "not supported" |
| View state persistence | localStorage (the extension used workspaceState); setGlobalViewState etc. are ACKed |
| Repo source | auto-bound to the current session's workspace |
Security
- Git is executed with array arguments (no shell), so repo paths / refs can't be used for shell injection.
- Static file serving sanitizes filenames against a whitelist.
- The API only acts on the repo path supplied by the host's own boot payload (the session cwd).
Development
pnpm --filter dsh-dev-git-graph build # build:web (tsc + pack) -> build:host (tsc) -> cp client.js
pnpm --filter dsh-dev-git-graph typecheck # two tsconfigs: host (NodeNext) + web (DOM)
License
MIT. The frontend and data layer are derived from mhutchie/vscode-git-graph (MIT), see vendor/git-graph/LICENSE.
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-git-graph★ 9048
Git branch selector and Git graph for the dsh web GUI: switch branches and explore branch-lane and commit history from the conversation header.
Akimiya-z/codex-guard#dsh★ 133
Pre-submit pull-request hygiene checks inside DeepSeek Harness: scans the current diff for TODO leftovers, hardcoded secrets, and non-conventional commit subjects.
Cerbur/clutch-dsh#clutch-dsh-worktree★ 34
Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
lehhair/dsh-diff-viewer★ 26
PiUI-style diff viewer replacing the stock DiffBlock for write/edit tool calls.
DamonKoy/dsh-web-ui#dsh-git-graph★ 25
Git branch selector and Git graph in the conversation header of the dsh web GUI.
PerryLink/dsh-github★ 24
Official-grade GitHub CI integration: a composite action.yml, a polling PR review bot with idempotent inline comments and a status-check gate, plus PR/issues tools with every write gated by human approval.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.