Preface¶
When handing projects to DSH (DeepSeek Harness) to run tasks, the web UI in the browser is the primary workspace. But when dealing with git—staging, committing, switching branches, pushing—you have to switch to the terminal or open an editor elsewhere, which easily breaks your train of thought. DSH’s philosophy is “everything is a plugin,” meaning client-side interface capabilities can also be filled by plugins. The @mojiexuan/dsh-git introduced below is such a plugin: it mounts a source code management panel on the web UI sidebar, moving the repository’s daily git operations into the browser.
What is This¶
@mojiexuan/dsh-git is a VS Code-like Git source code management panel plugin built for the DeepSeek Harness web UI, by Jia-Bao Chen (GitHub: mojiexuan), under the MIT license, version 0.2.1.
It covers: repository initialization, file-by-file staging, commit / push / publish branch / pull, branch and remote management, and provides AI-generated commit messages and a commit history topology graph. Implementation-wise, it is split in two: the host side runs on the Node side, encapsulating git/* RPC endpoints; the client side runs in the browser, responsible for the panel UI and rendering.
Core Features¶
Panel Entry and Repository Initialization¶
Inside the sidebar bottom (above Settings) is the panel toggle. When the panel opens and the current workspace is not a git repo, a one-click “Initialize Git repository” button appears, executing git init -b main in the background.
Staging and Committing¶
The panel has two collapsible lists: Staged changes and Changes. Each file can be staged (add) or unstaged (remove) individually, or all staged/unstaged in bulk. The main action buttons change according to git semantics:
- Commit is shown when there are uncommitted changes; if there is no staged content, it will be staged automatically first.
- Push is shown when the branch is tracking a remote and is ahead.
- Publish branch is shown when the branch has no upstream but has local commits.
Pull, Branch and Remote Management¶
The Pull button only appears after a remote is configured. Clicking it executes git fetch --all --prune, pulling all remotes and branches at once. Branch management supports listing, switching, creating, and deleting (with confirmation). Remote management supports viewing, adding, and deleting the origin remote (also with confirmation).
AI Commit Messages¶
Based on the diff of the staging area/workspace, commit messages are generated streamingly by the harness LLM, following Conventional Commits format, defaulting to Chinese output.
Commit History Graph¶
Commit history is rendered as an SVG lane topology graph, covering all branches and remotes. The lane topology is calculated on the client side, expanded by default at the bottom of the panel, occupying half the panel height. The loading method is lazy pagination combined with virtual scrolling, automatically loading the next page when scrolled to the bottom. Clicking a commit allows inline expansion of its changed files; hovering shows message/author/date/hash, and the full hash is copyable.
Auto-refresh and Self-update¶
The panel polls git status every 2.5 seconds, so changes, commits, and pushes made outside the panel are also synchronized.
When the panel is opened for the first time, it silently checks if there is a new version on the npm registry. When there is an update, a badge appears on the sidebar entry, the panel header provides a one-click update link, and a restart prompt appears after completion.
Interface and Platform¶
The interface supports both English and Chinese. It works across Windows / macOS / Linux platforms; git runs without restrictions, so native TLS and credential helpers on each platform work normally.
Installation and Enablement¶
First install the plugin:
dsh plugin --profile web add @mojiexuan/dsh-git
Then start dsh web, and you can see the panel entry at the bottom of the sidebar.
Uninstall and Update:
# Uninstall (works for both published packages and local links)
dsh plugin --profile web remove @mojiexuan/dsh-git
# Update to the latest released version
dsh plugin --profile web update @mojiexuan/dsh-git
If it is a local link development (dsh plugin --profile web add .), there is no separate update step: first do npm run build, then completely restart dsh web (host bundle) and refresh the browser (client bundle).
Build from source:
npm install
npm run build # Generates lib/index.js (host) and lib/client.js (client)
npm run typecheck
Configuration¶
Optional configurations are written in the profile’s cordis.patch.yml:
- id: git
config:
maxDiffChars: 4000 # Maximum diff text length sent to the model (default 4000)
maxLogEntries: 2000 # Maximum number of commits per page in the history graph (default 2000, loads more on scroll)
provider: deepseek # Optional, fixed provider (uses the model deployed at runtime by default)
model: deepseek-chat # Optional, fixed model
reasoningEffort: off # off (default) disables reasoning; high / max / default passed through as-is
registryUrl: https://registry.npmjs.org # npm registry for self-update check (default npmjs.org)
maxDiffChars controls the diff truncation length sent to the model when generating commit messages; adjust as needed for large repositories; registryUrl is useful in intranet or mirror environments.
Typical Workflow¶
Taking a directory not yet under version control as an example, the daily workflow is roughly:
- Open the sidebar panel and click one-click initialize repository (
git init -b main) - Stage files one by one in the Changes list, or click Stage All
- Click AI Generate Commit Message, wait for the streaming output to complete, and manually rewrite if needed
- Click Commit; after the first commit, since the branch has no upstream, the button will change to Publish branch
- After adding origin via remote management, the Pull button appears in the panel; Push is shown when the branch is ahead of the remote
Through the above steps, staging, committing, and pushing can all be completed within the panel without switching to the terminal.
Applicable Scenarios and Notes¶
Suitable for people who work permanently in the dsh web UI and want git operations to stay in the browser. If you are used to the pure command line, this panel is a supplement, not a replacement.
A few points to note:
- Security Design: All
git/*endpoints are registered withauthority: 'loopback', accessible only by 127.0.0.1; user data is not concatenated into command strings—commit messages usegit commit -F -, paths use--pathspec-from-file=-, and branch/remote names and URLs are validated against safe character classes. - The plugin runs with the permissions of the current dsh process; it is recommended to read the source code and license before deciding to install. This project is MIT, with open source.
- Self-update checking depends on the npm registry; in an intranet environment, you can use
registryUrlto point to your own mirror address.
Conclusion¶
@mojiexuan/dsh-git installs a VS Code-like source code management panel into the dsh web UI: initialization, staging, committing, pushing, and branch and remote management are completed in the browser, along with AI commit messages and commit history topology graphs.
- Directory: https://www.skillhub.cn/plugins/mojiexuan/dsh-git
- Source Code: https://github.com/mojiexuan/dsh-git
The directory page is a community-maintained independent site and has no official affiliation with DeepSeek or Foxconn.