@eternalheart/dsh-git-commit
One-click Git or SVN commit for DeepSeek Harness: groups the working tree by Angular type and scope, names every group with the session's current model, and commits over an authenticated JSON channel — no chat message, no agent turn, no command node.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wh131462/dsh-git-commitREADME
Read the full README ↗Usage
- Click 提交 / Commit in the composer tool row. The dialog opens immediately with “Reading the working tree…”.
- The host reads
git status/svn status --xmland groups the paths; the dialog then shows the groups while the session's model names them. Slow models keep the progress banner and the button in a busy state. - Review the messages — each is an editable textarea with its paths, file count, and the model's suggestion underneath.
- Press 确认提交 / Commit. The host re-analyzes the working tree, checks that the grouping has not changed, validates every message, and only then commits group by group.
- The result appears in the dialog, with 重新分析 / Analyze again after a failure. Closing the dialog aborts a model call that is still running.
Escape, the backdrop, and the close button dismiss the dialog while it is not committing.
Phases and failures
| Phase | What you see | On failure |
|---|---|---|
analyzing | Skeleton plus “Reading the working tree…” | The dialog closes and a notice explains why (clean tree, not a repo) |
naming | Groups already listed plus “Naming with …” | Editing opens with the reason; retry naming or write by hand |
edit | Every message editable | Per-group validation reason under its textarea |
committing | Everything locked plus “Committing…” | Per-group result; stale / staged-index conflicts ask for a re-analysis |
done | Result text | A failed run also offers “Analyze again” |
Configuration
Override the inserted row in the profile's cordis.patch.yml:
- id: smart-commit
name: '@eternalheart/dsh-git-commit'
config:
vcs: auto # auto | git | svn
gitPath: ''
svnPath: ''
timeoutMs: 20000
maxGroups: 6
useModel: true
modelTimeoutMs: 60000
maxInputChars: 24000
maxTokens: 2000
repairRounds: 1
| Field | Default | Meaning |
|---|---|---|
vcs | auto | auto prefers Git and falls back to SVN; git / svn pin the adapter |
gitPath | auto | Explicit git binary; empty probes /usr/bin/git, Homebrew, /usr/local/bin/git |
svnPath | auto | Explicit svn binary; empty probes /usr/bin/svn, Homebrew, /usr/local/bin/svn |
timeoutMs | 20000 | Deadline for each git / svn invocation |
maxGroups | 6 | Above this, whole types are consolidated; types are never mixed and no path is dropped |
useModel | true | false skips the model; every message must be written by hand |
modelTimeoutMs | 60000 | Deadline for one summarization call |
maxInputChars | 24000 | Diff characters sent to the model |
maxTokens | 2000 | Output cap for the summarization |
repairRounds | 1 | Targeted repair rounds for headers that failed validation (0–3) |
Raise maxGroups (for example to 20) to keep one commit per module instead of one commit per type.