Introduction¶
When coding or driving agents with DeepSeek Harness (DSH), version control usually means switching to a terminal, IDE, or a separate Git client: checking the staging area, viewing diffs, writing commit messages, browsing history. The conversation and center-column plugins live in the same window, but Git often occupies another application, and context jumps back and forth.
The community plugin dsh-git-tree (maintained by chzisnull) embeds a Git workspace with an information architecture close to Sourcetree into the DSH Web GUI: left-side workspace/branch/tag navigation, staged and unstaged lists, structured diffs, plus history and search, filling the center column of the main panel alongside the “Plugins” page. The current package version is 0.10.0 (MIT), classified as a client plugin in the SkillHub catalog; the version shown on the catalog page may differ from the repository, so refer to the GitHub releases and package.json.
What is it¶
dsh-git-tree is a client plugin for DSH: it adds a Git entry to the left icon bar, opens a full-height main panel, and lets you read status, stage, commit, view history, fetch/pull/push, and perform other everyday operations next to the conversation. It can optionally call an LLM registered with DSH to generate commit messages or help resolve single-file conflicts. It does not replace DSH’s plugin system; it is a separate entry in the community catalog with no official affiliation with DeepSeek / High-Flyer.
On the host side, ctx.subprocess executes git (without going through a shell); on the client side, src/client/index.tsx is built into client.js and registers the sidebar and main panel via a Cordis patch (both share the id git-tree).
Core features (0.10.0)¶
The following summarizes the implemented capabilities from the README and status table; unimplemented items are explained separately at the end.
Panel and repositories¶
- Enter the
mainpanel from theGitrow on the left of DSH, following DSH’s center-column layout and light/dark themes (all colors use--dsw-alias-*tokens to avoid hardcoded color values). - The toolbar repository switcher lists DSH-registered workspaces; pinned ones come first, others are sorted by switch frequency and most recent use.
- Shows the current branch, upstream, ahead/behind counts, and repository root path.
Changes and diff¶
- Change grouping aligns with Sourcetree: Conflicted / Staged / Unstaged, with counts; renames preserve the original path; when a file is changed on both sides, it appears once in each column (data comes from
git status --porcelain=v2 --branch -z). - Diffs are parsed on the host into files → hunks → lines, with the UI showing dual line numbers, hunk headers, full-row background coloring, and
+N −M; syntax highlighting is deliberately omitted, consistent with Sourcetree, to emphasize “which lines changed”.
Write operations and boundaries¶
Supports inline staging/unstaging, committing via the commit area (author, branch, staged count, ⌘↵), discarding changes, deleting/cleaning untracked files, creating/renaming/deleting local branches, checkout (a dirty working tree will refuse checkout, no automatic stash), and merging into the current branch.
Push the current branch to upstream (the first push can establish tracking), never force; the commit card has a “commit and push” checkbox, and a failed push does not roll back the commit.
Fetch / Pull: fetch with --prune updates remote tracking; pull fast-forwards to upstream, and when there is no upstream it tries origin/<same-name-branch>; a silent fetch runs once when the panel opens; when local and remote have diverged, it confirms before merging, and conflicts enter the conflict view.
The write-operation surface is deliberately kept small: no reset --hard, no force push, no amend, no rebase, no stash routes.
History, search and branches¶
- History: swimlane graph, description/short SHA/author/date, supports “All branches / Current branch only”, 200 entries per page.
- Commit details: message, author, date, parents, refs, changed files; can view the diff of a single file within a commit.
- Search: query commits by commit message, author, or file path.
- Branch sidebar: single click to browse history, double click to checkout; the right-click menu includes copy name, create branch from this commit, etc.
AI related (via the DSH llm service)¶
- Generate commit message: the commit card’s ✨ button fills in the text based on the diffs of files to be included this time (uses staged changes if any, otherwise working-tree changes); the model list comes from the same source as DSH’s model selector, and the choice is saved in
~/.dsh/git-tree/ai-settings.json(or$DSH_HOME/git-tree/ai-settings.json). It only fills the text box; a human still needs to click commit. - Conflicts: conflict files show
<<<<<<<marker lines (ours/theirs colored separately); “AI resolve” previews the merged result and writes to disk only after Apply; you can restore withgit checkout --merge, and Mark as resolved (git add) is a separate step.
Other¶
- While the panel is visible, status is polled every 2 seconds, and refreshed immediately after write operations.
- On macOS, you can show the repository in Finder or open it in the terminal.
- Not yet implemented: remote branches and remote management, compact mode for the right sidebar, rebase/stash/manual three-way merge editor, virtual scrolling for large repositories (explicitly not done), shared operations with the Agent.
Installation and activation¶
The installation command follows the repository’s README.zh.md.
Install from npm by package name (includes host, client, and bundle patch):
dsh plugin --profile <profile> add dsh-git-tree
In a session with a plugin manager, you can also:
plugin_manager action=install_bundle target=dsh-git-tree
Install from a local path (the example path is per the documentation; replace it with your own checkout directory):
dsh plugin --profile <profile> add /Library/aiProject/dsh-git-tree
After installation you need to restart DSH (the host half is assembled at App startup). The plugin will not write to your repository until you actively stage or commit.
Typical usage¶
- Register the target project’s workspace in DSH; after installing and restarting, click Git on the left to open the panel.
- Select the repository with the top switcher; view branches on the left, work on staged/unstaged/conflicted groups in the middle, and view structured diffs on the right.
- Check rows or right-click to Stage; write a message in the commit area, or use ✨ to have the currently selected DSH model generate a message based on the diff, then commit after confirming (optionally check commit-and-push).
- To sync with the remote, use fetch/pull to update ahead/behind, then push; on conflicts, handle them in the conflict view or try AI resolution and then manually mark as resolved.
- Switch to the history or search view to browse commits; before double-clicking a branch to checkout, make sure the working tree is clean.
Once the panel is open, all routes carry the cwd of the currently selected repository; the specific HTTP routes are in the “How to connect in DSH” section of the README (such as GET /api/git-tree/status, POST /api/git-tree/commit, etc.) for cross-checking when troubleshooting integration issues.
Use cases and notes¶
Suitable for: mainly conversing, writing plugins, or driving agents inside DSH, wanting Git status, diffs, commits, history, and fetch/pull/push completed on the same screen as the conversation, and accepting the conservative write-operation set of “no rebase/stash/force push”.
Notes:
- The plugin executes
gitand child processes on the host machine with the current DSH process permissions; before installing, read the source code and the MIT license, and confirm that path validation,GIT_TERMINAL_PROMPT=0, and other behaviors meet your security expectations. - The AI feature sends the diffs of selected files to the model you selected in DSH (diffs are truncated and marked when too large); no separate provider is configured, and credentials and rate limits follow DSH’s own configuration.
- The community catalog SkillHub helps discover plugins; stars and page version information are as shown on the site, and feature details follow the GitHub 0.10.0 documentation.
Conclusion¶
dsh-git-tree brings a Sourcetree-style Git information architecture into DSH’s main panel: repository switching, grouped changes, diffs, history search, controlled write operations, and fetch/pull/push, and reuses DSH models to write commit messages and assist with single-file conflict merging. If you are already using DSH’s “everything is a plugin” workflow, you can bring Git back from an external client to beside the conversation.
- Catalog page: https://www.skillhub.cn/plugins/chzisnull/dsh-git-tree
- Repository: https://github.com/chzisnull/dsh-git-tree