Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture. In agent development or code collaboration scenarios, developers frequently need to check repository status, commit history, and perform Git operations during conversations. The taontech/dsh-git plugin adds a Git tab to the DSH conversation interface, integrating repository overview, file status, commit history, and common Git operations on the browser side, and avoids frequent terminal switching.
Installation and Activation¶
The plugin is distributed as an npm package. After installation, the GUI must be restarted for changes to take effect.
- Install the plugin
Run the following command in the terminal to install the plugin into the specified profile:
dsh plugin --profile <name> add @taontech/dsh-git
- Confirm the configuration
Verify that the plugin has been correctly injected into the configuration:
dsh --profile <name> --dump-config
The output should contain configuration lines related to dsh-git.
- Restart the GUI
After installation is complete, the GUI of the web profile must be restarted to see the newly added Git tab.
Core Features¶
The plugin mainly provides the following capabilities:
- Repository Overview
Displays the Git status of the current project, including the root directory, current branch, remote URL, ahead/behind commit counts, latest commit message, and whether the repository is in a dirty state. - File and Commit Management
Displays file modification status (staged, unstaged, untracked) and commit history. Supports viewing commit hash, author, date, and subject. - Branches and Commit Graph
Displays the branch list and provides an ASCII-character-based commit graph (git log --graph), intuitively showing branch evolution. - Contribution Calendar
Displays a daily commit heatmap for the past year (date -> count) to quickly understand commit frequency. - Git Operations
The plugin wraps common operations: staging files, unstaging, committing (with message validation), pushing, pulling, switching branches, and initialization. - Non-Git Directory Handling
When a directory has not been initialized with Git, the plugin displays the file list and provides a one-clickgit initbutton. - macOS Quick Open
On macOS, supports opening the repository in the host terminal (Terminal / iTerm) or directly launching an interactive agent app (OpenCode / Claude / Codex / Antigravity).
Technical Architecture¶
The plugin implements both “Server” and “Client” logic through a single npm package:
- Dependency Library
All Git command execution is delegated to thegmclibrary (therunGitmethod ingmc/lib/git.js), while the plugin is only responsible for parsing and display. - Server Side (Data and APIs)
InjectswebServerviadsh.bundle.patch. Provides a series of RESTful endpoints for retrieving data and executing operations:GET /dsh-git/info: Retrieves repository overview.GET /dsh-git/status: Retrieves file modification status or a non-Git directory list.GET /dsh-git/log: Retrieves commit history.GET /dsh-git/branches: Retrieves the branch list and commit graph.GET /dsh-git/contributions: Retrieves contribution calendar data.POST /dsh-git/*: Executes operations such as commit, push, and initialization.
- Client Side (UI Integration)
Registers theconversation.viewslot to display the Git tab, and registers theconversation.input.dockslot to display the Hero overview card (including branch, heatmap, and quick launch buttons).
Notes¶
- Environment Requirements
The plugin requires Node.js version >= 18. - macOS Limitations
Terminal quick open and agent app launch on macOS only support loopback addresses and cannot directly pass through to remote SSH sessions. - Path Display
On macOS, paths returned by Git may include/private/var/...; this is a symbolic link for/varand is normal. - Restart to Take Effect
After installation, be sure to restart the GUI to activate the Git tab.
Summary¶
taontech/dsh-git is a feature-complete DSH Git plugin. It uses the gmc library to handle low-level commands and communicates with the frontend through a standard JSON API, providing developers with a solution for managing repositories without leaving the DSH interface. It is suitable for developers who need to perform code review, branch management, and daily commits in DeepSeek Harness.