Skip to main content

dsh-git-graph

14Stars1Forks0Issues0Watchers

Embeds Git graph, branch management, uncommitted changes panel, and code diff directly into the DeepSeek Harness chat page, allowing users to view version history and perform read/write operations without switching contexts during AI-assisted coding.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
HTML
License
MIT
Branch
main
deepseekdeepseek-harnessdshdsh-plugingitgit-graph

Install

cmdweb profile
$ dsh plugin --profile web add github:1841220388zzzcccxxx-star/dsh-git-graph

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin 1841220388zzzcccxxx-star/dsh-git-graph for me: review the repository at https://github.com/1841220388zzzcccxxx-star/dsh-git-graph first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-sentence Positioning

Embed Git commit graph, branch management, file diff, and VSCode-style uncommitted changes panel within DeepSeek Harness chat interface, allowing AI programming without switching to external Git clients to view version history and perform read/write operations.

Core Capabilities

  • Browse commit history: GitHub-style commit list with collapsible branch groups, local/remote branches color-coded, Ctrl+click to compare two commits, Ctrl+F to search, Ctrl+B to collapse all branch groups, ↑↓/j/k to navigate, Enter for details, Esc to close, etc.
  • View uncommitted changes: Always visible at top of graph, three file groups: staged / modified / untracked (including raw content for untracked files), line count per file +/- with syntax-highlighted diff, collapsible panel and grouping
  • Manage file changes: Single-line stage / unstage / discard, checkboxes for batch stage selected / unstage selected / discard selected / ignore selected / commit selected, commit dialog includes "✨ AI-generated commit message" candidate
  • Remote and branch operations: Top bar ⬇ pull / ⬆ push, local branches can 🔄 switch / 🗑 delete (only after merge, HEAD protected), remote branch group header always shows "synced" / "included" status
  • Browse any repository: Top bar "📂 Open" or empty state "Open folder" to navigate disk directories and select Git repositories, added paths persisted via localStorage, persist across refreshes for continued browsing
  • One-click auto-update: Silently check GitHub latest version when opening graph, new version shows "🔄 New version vX.Y" in top bar, auto-download and replace after confirmation (backup old version, rollback on failure), restart dsh web to take effect; 8 built-in themes (🌸 Sakura / 🌊 Ocean / 🌲 Forest / 🌙 Night / 🍬 Candy / 💼 Business / ✨ Galaxy / 🤖 Tech)

Technical Implementation

  • Language: JavaScript (Node type: module, pure ESM)
  • Key Dependencies: Only Node built-in modules node:child_process, node:fs, node:path, node:os, node:url, node:net, plus host-provided React and slots services
  • Architecture Pattern: Host-half / Client-half dual-end plugin—server index.js registers /git-graph prefixed routes via inject: ['webServer'] providing git API (graph / branches / workstatus / workfile / gitop / show / diff / filelog / remoteinfo / checkupdate / autoupdate / listdir / addrepo / repos, etc.), client client.js registers "Git Graph" tab under conversation.view slot via inject: ['slots'] (label="Git 图谱", order=20), tab embeds iframe loading web/index.html
  • Entry Files: Server index.js, client client.js, UI web/index.html (3414 lines inline script, zero external build artifacts)

Use Cases

For developers who want to view commit history, switch branches, stage/revert changes, or push to remote without leaving the current page while having AI write code in DSH. When an Agent generates changes for you and you need to visually review every file's diff before merging to main, see who last modified the same line, confirm no leftover untracked files—this panel is more efficient than repeatedly switching to SourceTree / GitHub Desktop.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DeepSeek Harness>=0.0.1 (dsh.plugin.json engines.dsh)Only declares minimum version; plugin uses webServer service (index.js:20 inject: ['webServer']) and slots service (client.js:44), host needs these injection points
Node.jsNot declaredSource doesn't specify engines.node in package.json; syntax uses ESM and top-level await, runtime needs Node ≥ 14+ (recommend ≥ 18)
System GitAny versionindex.js:26 calls git CLI directly via execFile('git', ...), must be findable in system PATH
PlatformmacOS / Windows / LinuxReveal operation calls explorer / open / xdg-open based on platform branch (index.js:673-675), rest of logic is cross-platform consistent
Native ModulesNoneAll Node built-in modules used, no node-gyp / prebuilt binaries

Installation

dsh plugin --profile web add github:1841220388zzzcccxxx-star/dsh-git-graph

Configuration

ConfigTypeDescriptionDefault
repoString (path)Optional initial whitelist: single repository absolute path allowed for graph. If configured and valid Git repo, appears in repository dropdownNot configured
reposString array (paths)Optional initial whitelist: same as repo but supports multiple; if configured, appears in repository dropdownNot configured

Both are optional, works without configuration—use top bar "📂 Open" or empty state "Open folder" button to browse and add Git repositories from any path anytime, added paths persisted in browser localStorage (key gg2-repos, re-registered to server on each load via repos?add=).

FAQ

Q: Where to find it in the chat page after installation?

A: Open any chat page, a "Git 图谱" tab will appear next to "轨迹" tab, click to enter this plugin's visual interface.

Q: Can I use it without writing config.repo/config.repos?

A: Yes. These two fields are optional whitelists, writing or not doesn't affect basic functionality; without configuration the graph follows current conversation's Git workspace, to view other repositories use top bar "📂 Open" or empty state "Open folder" to manually add.

Q: Must have Git installed on system?

A: Yes, required. Server calls git CLI directly via execFile('git', ...) (index.js:26), without git any API will fail and return git's error message.

Q: Large repositories lag? How to load more?

A: Default 200 commits per page, tens of thousands won't lag. "Load More" button at bottom, click to pull next page on demand; total count displayed in status bar via git rev-list --all --count in real-time.

Q: What credentials needed for push/pull?

A: Uses your global git config (SSH key, git credential helper, HTTPS token, etc.). Plugin doesn't manage credentials, authentication failures return git's stderr as-is.

Q: Will auto-update overwrite and break current version?

A: No. Before update creates .bak-<ts> backup at same level as plugin directory before replacement, any step failure rolls back from backup; automatically cleans up historical backups after success, keeping only latest.

Q: How to uninstall?

A: dsh plugin --profile web remove github:1841220388zzzcccxxx-star/dsh-git-graph, then restart dsh web. Configured whitelist is just initial accessible set, not persisted to plugin directory, cleared on uninstall.

Q: Will write operations like revert, push, delete branch accidentally trigger?

A: No direct execution. All destructive actions show confirmation dialog in client first, destructive writes require checking "Confirm" button before going to server; server then validates path must be within repository, validation failure returns path-outside-repo.

Learning Curve

Beginner — Install and use, top bar buttons and right-click menus are translations of common Git client actions; only need to glance at README or AGENTS.md for a few concepts like path whitelist, auto-update trigger logic.

Known Issues & Limitations

  • Git must be installed on system: All data from execFile('git', ...); completely unusable without git
  • Update requires manual restart of dsh web: Auto-update only replaces disk files, running process still holds old code; AGENTS.md / README / autoupdate comments explicitly require restart
  • Large file diff gets truncated: Server MAX_DIFF_CHARS = 240000 (index.js:17), single file diff / commit patch exceeding that length truncated and returns truncated: true flag
  • Windows schema false positive: Write operation path validation relies on forward/back slash normalization (replace(/\\/g, '/')), if repository itself not on standard drive path may need to restart before accessing
  • Remote operations may fail with credentials: push / pull / fetch carry no credential handling, fully depend on user's git global config; non-fast-forward or auth errors echo git error as-is
  • Write operations depend on client confirmation: Server doesn't gate safety checks for dangerous operations like "discard all changes" / "force push", confirmation UI all in client; custom clients / reverse calls need to handle confirmation flow themselves

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/1841220388zzzcccxxx-star/dsh-git-graph)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory