DeepSeek Harness Plugin

kp-z/dsh-dev-git-graph#dsh-dev-git-graph

Stars ★ 0 Downloads (30d) 1,042 Category Git & Code Review Added 2026-09-04 npm dsh-dev-git-graph

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 git directly via child_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/), injecting window.__DSH_GG_BOOT__ with { apiBase, repo, initialState, ... }.
  • API: POST /dsh-dev-git-graph/gg/api mirrors the original extension's gitGraphView.respondToMessage command set.
  • Data: vendor/git-graph/dataSource.ts runs git via child_process.spawn with 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.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.