dsh-git
DeepSeek Harness Web 的 Git 源代码控制侧栏,支持仓库初始化、暂存、提交/推送/拉取、分支远程管理、AI 提交信息和历史图。
mojiexuan
@mojiexuan
⬇ 2
★ 1
main
安装
dsh plugin --profile web add github:mojiexuan/dsh-git
需要可复现安装时,可在仓库后追加 #commit 固定提交。
DeepSeek Harness Web 的 Git 源代码控制侧栏,支持仓库初始化、暂存、提交/推送/拉取、分支远程管理、AI 提交信息和历史图。
该插件未提供要点说明,请参考仓库 README。
dsh-plugindsh-pluginsai-agentscoding-agentsdshvibe-coding
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/mojiexuan/dsh-git |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 1 |
| 最近推送 | 2026-08-17 |
| 收录日期 | 2026-09-19 |
| 分类 | 开发与运行时 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# @mojiexuan/dsh-git
A VS Code–like **Git Source Control panel** for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) web UI — repo init, per-file staging, commit/push/publish/pull, branch & remote management, AI commit messages, and a commit-history graph, all in the browser.
> 中文文档:[docs/README.zh.md](docs/README.zh.md)
## Features
- **Toggleable panel** — an entry above Settings in the sidebar foot opens/closes the panel.
- **Repo detect & init** — a non-repo workspace shows a one-click "Initialize Git repository" (`git init -b main`).
- **Per-file staging** — collapsible "Staged changes" / "Changes" lists with per-file `+`/`−`, plus stage-all / unstage-all.
- **Git-semantic action button** — "Commit" when there are uncommitted changes (auto-stages if nothing is staged), "Push" when the branch tracks a remote and is ahead, "Publish branch" when the branch has no upstream but has local commits.
- **Pull** — one click to fetch the latest from all remotes and branches (`git fetch --all --prune`); shown only when a remote is configured.
- **Branch management** — list / switch / create / delete (with confirmation).
- **Remote management** — show / add / remove the origin remote (with confirmation).
- **AI commit messages** — streaming, Conventional Commits, generated from the staged/working diff via the harness LLM (Chinese output by default).
- **Commit-history graph** — a lazily-paged SVG lane graph of all branches + remotes (lane topology computed client-side, rounded bends, soft palette), expanded by default at the bottom of the panel to half the panel height, virtual-scrolls and loads the next page as you scroll, expands a commit inline to its changed files, and shows a hover popover with message / author / date / hash (full hash copyable).
- **Auto-refresh** — polls `git status` every 2.5 s so edits, commits and pushes made outside the panel show up.
- **Self-update** — on first open the panel silently checks the npm registry for a newer version; when one exists, an update badge appears on the sidebar entry and a one-click "update now" link shows in the panel header, followed by a restart prompt.
- **i18n** — English and Chinese UI.
- **Cross-platform** — Windows, macOS and Linux; git runs unconfined so native TLS and credential helpers work everywhere.
## Screenshots
| Source-control panel | Commit history |
| --- | --- |
|  |  |
## Install
```sh
dsh plugin --profile web add @mojiexuan/dsh-git
```
Then start `dsh web`.
## Uninstall / Update
```sh
# Uninstall (same command for the published package and a local link)
dsh plugin --profile web remove @mojiexuan/dsh-git
# Update to the latest published version
dsh plugin --profile web update @mojiexuan/dsh-git
```
For a linked local checkout (`dsh plugin --profile web add .`), there is no
separate update step — rebuild with `npm run build`, then fully restart
`dsh web` (host bundle) and refresh the browser (client bundle).
## Build from source
```sh
npm install
npm run build # lib/index.js (host) + lib/client.js (client)
npm run typecheck
```
## Configuration
Optional overrides in your profile `cordis.patch.yml`:
```yaml
- id: git
config:
maxDiffChars: 4000 # cap on the diff text sent to the model (default 4000)
maxLogEntries: 2000 # max commits per page for the history graph (default 2000; scroll to load more)
provider: deepseek # optional — pin the provider (defaults to the deployment model)
model: deepseek-chat # optional — pin the model
reasoningEffort: off # 'off' (default) disables thinking; 'high'/'max'/'default' passthrough
registryUrl: https://registry.npmjs.org # optional — npm registry base for update checks (default npmjs.org)
```
## Structure
```
src/
├── shared/rpc.ts # endpoint names + DTOs, shared by both halves
├── host/ # Node half
│ ├── index.ts # git/* RPC endpoints (loopback-only)
│ ├── git.ts # ctx.shell wrapper; paths/messages via stdin (no shell injection)
│ ├── commit-message.ts # diff truncation + ctx.llm.stream generation
│ └── update.ts # self-update: npm version check + dsh plugin update runner
└── client/ # browser half
├── index.tsx # slot registration + RPC + locale dictionary
├── GitPanel.tsx # source-control panel UI
├── CommitGraph.tsx # commit-history graph (paged, virtualized)
├── graph.ts # client-side lane/topology calculator
├── BranchMenu.tsx # branch dropdown
├── GitToggleButton.tsx # sidebar-foot toggle
├── rpc.ts # typed RPC wrapper
├── locale.ts # zh/en dictionaries
├── fileIcons.tsx # file-type icons
├── icons.tsx # icon set
└── styles.ts # panel stylesheet
```
## Security
- All `git/*` endpoints are registered with `authority: 'loopback'` (127.0.0.1 only).
- User data is never interpolated into command strings — messages go via `git commit -F -`, paths via `--pathspec-from-file=-`, and branch/remote names and URLs are validated against safe character classes.
## Publish
```sh
npm publish
```
Tag the GitHub repo with [`dsh-plugin`](https://github.com/topics/dsh-plugin).
## License
MIT
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。