Introduction¶
When building agents in DSH (DeepSeek Harness), you often need to check commit history, compare diffs, pull the latest code, or switch branches. These operations typically require running git commands in a terminal and then switching back to a browser or IDE, resulting in a fragmented workflow. The plugin dsh-easy-git embeds a Git panel into DSH’s sidebar, allowing you to perform most Git operations within a single interface.
Plugin Overview¶
dsh-easy-git is a client-side plugin that provides a Git panel in the sidebar of DeepSeek Harness, maintained by luyanghtml (Luyang). It does not rely on any Git host API; instead, it invokes local git commands through the Harness host. Its core value lies in enabling you to browse commits, view per-file diffs, export patches, pull, and switch branches—all without leaving the DSH interface.
Core Features¶
1. Commit History¶
The panel lists the commit history of the current repository with pagination support. You can search by subject, author, or hash, with relative timestamps displayed. Scrolling through the list automatically loads the next page.
2. Per-File Diffs¶
Clicking a commit lists the files modified in that commit on the left. Clicking a file displays its diff: dual-column line numbers, hunk headers, and the count of added and removed lines. Merge commits are diffed against the first parent.
3. Fullscreen Diff View¶
Pressing Esc while in the diff view enters fullscreen mode, displaying the diff content across the entire panel. The file list remains on the left for easy file switching. Pressing Esc again exits fullscreen and returns to the diff view.
4. Export .patch¶
Selecting a folder, the panel generates a patch file in git format-patch format, named <short-hash>-<subject>.patch. The panel displays the full path and provides a one-click copy option.
5. Pull¶
Executes fetch + merge --ff-only on the current branch. If the branch has diverged or the working tree has conflicts, an error is reported. It will not automatically merge or reset.
6. Branch Management¶
Displays local and remote branch lists, with the current branch marked. You can switch to a local branch or check out a remote branch.
7. AI-Assisted Actions¶
The panel provides AI-assisted features powered by the model selected in Harness:
- Explain a commit (three-part breakdown)
- Review uncommitted changes
- Draft a PR description for the current branch
- Find the corresponding commit from a one-sentence description
These actions are only executed upon explicit click.
8. Commit from Panel¶
You can stage or unstage files, stage all, type a commit message, and commit (shortcut ⌘↵). If no model is configured, it falls back to a message generated from the file list.
9. Discard a Single File¶
Discarding a single file first copies its content to a temporary backup, then prompts a confirmation dialog.
10. Context Menu¶
- On a commit: copy full hash, copy message, open in browser
- On a file: view file history, copy file path, copy diff for that file, reveal in Finder
11. File History¶
Runs git log --follow on a specific file, displaying its history, with a filter chip to jump back to the full commit list.
12. Copy Repository URL¶
Normalizes git@ or ssh:// remote URLs into web URLs, copies them to the clipboard, and shows a brief “copied” toast.
13. Follow the Open Workspace¶
When switching to another workspace, the panel navigates to the panel containing that repository.
Installation & Activation¶
Install from npm (available once the plugin is published):
dsh plugin --profile desktop add dsh-easy-git
Install from GitHub:
dsh plugin --profile desktop add github:luyanghtml/dsh-easy-git
After installation, go to DSH’s “Plugins” settings, enable dsh-easy-git, and refresh the page. A Git icon will appear in the sidebar—click it to open the panel.
Typical Usage¶
View Recent Commits¶
Open the panel; the commit list is displayed by default. Scroll to load the next page, or search by subject or author.
View Changes for a File¶
Click a commit, then click a file on the left to view its diff. Press Esc in the diff view to enter fullscreen; press Esc again to exit.
Export a Patch¶
Click a commit, select “Export .patch” on the right, choose a save location, and the panel will generate the patch file and copy the path.
Pull Code¶
Ensure the current workspace is clean, then click “Pull” in the panel. If the branch has diverged or the working tree has conflicts, an error will be shown.
Use AI to Explain a Commit¶
On a commit, click the AI-assist button, select “Explain commit,” and the panel will invoke the selected model to explain the commit.
Commit from the Panel¶
Stage files in the panel, type a message, and press ⌘↵ to commit. If no model is configured, a message will be generated automatically.
Use Cases & Notes¶
This plugin is ideal for developers who frequently need to view or operate on Git within DSH, especially when working with local repositories or SSH remote repositories.
The plugin invokes local git commands via the Harness host. It does not access any Git host API and does not request credentials. Permissions include:
- Read-only: status, log, show, diff, branches, remotes
- Executed on click: checkout, fetch, pull (merge --ff-only), writing .patch to a user-selected directory
The browser-side calls go through /api/dsh-git, requiring a same-origin check plus the x-dsh-git: 1 header, so regular web pages cannot invoke it.
Before installing, it is recommended to review the source code and license (MIT).
Ecosystem Context¶
The DeepSeek Harness plugin ecosystem follows the “everything is a plugin” philosophy. Community directories (such as skillhub.cn) provide plugin discovery and information, and have no official affiliation with DeepSeek or High-Flyer.
References¶
- GitHub repository: https://github.com/luyanghtml/dsh-easy-git
- Community directory: https://www.skillhub.cn/plugins/luyanghtml/dsh-easy-git