tu1918/dsh-git-plugin: DSH Web Right-Side Persistent Git Panel

Introduction

When using agents to modify code in DeepSeek Harness (DSH), workspace state often requires switching back and forth between the conversation area and the terminal: to check which files were modified, whether to stage them, what to write in the commit message, or whether the local branch is ahead of or behind the upstream, you usually have to open a separate terminal or IDE. Additionally, modal overlays can interrupt the conversation context.

The following is an introduction to the community plugin tu1918/dsh-git-plugin (npm package name @tutu1918/dsh-git-panel). It occupies a resident tab in the right sidebar of the DSH Web GUI, allowing you to browse changes, stage, commit, and sync directly for the current session workspace without leaving DSH or using a full-screen mask that covers the session.

What is This

  • Positioning: A Git panel for the DSH Web GUI (a resident right-sidebar tab) used to review, stage, commit, and sync the session workspace.
  • Maintainer: tu1918 (the author field in package.json is tujunwenjie).
  • Category: Client-side plugin (dsh.client.platform is web; injects client modules such as the right sidebar and session).
  • Version & License: The package.json in the materials is 1.0.1; the GitHub README states that v1.0.0 was released as the feature baseline; License is MIT. The runtime environment requires Node.js >= 22.
  • Community Directory: SkillHub Plugin Page (an independent community site, with no official affiliation to DeepSeek/High-Flyer; the page indicates the client can be installed, v1.0.1).
  • Source Code: github.com/tu1918/dsh-git-plugin (GitHub stars in the README show 0).

The DSH ecosystem emphasizes “everything is a plugin”; this plugin hooks into the Web client via a Cordis bundle (cordis.patch.yml), while the backend provides real-time git status, branches, and logs via /git-panel/*.

Core Features

The following are derived from the project README’s “What works today” and version notes, summarized by usage path.

Changes & Commits

  1. Change List: Displays staged / changes / untracked / conflicts grouped by git status; each row has a file type glyph, a status letter on the right (e.g., U for untracked, VS Code style ! for conflicts), and a tooltip.
  2. View Modes: The same list can be toggled between File Tree (directory collapsing, single sub-directory chains compressed into one line, directory displays subtree file count) or Flat List; preferences are remembered per user.
  3. Staging: Stage / unstage single files or entire groups.
  4. Commit Area: Commit scope is explicit—only index, or all tracked changes (button text indicates the scope and count); there is a resident staged drawer above, consistent with the content of the commit box.
  5. Commit Message: Supports AI-generated commit messages (depends on peers like @deepseek-ai/dsh-llm).
  6. Sync: Pull ↓, Push ↑n, Sync ⇅; can set upstream on first push; rejections due to non-fast-forward will prompt to use Sync.
  7. Fetch: A separate fetch for all remotes next to Pull (does not modify the working area, index, or current branch), used to update remote-tracking and ahead/behind counts; if there are no remotes, it explicitly prompts rather than silently succeeding.

Branches & History

  • Branch Bar: Branch name, statuses like detached / unborn / lost upstream, and ↑ahead ↓behind indicators.
  • Branch Selector: Includes a read-only section for remote-tracking branches (displaying e.g., origin/feature and tip subject); checking out remote branches involves rebase/conflicts and is intentionally not a one-click checkout here.
  • Recent Commits: Lookahead pagination; pushed / unpushed markers; read-only loading only when the corresponding tab is visible.
  • History Line Decorations: Local branches, remote-tracking (e.g., upstream/main), and tags (e.g., v0.2.9) are displayed as badges, up to three plus +N.
  • History Operations (README version notes): revert, cherry-pick, reset, squash, drop, etc.; commit graph, single file drill-down, copy entries; discard / undo / stash (M5) are all delivered.
  • Diff: Diff view; lines omitted by git between two hunks can be expanded progressively (A-12).

Refresh, Multi-Repo & Credentials

  • Auto-Refresh: Recursively watches the working tree and .git directory, pushing refs / index / worktree changes via SSE; agents writing files directly are also reflected in the panel. If watch is not supported, it uses state-file polling, and if that fails, stat on the same batch of files.
  • Multi-Repo Workspace (FR-8): When the session directory is a container rather than a single repo, it scans one level down for git repositories (skipping dot-directories, node_modules, dist, build); a selector appears only when multiple repos exist, defaulting to the repo with recent git activity, with the selection remembered per container.
  • HTTPS Credentials: Returns auth-required when authentication is needed but credentials are missing, allowing username/password entry; “Save and Retry” stores via the harness’s ctx.credentials and retries via GIT_ASKPASS; GIT_TERMINAL_PROMPT=0 prevents terminal hangs.
  • Timeouts & Special Hangs: Git operations have an end-to-end deadline; waits for GPG signing pinentry or SSH passphrases/host keys are identified as gpg-prompt / ssh-prompt respectively, rather than generic timeouts.
  • Interface Language: Chinese and English.

Operation Boundaries

If any git change exceeds the deadline, the result is marked as unknown (git may still be running), and the panel will re-read the repository state instead of falsely reporting success. Mutations, the browser, and the host all carry their respective deadlines.

Installation & Enablement

The package.json and SkillHub directory page fetched in the materials provide the package name and version, but do not include a copy-pasteable dsh plugin … installation command; please do not construct forms like github:tu1918/dsh-git-plugin yourself.

  1. Open SkillHub: tu1918/dsh-git-plugin and follow the page’s “Installable / Client” instructions to complete installation (package name is @tutu1918/dsh-git-panel).
  2. Before installing, confirm that the DSH Web version satisfies the plugin’s peer dependencies (such as @deepseek-ai/cordis, @deepseek-ai/dsh-credentials, @deepseek-ai/dsh-llm, etc., see package.json).
  3. After enabling, restart or refresh DSH Web (if your environment requires it), open the right sidebar in a session bound to a git repository, and select the Git-related tab (the README screenshot indicates it is a tab in the right sidebar).

The plugin runs with the permissions of the current dsh process; please review the source code and the MIT license yourself before installing, and understand its read/write capabilities regarding your workspace and remotes.

Typical Usage

The README does not provide a step-by-step tutorial; combined with the panel design, the reproducible daily workflow is as follows:

  1. Open a session in DSH pointing to a git repository (or a container directory containing multiple repos).
  2. Open the right Git panel: view Changes / Untracked (a single scrolling list with section headers sticking to the top) and the Staged drawer.
  3. Stage the files to be included in the current commit; confirm the scope in the commit box (only index or all tracked changes), fill in or generate the commit message, and commit.
  4. Use the branch bar to view ↑↓ relative to upstream; use Fetch to update remote-tracking if needed, then Pull / Push / Sync.
  5. Click a file or history line to enter diff or commit details; perform revert, cherry-pick, etc. on history lines if needed (note that conflicts will enter the conflicts group).
  6. In multi-repo containers, switch the target repository via the repo selector next to the branch bar (only root directories scanned by the host can be selected).

When using remotes via HTTPS and credentials are missing, follow the panel prompt to save credentials and retry the same operation; GPG/SSH related hangs require configuring gpg-agent, ssh-agent, or pre-trusting the host in the terminal according to the return code instructions.

Applicable Scenarios & Notes

Suitable for: Developers who mainly drive agents to modify code within DSH Web but want to complete “view diff → stage → commit → push/pull” without leaving the session; scenarios requiring a quick view of branch and upstream relationships, recent commits, and graphs; managing multiple git roots under monorepo-style container directories.

Notes:

  • The plugin is categorized as a client-side tool; its capabilities are bound to the Web GUI and session workspace, it is not a standalone CLI.
  • All git and credential operations inherit dsh process privileges; only install from sources you trust, and read the Issues, docs/TODO.md, and docs/plan.md to understand undelivered items and milestone deviations.
  • Complex flows like remote branch checkout and merge conflicts are designed to be handled in conflict views and dedicated flows, rather than a one-click completion in the branch selector.
  • SkillHub is a community directory; installation steps are subject to the page’s display at the time; versions are subject to the package you install and the directory page labels (materials indicate 1.0.1).

Conclusion

tu1918/dsh-git-plugin integrates the Git workflow into a resident panel on the right side of DSH Web: change grouping, staging and committing, diffs, branches and upstream, fetch/sync, as well as multi-repo and credential seams, aiming to reduce switching between conversations, terminals, and external Git UIs.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye