DeepSeek Harness Plugin

a792883583/dsh-git-panel

Stars ★ 1 Downloads (30d) 2,559 Category Git & Code Review Added 2026-09-07 npm dsh-git-panel

Git sidebar panel with commit graphs, ahead/behind tracking, branch operations, and one-click chat context injection.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-git-panel

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:a792883583/dsh-git-panel

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

中文 · Español

A Git panel plugin for the DSH Web GUI: branch management (switch / pull / fetch / rename / delete / merge) plus a GitLens-style commit graph.

Features

  • Branch panel (right side of the chat):
    • Two-row card layout: branch names take the full top row without being truncated, while commit timestamps and messages sit on a dedicated second row
    • Instant search & filter: quick search box at the top of the branch list to filter branches and commit messages in real time
    • Local branches: current branch highlighted, ↑ahead / ↓behind against upstream, double-click to switch (double-click the current branch to pull)
    • Remote branches: double-click to check out (creates a local tracking branch automatically)
    • Right-click menu: copy branch name / rename / delete / merge into current branch (remote branches get delete-remote instead)
    • One-click pull of the current branch, fetch all (git fetch --all --prune)
  • Branch chip (above the input box): shows the current branch; click to open a local-branch list for quick switching
  • Git graph: commit DAG lanes, three-column header (Lanes / Commit / Branch), the commit column is resizable from both sides (width persisted), click a node for commit details; virtualized rendering — only the visible viewport is drawn, so large repositories scroll smoothly
  • Write bar (top of the panel, under the tabs):
    • Commit: type a message and press Enter → git add -A && git commit -m
    • Push: one-click git push of the current branch
    • Stash / pop: git stash push (optional message) / git stash pop
    • Status: shows the number of changed files (git status --porcelain)
  • Changes + syntax-colored Diff: uncommitted changed files are listed under the write bar (status code + path); click any file to view its full diff against HEAD with line-by-line coloring (green + for additions, red - for deletions, blue @@ for hunks) — review changes clearly before committing
  • File-tree change badges (VS Code look): in the right sidebar's "Files" tree, changed files carry a status letter right after the name and a tinted filename (M modified / A added / U untracked / D deleted / R renamed / C conflicted), and directories containing changes get a dot; badges refresh automatically with git status, no manual tree reload needed
  • Git diff view (VS Code-style side-by-side): click a changed file to open its diff in the right sidebar
    • HEAD on the left, working tree on the right, line numbers strictly aligned, with additions / deletions / modifications colored separately
    • Split / unified layouts, collapse unchanged regions (3 lines of context, click to expand), word wrap toggle, font zoom, and a manual edit mode
    • The header shows +added / −removed counts; "Source" returns to the official text preview, "Stage" runs git add, "Save" writes back to the workspace
    • Only files that actually have changes are claimed by this view; untouched files keep using the official preview, so the two never interfere
  • Full-Context Merge-Conflict Resolution:
    • Immediately centers the conflict block on the first screen with 8 lines of clear surrounding code context; distant code collapses gracefully with line numbers preserved.
    • Automatically identifies <<<<<<< / ======= / >>>>>>> markers with Accept Current (HEAD), Accept Incoming (branch), and Accept Both one-click actions.
    • Saving writes changes back and automatically resolves the conflicted state.
  • Zero-Terminal In-Place Credential Setup:
    • Automatically detects missing credentials for private GitLab/GitHub instances and prompts with an elegant in-place modal to save username/tokens without touching the CLI.
  • VS Code-Grade Intelligent Sync:
    • Pushes directly when ahead, pulls only when behind; completely eliminates forced --rebase and prevents artificial rebase conflicts.
    • Automatic rebase --abort recovery from interrupted rebase states.
  • Context-Aware Multilingual Prompt Injection:
    • Dynamically changes to "💬 Send conflict analysis to chat" when conflicts are detected, composing targeted diagnostic prompts in English, Chinese, and Spanish.
    • Full compatibility with the latest DSH Lexical rich text composer.
  • Fast Actions & Reentrancy Guards:
    • Clickable behind (↓101) badge for instant pulling.
    • Right-click menu with Pull & Fetch-all options, busy locks, and cancellation buttons.
  • Graph commit actions: click a commit node in the graph to cherry-pick it onto the current branch or revert it (git revert --no-edit)
  • Multilingual: follows the DSH Web UI language (Chinese / English); Spanish browsers automatically get Spanish copy; defaults to Simplified Chinese
  • Native right-sidebar tab: the Git panel is a first-class tab beside the built-in "Files" tab — expand, collapse, width dragging, and tab switching are all owned by the official sidebar, with no page-layout rewriting
  • Follows the current session's working directory: re-binds automatically when switching project sessions
  • Light / dark theme follows the DSH Web GUI

Screenshots

File-tree change badges — changed files carry a status letter after the name and a tinted filename, and directories with changes get a dot, just like VS Code's Explorer:

File tree change badges

Git diff view — full-width side-by-side diff with aligned line numbers, collapsible unchanged regions, and change statistics plus actions in the header:

Git diff view

Merge-conflict resolution with full context — the conflict and its surrounding code (8 lines either side, with line numbers) land on the first screen, while distant conflict-free regions stay folded; three one-click actions, and saving writes the result back:

Merge conflict resolution

Native tab in the right sidebar — Git sits beside the built-in "Files" tab, and the sidebar owns expand/collapse, width drag, and tab switching:

Git tab in the right sidebar

Branch panel (local/remote branches, ahead/behind, double-click to switch, right-click menu):

Branch panel

Branch chip (quick branch switching above the input box):

Branch chip

Commit graph (resizable three-column layout, virtualized scrolling):

Commit graph

Installation

dsh plugin --profile web add dsh-git-panel

Restart dsh web, open a project session bound to a git repository, then open the right sidebar (top-right) and pick the Git tab.

Runtime requirements: this needs the current DSH Web (>=0.1.5-alpha.1, i.e. the release that introduced the right-sidebar multi-tab framework @deepseek-ai/dsh-client-ui-sidebar-right). The file-tree change badges and the Git diff tab rely on the right sidebar's tab-type registry and the dsh-resource://file address model; the "switch to Git diff inside the official file preview" entry additionally relies on DSH's own @deepseek-ai/dsh-client-ui-sidebar-documentpreview (bundled by default since 0.1.5). On older DSH builds (for example 0.1.2-rc.1) these features do nothing — those versions have no right-sidebar tab registry and no unified file-address model.

For local development, install via a link instead: dsh plugin --profile web add link:/path/to/dsh-git-panel. After editing source, run npm run build and refresh the page to see changes.

Feedback

Found a bug or have a feature request? Open an issue on GitHub Issues — your feedback helps us make the plugin better.

License

MIT

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.