DeepSeek Harness Git Workbench Plugin

Introduction

In agent development, frequently switching between tools and jumping across multiple interfaces can interrupt your train of thought. This is especially true when working with Git operations, where you need to switch back and forth between the terminal, code editor, and browser (for viewing GitHub Issues), making it easy to lose track of state or make mistakes.

The DeepSeek Harness plugin ecosystem emphasizes “everything is a plugin,” allowing you to extend host capabilities through plugins. dsh-git-assistant is one such plugin that brings repositories, worktrees, branches, changes, diffs, commit graphs, and GitHub Issues into the left sidebar, the top tab of a conversation, and the right sidebar—so you can complete everyday Git operations without leaving the conversation.

Plugin Overview

dsh-git-assistant is a Git workbench running inside DeepSeek Harness. It was developed by maintainer GengDaPeng, is currently at version v0.5.0, and is licensed under the MIT License. The plugin provides a unified Git view entry point, supporting repository and worktree management, changes and commits, diff viewing, commit graphs, file browsing, and card-based GitHub Issues viewing. All operations are designed to keep you within the current conversation.

Core Features

Three Entry Points

The plugin provides three view entry points, tailored to different use cases:

  • Git icon in the left sidebar: a full-page main panel, ideal for centralized viewing and management;
  • Git tab at the top of a conversation: opens within the current conversation and works alongside the conversation context;
  • Git tab in the conversation’s right sidebar: displays side-by-side with the native conversation, convenient for checking Git status while chatting.

Repositories and Worktrees

  • Dropdown selector in the title bar for choosing repository, branch, and worktree;
  • Each worktree is displayed as an independently operable card, showing branch, ahead/behind status, and whether there are conflicts;
  • Worktree sorting: primary worktree first, then worktrees with changes, then sorted by most recent commit time;
  • Supports switching branches, creating new branches, syncing (pull), and pushing.

Changes and Commits

  • “Staged Changes / Changes” grouping, with support for individual staging, unstaging, discarding, and bulk operations on the entire group;
  • Stash: one-click stash of current changes (including untracked files), restore from the stash list, with a stash count badge on the card header;
  • Hovering over a file row reveals action icons; status letters (M/A/D/R…) are right-aligned; the inline “⋯” menu supports copying path, showing in file manager, opening with default application, and viewing file history;
  • After selecting a file, the diff header also provides copy path / show in folder / open / file history;
  • Multi-select (⌘ / Ctrl / Shift) for batch staging, unstaging, or discarding;
  • Split commit buttons: Commit, Commit (amend), Commit and Push, Commit and Sync;
  • Commit message input with workflow status hints; auto-refreshes after operations complete;
  • Worktree card header shows a primary checkout / worktree badge; branch name and directory name are not duplicated when identical.

Diff Viewing

  • Unified / split views; split mode auto-wraps lines to prevent left and right panes from overlapping;
  • Paginated rendering: large diffs render the first screen first and continue loading on scroll, avoiding a one-time freeze;
  • Oversized hunks are collapsed into a single line by default, with manual expansion available;
  • “N lines unchanged, click to expand” between hunks where Git omitted context—actual context is loaded on demand;
  • File header displays Material file icons and added/removed line counts;
  • Top toolbar allows selecting committed but unpushed commits to view all file changes for that commit, with support for collapsing / expanding all.

Commit Graph

  • A collapsible commit graph drawer at the bottom, with drag-to-resize height;
  • GitHub-style lane colors and smooth curves, with support for toggling between branch range / all refs;
  • Hover to view commit details; expand to view the file tree and single-file diff for that commit;
  • Infinite scroll, loading more commits on demand.

File Browsing

  • A complete filesystem tree for each worktree (not limited to Git-tracked files), collapsed by default with lazy-loaded directories;
  • Material Icon Theme icon mapping;
  • Preview for images, PDFs, audio, and video; binary files show a notice;
  • Right-click context menu on files for copying path, opening in system, and more.

GitHub Issues

  • A new “Issues” tab in the Git workbench: a card grid replaces the traditional list;
  • Each card shows the issue number, status, title, labels, comment count, update time, and parent/child issue badges;
  • Supports search and filtering by open / closed / all;
  • Clicking a card opens details in the wide left panel: status badge, Markdown body, labels, author, comment count, parent/child issue navigation, and “Open on GitHub”;
  • Comments are loaded on demand and rendered with Markdown, including author avatar badges and relative timestamps;
  • Write operations: post a comment directly at the bottom of the detail view (⌘/Ctrl + Enter to send), and support closing / reopening issues; local cache is invalidated immediately after writes;
  • Data is read and written via the locally authenticated gh CLI.

Conversation Collaboration

  • Drag a file from the file tree into the conversation input box to generate an attachment;
  • Select text from a diff or file content to quote it directly into the conversation input;
  • Chinese and English UI automatically follows the Harness language setting; light/dark theme follows the application theme.

Performance and Data Strategy

  • All Git commands are executed via Host-side argv calls (bypassing the shell); paths are validated and writes require confirmation;
  • Diffs are parsed into files and hunks on the Host side; the client only receives structured data;
  • Diff results are cached by “HEAD / staging area / file status” and precisely invalidated after write operations;
  • The Host pushes changes to .git/index, HEAD, refs, etc. via SSE for instant client refresh; status polling serves as a fallback with exponential backoff on failure and pauses when the page is hidden;
  • Staging / unstaging uses optimistic updates with automatic rollback on failure;
  • The Changes / Files panels remain mounted; switching views preserves state, and requests are paused when hidden;
  • GitHub Issues use a sliding cache + incremental sync strategy:
  • Full pull on first sync, recording the sync timestamp;
  • Subsequent syncs use since to fetch only changed issues; unchanged ones remain in cache;
  • While the Issues tab is active, a conditional poll with ETag runs every 2 minutes; 304 responses do not consume GitHub rate limits;
  • Local git push, gh commands in DSH, and changes to .git/refs all trigger incremental sync;
  • Only changed issues have their detail and comment caches invalidated.

Technical Architecture

  • src/index.js: Host-side plugin providing /git-assistant/api/* and GitHub Issue / gh integration;
  • src/client.js: Browser-side single-file UI (workbench, diff viewer, commit graph, file tree, Issues board);
  • cordis.patch.yml, package.json: plugin manifest and client injection declarations;
  • scripts/: smoke rendering, lane algorithm validation, jsdom interaction regression tests;
  • locale/, icon.svg: i18n strings and icon.

Installation and Activation

The plugin auto-registers after installation—no additional configuration required.

Method 1: One-liner (recommended)

dsh plugin --profile web add dsh-git-assistant

Method 2: Install from GitHub

dsh plugin --profile web add github:GengDaPeng/dsh-git-assistant

Method 3: Install from a local directory

Clone the repository to any local directory, then open the “Plugins” panel in DeepSeek Harness → “Add Plugin” and select that directory.

What Happens Automatically After Installation

The plugin ships with cordis.patch.yml (pointed to by dsh.bundle.patch in package.json). After installation, it automatically registers itself into the host composition—so you do not need to manually modify presets or cordis.patch.yml. A Git icon appears in the left sidebar, and you can also open the Git view from the top tab and the right sidebar of a conversation.

Environment Requirements

  • Local git (for all Git operations)
  • The Issues feature additionally requires a locally authenticated gh (GitHub CLI)

Use Cases

Ideal for developers who frequently perform Git operations, review commit history, and manage GitHub Issues within a conversation. If you are using DeepSeek Harness for code development or collaboration, this plugin can reduce tool switching and keep your workflow flowing.

Notes

The plugin runs with the permissions of the current DSH process. Review the source code and license before installing. The community directory (SkillHub) is an independent site and has no official affiliation with DeepSeek or High-Flyer.

Summary

dsh-git-assistant integrates core Git workbench capabilities into DeepSeek Harness. Through three entry points—the left sidebar, the top conversation tab, and the right sidebar—it provides a complete view ranging from repository management to GitHub Issues. It employs Host-side command execution with client-side structured rendering, combined with caching and incremental sync strategies, striking a balance between performance and functionality.

Plugin homepage: https://github.com/GengDaPeng/dsh-git-assistant

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

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

Xiaoye