dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DSH 斜杠命令 /commit:暂存全部更改,用会话当前模型总结暂存区 diff 后提交;不依赖浏览器界面,模型调用失败时回退到本地规则生成提交信息。
A DeepSeek Harness plugin that adds one global slash command — /commit. It stages every change in the session's working directory, asks the model the session is currently using to summarize the staged diff, and commits with that message.
English · 中文说明
/commit runs five steps:
git add -A, untracked files included.git diff --cached to the model the session is using right now and asks for a commit message: a first line in 模块: 描述 form (module and what changed, ≤ 50 characters), then 3–8 - bullets that summarize substantive changes by module or theme instead of listing files.git commit -m <title> -m <bullets>.+added / -deleted counts.Two paths skip the model call:
/commit 修正登录超时 uses that text as the title.The route is resolved from the newest of the session's model/selection event and its last request/header, so a mid-session model switch is respected rather than the route captured when the agent was created.
What it does not do: it never pushes, never creates or switches branches, never amends, and never touches a remote. All it runs is git add -A and git commit in the session's working directory.
It also ships no browser UI. The command is registered host-side through the commands service, so it is available in any profile that provides that service — not only web.
dsh plugin --profile web add github:qingyou002/dsh-git-commit
dsh plugin forwards to pnpm inside the profile directory and then appends the package to dsh.profile.bundles, because it declares dsh.bundle. The command becomes available in every session of that profile — restart DSH if it was already running.
Development install from a clone:
git clone https://github.com/qingyou002/dsh-git-commit
# in ~/.dsh/profiles/web/package.json add:
# "dsh-git-commit": "link:/absolute/path/to/dsh-git-commit"
cd ~/.dsh/profiles/web && pnpm install
/commit # the model writes the message
/commit 修复登录超时 # your text becomes the title; no model call
Example output:
✅ 已提交 a1b2c3d:后台: 修复令牌过期后未刷新
📝 改动要点
- 令牌过期时改为静默刷新并重试原请求
- 新增刷新失败后的登出提示
📦 文件清单(3 个文件:修改 2,新增 1)
修改 application/api/auth.js (+18 -4)
新增 application/api/token.js (+42 -0)
修改 public/assets/app.js (+3 -1)
Every option is optional; defaults shown.
| Option | Default | Meaning |
|---|---|---|
timeoutMs | 90000 | Deadline for the summarizing model call, in milliseconds. |
maxDiffChars | 48000 | The staged diff is truncated beyond this many characters — head plus tail with a marked gap — before it is sent. |
maxTokens | 2048 | Token ceiling for the summarizing call. |
maxTitleChars | 100 | Hard cap on the first line; a longer title is cut and suffixed with .... |
maxBullets | 12 | Maximum number of bullet lines kept from the reply. |
Override them in your profile patch layer:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: dsh-git-commit
config:
timeoutMs: 60000
@deepseek-ai/dsh-commands, @deepseek-ai/dsh-llm and @deepseek-ai/dsh-util-values — declared as peerDependencies, tested against 0.1.5-rc.3.git on PATH. The plugin shells out to the git binary and says so plainly when it is missing./commit 是全局斜杠命令:把当前会话工作目录里的全部改动 git add -A 暂存,用会话当前正在使用的模型总结 git diff --cached,再按总结结果提交。
/commit:模型生成提交信息,首行为 模块: 描述(≤50 字),随后 3~8 条 - 要点,按模块或主题概括实质改动,不逐文件罗列文件名。/commit 你自己写的说明:直接用你的文字作标题,不调用模型。git add -A 与 git commit:不会 push、不会新建或切换分支、不会 amend、不碰远端。commands 服务注册在宿主侧,凡是提供该服务的 profile(不限于 web)都能用。配置项与默认值:timeoutMs 90000、maxDiffChars 48000、maxTokens 2048、maxTitleChars 100、maxBullets 12;在 ~/.dsh/profiles/web/cordis.patch.yml 里用 - id: dsh-git-commit 加 config: 覆盖。
安装:
dsh plugin --profile web add github:qingyou002/dsh-git-commit
MIT