# dsh-git-graph > ๐Ÿงญ **A ready-to-use git visualizer for the DSH ecosystem.** An embedded git tool for the DeepSeek Harness (DSH) Web GUI: GitHub-style commit graph, branch management, code diffs, and a VSCode-style uncommitted changes panel โ€” all inside your AI session, no need to switch to another git client. An embedded git repository graph visualizer for the DeepSeek Harness (DSH) Web GUI. View, browse and manage git repositories right inside the harness conversation โ€” commit history graph, branch filtering, commit details, file diffs and working-tree changes, all embedded in the interface without leaving the current session. See at a glance what changed, who changed it, and whether to commit. **Who it's for**: developers doing AI coding / agent development with DeepSeek Harness; git users who want commit history, branches and working-tree changes in one view; developers and teams looking for a more visual git tool than the command line. > ๐Ÿ” Search keywords: DSH plugin ยท DeepSeek Harness plugin ยท git visualization ยท git graph ยท commit history ยท branch management ยท code diff ยท VSCode-style changes panel ยท git productivity tool ยท AI coding assistant > ๐Ÿ›  This plugin is developed with AI assistance. ![Git ๅ›พ่ฐฑ](https://img.shields.io/badge/DSH-Plugin-58a6ff) ## ๐Ÿ“ธ Preview Git Graph demo ## โœจ Features - **Commit history graph**: GitHub-style commit list with foldable per-branch groups and branch coloring (local and remote branches each get their own group) - **Follows the current session**: shows the git repository of the workspace you are viewing; switching sessions follows automatically. Non-git workspaces show an empty state - **๐Ÿ“‚ Open folder (v0.11)**: not limited to the current session workspace โ€” click "Open" in the top bar (or "Open folder" in the empty state) to browse the disk (drives โ†’ folders, with git markers), pick any folder (e.g. a repo B in another workspace) and view its version control; added repos persist, switch via the top dropdown any time, and they survive a page refresh - **Branch filtering**: checked = visible, unchecked = fully hidden (empty selection shows an empty list) - **Commit details**: commit message, changed files, per-file diffs, compare two commits (Ctrl+click), ๐Ÿ“œ file history (every commit touching a file) - **Uncommitted changes (VSCode-style, persistent at the top of the graph)**: grouped file lists (Staged / Changes / Untracked), status badges (A/M/D/R/U/?), per-file +/โˆ’ line counts, click-to-expand per-file diff (syntax highlighted), renames `old โ†’ new`, untracked file contents; the โ˜‘ groups toggle hides any group, and both the panel and each group fold on click; **per-row stage/unstage/restore, top-bar stage-all/commit, checkboxes for batch actions (stage/unstage/restore/ignore/commit selected)** (destructive actions ask for confirmation first); the commit dialog can **โœจ AI-generate a commit message** (heuristic candidates from the diff, editable) - **Right-click menu**: copy hash/message, view details, ๐Ÿท๏ธ tag a commit (rename/delete tags too), ๐ŸŒฟ create a branch from this commit, ๐ŸŒ open the GitHub commit page, copy repo path, open in file manager - **Remote/branch operations**: top-bar `โฌ‡ Fetch` (git fetch) and `โฌ† Push` (git push current branch, confirmed first); branch-group right-click โ€” local branches: ๐Ÿ”„ switch / โฌ† push / ๐Ÿ—‘๏ธ delete (merged-only, HEAD protected), remote branches: โฌ‡ fetch / copy remote branch name - **Remote branches always visible**: remote group headers render even when fully synced with a local branch, labelled ใ€ŒๅทฒๅŒๆญฅใ€(synced) or ใ€ŒๅทฒๅŒ…ๅซใ€(contained) - **Auto-update**: silently checks the latest GitHub tag when the graph opens; when a newer version exists the top bar shows ใ€Œ๐Ÿ”„ ๆ–ฐ็‰ˆๆœฌ vX.Yใ€โ€” one click downloads and swaps the plugin files (old files are backed up, failures roll back automatically), then a restart applies it - **State memory**: branch filter, group toggles, fold states and theme persist across refreshes (keys unified to `gg2-*` since v0.8; branch groups are expanded by default on first open) - **Multi-repo switching**: a dropdown at the top of the graph page switches between repos - **Large-repo support**: the commit list loads in pages (200/page + load more) - **Keyboard shortcuts**: `Ctrl+F` search, `Ctrl+/` shortcut panel, `Ctrl+B` fold/unfold all branch groups, `โ†‘โ†“`/`j`/`k` navigation, `Enter` details, `Esc` close - **Auto refresh**: while the page is visible it polls every 5s and updates the stats bar and list when the working tree or new commits change - **Theme system**: auto-follow / dark / light, plus **8 style presets** (same set as ๆ‹พๅ…‰่ฎฐ) โ€” ๐ŸŒธ sakura (falling petals), ๐ŸŒŠ ocean (waves/bubbles/fish), ๐ŸŒฒ forest (trees/leaves/fireflies/butterflies), ๐ŸŒ™ night (stars/moon/meteors), ๐Ÿฌ candy (rainbow/ribbons/lollipops), ๐Ÿ’ผ business (geometric shapes/glass blocks), โœจ starry (stars/moon/meteors/earth), ๐Ÿค– tech (circuits/gears/chips), each with its own animated background (ocean/tech/business/candy have higher element density) - **Mount point**: the "Git ๅ›พ่ฐฑ" tab inside the session pane (next to the trajectory tab) ## ๐Ÿ“ฆ Installation ### 1. Add the plugin to your profile Edit your DSH web profile's `package.json` and add the dependency: ```json { "dependencies": { "dsh-git-graph": "file:./plugins/git-graph" } } ``` (`plugins/git-graph` is the directory containing this plugin source; adjust the path as needed.) ### 2. Mount the bundle Add the following to the profile's `cordis.patch.yml`: ```yaml - insert: - id: git-graph name: dsh-git-graph config: repo: "C:/path/to/your/repo" ``` > `config.repo` / `config.repos` is an **optional** initial allowlist of repositories the graph panel may open; you can skip it entirely โ€” the "๐Ÿ“‚ Open" button (v0.11) lets you browse and add any folder's git repo on the fly, and the picks are remembered. Repositories discovered in the session workspace are added automatically at runtime, too. ### 3. Install and restart ```bash pnpm install # then restart dsh web ``` Open http://127.0.0.1:3080 and select the **Git ๅ›พ่ฐฑ** tab in any session. ## ๐Ÿ–ฑ๏ธ Usage | Action | Description | | --- | --- | | "Git ๅ›พ่ฐฑ" tab in a session | Open the graph for the current session's workspace | | ๐Ÿ“‚ Open / empty-state "Open folder" | Browse the disk and pick any git repo (e.g. folder B in another workspace); it is added and its graph is shown (v0.11) | | Repo dropdown at the top | Switch repositories - the repo label to its left shows the full path | | Branch group header | Click to fold / unfold that branch | | โ˜‘ Branch filter | Checked = visible, unchecked = fully hidden | | "ๆœชๆไบคๆ”นๅŠจ" block at the top of the graph | Staged / Changes / Untracked overview (incl. untracked files); click a file row to expand its diff; per-row stage/unstage/restore; batch actions via checkboxes | | Commit row | Click for details; Ctrl+click to compare with another commit | | Right-click a commit row | Copy / details / tag / create branch from commit / open GitHub commit page / copy repo path / open in file manager | | "ๆœชๆไบคๆ”นๅŠจ" status line | Click to scroll to the top changes block | | โ†ป Refresh | Reload repository data | ## ๐Ÿ› ๏ธ Development ``` git-graph/ โ”œโ”€โ”€ index.js # Server half: git API (graph/branches/workstatus/workfile/diff/...) โ”œโ”€โ”€ client.js # Client half: "Git ๅ›พ่ฐฑ" session tab โ”œโ”€โ”€ web/index.html # The graph page (standalone page inside an iframe) โ”œโ”€โ”€ package.json # Plugin manifest (dsh.client.inject + bundle patch) โ”œโ”€โ”€ dsh.plugin.json # Official DSH plugin manifest โ””โ”€โ”€ cordis.patch.yml # Profile mount point ``` After editing, sync to your DSH deployment directory (`node_modules/dsh-git-graph/`): ```powershell .\sync-deploy.ps1 -Dst C:\path\to\your\.dsh\profiles\web\node_modules\dsh-git-graph ``` Server (`index.js`) and client (`client.js`) changes require a dsh web restart; `web/index.html` changes take effect after a page refresh. See `AGENTS.md` for full development conventions. ## ๐Ÿ“„ License [MIT](./LICENSE) ## ๐Ÿ™ Acknowledgements - [DeepSeek Harness](https://github.com/deepseek-ai/) โ€” the plugin platform