Introduction¶
When developing agents or debugging code in DeepSeek Harness, you often need to quickly review the commit history and change details of the current repository. The conventional approach either relies on the command line or opens a Git tool outside the IDE, and switching windows interrupts the workflow. This plugin provides an IDE-like Git history view in the right sidebar of DeepSeek Harness, displaying commits in reverse chronological order with a swimlane diagram, file-level diffs with line numbers, so you can review and edit side by side.
Plugin Overview¶
The plugin is named dsh-plugin-git-history, maintained by JiaLe1145, and categorized as a client-side plugin. It was developed and verified on DeepSeek Harness 0.2.2-rc.3 (Windows desktop edition), relying on the host’s connection.fetch and the right sidebar tab registration API. Older DSH versions may not provide these interfaces.
Core Features¶
Displays the Git commit history of the current repository in the right sidebar:
- Branch status: shows the current branch,
↑ ahead / ↓ behind, and the number of uncommitted changes. - Commit swimlane diagram: colored nodes and connecting lines, arranged in reverse chronological order with sticky date grouping.
- Refs badges: identifiers for HEAD, branches, tags, along with author and relative time.
- Commit details: full commit message, changed file statistics (+/- lines).
- Per-file segmented diff: diff with line numbers and syntax coloring; click a filename to scroll to the corresponding position.
- Keyboard navigation:
↑↓to select,Enterto open details,Escto go back,rto refresh,/to search. - Search: supports searching by commit message, author, or short hash.
- One-click copy of the full hash.
- Merge commits: shows diff relative to the first parent, consistent with GitHub’s merge commit view.
Installation & Activation¶
- Download the latest release package from Releases, or
git clonethe repository yourself. - Extract to obtain the
dsh-plugin-git-history/directory. - Open DeepSeek Harness → Settings / Plugins → Add Plugin, and select the directory (the one containing
package.json). - Fully quit and restart DeepSeek Harness (host plugins require a reload).
- Refresh the page (
Ctrl+R), open the right sidebar, click +, and select Git Commit History. - On first open, you’ll be prompted to select a repository: enter the absolute path of the repository root (e.g.,
C:/code/my-repo), then press Enter or click Apply.
Configuration¶
The plugin supports configuration via cordis.patch.yml:
repo: default repository absolute path; if left empty, the Host working directory is used and you can select it in the panel.debug: when set totrue, requests and git errors are written tohost-debug.login the plugin directory (auto-rotates when exceeding 512 KB).
Executed Commands¶
The plugin executes Git commands in read-only mode: no committing, no branch switching, no fetching, no hook execution:
- Repository validation:
git rev-parse --is-inside-work-tree - Branch / ahead-behind / dirty files:
git status --porcelain=v1 -b - Commit list:
git log -n<N> --date=iso-strict --pretty=format:... --no-color - Commit metadata:
git show -s --date=iso-strict --pretty=format:... <hash> - Merge commit parents:
git rev-list --parents -n1 <hash> - Changed file statistics:
git show --numstatorgit diff --numstat <first-parent> <hash> - Patch:
git show --patchorgit diff --patch <first-parent> <hash>
The environment is fixed with GIT_PAGER=cat, GIT_OPTIONAL_LOCKS=0, GIT_TERMINAL_PROMPT=0, LC_ALL=C.
API¶
The host registers two read-only routes under Harness’s /api channel, reusing Harness’s own session authentication:
GET /api/git-history.log?limit=150&repo=<absolute-path>: returns branch, ahead/behind, dirty file count, and commit list.GET /api/git-history.commit?hash=<sha>&repo=<absolute-path>: returns commit metadata, file statistics, and patch.
Limitations¶
- Read-only: no write operations such as committing, switching branches, or pulling are provided.
- Commit count: up to 400 per request (default 150, with “Load More” available).
- Patch size: patches exceeding ~240 KB are truncated; the UI only colors the first 2000 lines, with a line count indicator for the rest.
- File list: up to 40 files displayed; the rest are visible in the patch below.
- Merge commits: displayed relative to the first parent, consistent with GitHub.
- Repository path: must be an absolute path; the selection is stored in the browser’s localStorage and is not synced across devices.
Development & License¶
During development, you can directly modify files in the directory:
- Modify
client.js→ refresh the page to take effect (frontend module is re-fetched). - Modify
index.js→ requires restarting DeepSeek Harness (host modules are cached).
The license is MIT.
Use Cases¶
Suitable for developers performing code review, browsing commit history, and viewing diffs in DeepSeek Harness. Before use, ensure the current DSH version supports the relevant APIs, and review the source code and license.
Closing¶
This plugin provides a Git commit history panel in the right sidebar of DeepSeek Harness. Through the swimlane diagram, date grouping, and file-level diffs, it makes code review and history browsing more intuitive. For more details, visit the directory page and the GitHub repository.