DeepSeek Harness 插件

dsh-git-mojiexua

Git source-control sidebar for the DeepSeek Harness web UI: repo init, staging, commit/push/pull, branch & remote management, AI-generated Conventional Commits messages, and a commit-history graph.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
mojiexuan/dsh-git
最近更新
2026年8月17日
分类
通知与集成
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/mojiexuan/dsh-git
插件名:dsh-git-mojiexua
作者:mojiexuan

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

@mojiexuan/dsh-git

A VS Code–like Git Source Control panel for the 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 panelCommit history
![Source-control panel](docs/images/panel.png)![Commit history](docs/images/history.png)

Install

dsh plugin --profile web add @mojiexuan/dsh-git

Then start dsh web.

Uninstall / Update

# 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

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:

- 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

npm publish

Tag the GitHub repo with dsh-plugin.

License

MIT