dsh-sidebar-git-graph: Read-Only Git Commit Graph Sidebar for DeepSeek Harness

Introduction

During the development of agents or the construction of toolchains in DeepSeek Harness (DSH), developers frequently need to inspect repository commit history and working tree status locally. Although traditional command-line tools are precise, they incur costs in terms of visualization and context switching.

dsh-sidebar-git-graph aims to solve this problem. As a client-side plugin, it provides a right-sidebar page for the DSH web interface, rendering the repository of the current session as a visual Git commit graph. The plugin supports VS Code-style branch/merge swimlanes with Bezier curves and can coexist with dsh-better-sidebar.

Plugin Overview

This is a DSH plugin maintained by AFunDog. It primarily addresses the needs of viewing Git history and tracking changes in scenarios involving multiple repositories and multiple working trees. Operating in read-only mode, it builds its view locally using six Git commands and performs no write operations.

Core Features

1. Visualized Commit Graph
The page displays a read-only Git commit graph using a VS Code-style swimlane design. Each history line occupies a swimlane, with Bezier curves connecting branch forks and merges. Merge commits are rendered with larger dots, and the swimlane containing the current HEAD is highlighted with the theme color. Each commit node displays Ref chips (local branches, remote branches, tags), and the current branch’s text color aligns with the theme palette.

2. Working Tree Changes Area
Above the graph, a working tree changes area provides an overview of staged, unstaged, and merge-in-progress changes. Each row displays a file status letter (M/A/D/R/C/U) along with the number of added and deleted lines. Clicking a row expands the Diff inline. The changes area supports collapsing, and its state is remembered.

3. Multi-Repository and Multi-Working-Tree Support
When the workspace contains multiple repositories, a dropdown box appears at the top for selection. The plugin supports switching between different repositories and remembers the user’s choice. For scenarios managed via git worktree, the plugin lists and allows switching between different working trees, with each working tree displaying its own branches and uncommitted changes.

4. Search and Details
A commit message search function highlights matches and enables navigation through them one by one (without filtering the list). Clicking a commit row opens a detail view, including the full SHA, author, time, parent commits, and participating refs. Below, a list of files changed by that commit is shown; clicking a file expands a Patch view.

5. Performance and Limitations
Virtual list technology is used to render only visible rows within the window, optimizing performance when there are numerous commits. Requests are not sent when the page is inactive. However, the virtual list limits the window to a maximum of 2,000 items, and a maximum of 3,000 changed lines per batch.

Installation and Activation

Before installation, ensure the host environment meets the requirements: @deepseek-ai/dsh >= 0.1.7-rc.1.

Run the following command to install the plugin:

dsh plugin --profile web add github:AFunDog/dsh-sidebar-git-graph

After installation, restart the dsh web host process to load the new routes.

Activation steps:
1. Open the DSH Web client.
2. Select “Git Graph” in the right sidebar (if dsh-better-sidebar is installed, it can be found in the + menu; for bare DSH, it is on the start page).
3. Use the dropdown box at the top to switch repositories or working trees.
4. Click a row in the graph or an item in the file list to view details.

Use Cases and Notes

This plugin is suitable for developers who frequently need to view Git history and changes locally. It is particularly well-suited for managing workspaces containing nested repositories or multiple git worktrees.

Notes:
* Read-only Design: The plugin does not execute write commands such as checkout, commit, reset, rebase, fetch/push, add, or restore. It only uses rev-parse, status, for-each-ref, log, diff, and worktree list.
* Local Dependency: The graph is based solely on local repositories and makes no network requests; therefore, remote updates require an initial git fetch.
* Version Distinction: The dsh-git-graph on NPM is a plugin by a different author; this plugin is @zeng/dsh-sidebar-git-graph.

Summary

dsh-sidebar-git-graph integrates Git history and working tree status into the DSH sidebar through a visual approach. By prudently reading data in read-only mode and employing virtual lists and refined rendering, it provides a smooth viewing experience. For building development toolchains based on DSH, this is an efficient component for auxiliary state inspection.

Plugin Directory | GitHub Repository

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

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

Xiaoye