Introduction¶
When coding and running agent sessions in the DeepSeek Harness (DSH) Web GUI, the workspace is often a Git repository. The common workflow is to switch to a terminal or IDE to branch, stage, commit, and push. With multiple sessions and side-bar switching between different workspaces, you also have to remember “which repository does the current cwd correspond to.” @xia-sc/dsh-git consolidates the full set of Git operations into a collapsible floating panel and re-binds it in real time to the workspace of the current session — switching sessions switches the repository view, no need to manually align paths.
What This Is¶
@xia-sc/dsh-git is a client-side Git management plugin for DSH Web (maintainer: xia-sc, npm package name @xia-sc/dsh-git, current documentation version 0.7.1, MIT license). It consists of two UI parts:
- A status capsule at the top-left corner of the input box (
conversation.input.dock): shows a branch summary, or a “current workspace is not a Git repository” hint; click to expand/collapse the panel. - A floating panel (
shell.overlay): no DOM is rendered when collapsed, so it does not block the input box; when expanded, it provides the complete workflow of branching, fetching, committing, pushing, change list and diff viewing.
Both UIs share the same store and re-bind themselves when the session and its cwd change; switching workspaces clears the selected files to avoid mixing repositories.
Core Features¶
The workflows listed in the README are as follows (all implemented in the panel and RPC):
- Branches: switch (with dirty-tree pre-check and warning), create new branch based on local or remote references (e.g.
origin/feature/x). - Remote: fetch updates, fetch and merge (pull fast-forward only
git pull --ff-only), push. - Local commit chain: stage all (
git add --all), commit (commit, with AI-drafted commit message), status, recent commit list. - Changes: list of uncommitted files (path + status color label); click a row to open a unified diff on the right (toggle between unstaged/staged, draggable pane width, large diffs are truncated and expandable).
Other interface and behavior highlights:
- Operation feedback is fixed in the top row of the panel; verbose Git output is collected under “Details ▾”.
- The panel content is preserved on refresh, with only a “Refreshing…” indicator shown in the top bar.
- Commit area order: Stage all → choose AI generation basis (staged/unstaged/all) → ✨ AI Generate → write or edit and then commit; committing itself does not implicitly stage.
- The top-bar ⚙ lets you set the commit message language (including “Auto” and multiple languages), stored in browser
localStorage(keydsh-git.commitLanguage). - Host-side Git operations go through
execFile(no shell), with timeout; the browser calls via a self-hosted route/dsh-git-rpc(consistent with the connection plugin RPC envelope, same security fence as/api).
Environment requirements: the documentation states dsh ≥ 0.1.5-rc.1 is required (self-hosted HTTP route); the session-binding logic adapts to the way current sessions are provided by session seats starting from dsh ≥ 0.1.6-alpha.2.
Installation and Activation¶
Install under the Web profile (commands from the README):
dsh plugin --profile web add @xia-sc/dsh-git
You can also install from the same GitHub source:
dsh plugin --profile web add https://github.com/xia-sc/dsh-git
After installation, restart dsh web (the bundle and browser roster are assembled at startup). After refreshing the page, if the current session’s workspace is a Git repository, a dock capsule appears above the input box; click to expand the panel.
Uninstall:
dsh plugin --profile web remove @xia-sc/dsh-git
Typical Usage¶
- Open DSH Web, select a session whose workspace is a Git repository; click the capsule at the top-left of the input box to expand the floating panel.
- Check the status line: uncommitted count, ahead/behind relative to upstream. When you need to update the remote, use the network toolbar Fetch Updates or Pull & Merge (fast-forward only); then Push.
- After modifying code, click a file row in the “Changes” card to view the diff; after confirming, click Stage All, optionally ✨ AI Generate the commit message (default basis is “staged”), then submit with Ctrl/Cmd+Enter in the input box.
- Switch branches: use the branch switcher; if there are uncommitted changes, it lists the affected files and warns first, and you can cancel or Switch anyway. To create a new branch: click “+ New branch”, fill in the name, select the base branch, and confirm.
AI generation uses the current session’s model routing and carries sessionId (some gateways require session affinity); on failure, a localized reason is shown in “Last operation output”.
Suitable Scenarios and Notes¶
Suitable for: developers who primarily converse and modify code inside DSH Web, want to switch to a terminal less often, and want the panel to automatically align with the repository based on the session’s cwd.
Notes:
- The plugin executes
gitand network operations under the DSH host process permissions. Before installing, review the GitHub source code and the MIT license yourself to confirm compliance with your security policy. pulldoes not perform non-fast-forward merges; switching branches with a dirty tree may be rejected by Git, and the panel tries to give a readable prompt.- The community directory plugin page on skillhub.cn and GitHub are public information sources; the DSH ecosystem is “everything is a plugin”, and this directory is a community site with no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
@xia-sc/dsh-git packs branching, fetching, staging, AI-assisted commit, pushing, status, and clickable diff into a floating panel that moves with the session, making it suitable for completing the daily Git loop inside the Web GUI. For further details on features and RPC, see the repository README; for installation and indexing, see the community directory page and GitHub:
- Directory page: https://www.skillhub.cn/plugins/xia-sc/dsh-git
- GitHub: https://github.com/xia-sc/dsh-git