Introduction¶
In the plugin mechanism of DSH (DeepSeek Harness), manually organizing diffs, splitting commits, and writing commit messages when handling git workspace changes in a web session is tedious. dsh-ezcommit-plugin provides a “One-Click Commit” entry point: the current session model splits git changes into multiple batches based on business granularity, which are then committed in batches after user confirmation.
What is this?¶
dsh-ezcommit-plugin is the DSH “One-Click Commit” static side plugin, maintained by PenguinAndy and licensed under MIT. It is used to handle changes in local git repositories within DSH web sessions. After installing and restarting the profile, the web session title bar will display a [Branch Name] [One-Click Commit] button.
Core Features¶
The main capabilities are as follows:
- The button is disabled when the directory is not a git repository.
- The branch name is displayed to the left of the button; it degrades to a short hash when in a detached HEAD state.
- The button is disabled when there are no changes in the workspace.
- Clicking “One-Click Commit” triggers a secondary confirmation dialog.
- The current session model splits git changes into multiple batches of Conventional Commits based on business granularity.
- If the model determines the input is environmental noise, it only prompts the reason without performing any git write operations.
- Sensitive file paths and contents are not sent to the model and do not enter the commit plan or execution.
Installation and Usage¶
Installation¶
The following command installs the plugin from npm:
dsh plugin --profile web add dsh-ezcommit-plugin
It can also be installed from a git repository or a local checkout:
dsh plugin --profile web add git+https://github.com/PenguinAndy/dsh-ezcommit-plugin.git
dsh plugin --profile web add link:/path/to/dsh-ezcommit-plugin
Enabling¶
After installation, the profile must be restarted for the button and route to appear. Taking the web profile as an example:
dsh web
After refreshing the page, the [Branch Name] [One-Click Commit] button will appear in the session title bar.
Typical Usage¶
The usage flow is as follows:
- Click “One-Click Commit” to show a secondary confirmation box with the branch name and change count.
- After clicking “Start Analysis”, the current session model determines if the changes are noise or commits. If committing, it displays the split batches, file list, warnings for filtered sensitive files, and uncovered files.
- “Execute N Batch Commits” executes
git addandgit commitbatch by batch, returning the short hash for each batch.
Use Cases and Notes¶
Suitable for developers handling local git changes in DSH web sessions. When executing commits, it does not run git push, does not use --force, and does not modify git history; if any batch fails during multiple batches, execution stops immediately without rolling back, and successfully completed batches are reported normally.
Please pay attention to the following boundaries:
- The plugin runs with the permissions of the current
dshprocess; you should check the source code and license before installing. - Requires
Node.js >=18andDSH >=0.1.1-rc.1. - During analysis, the workspace
status,diff, and untracked text samples (first 8KB per file, max 32) are sent to the current session model provider, excluding sensitive paths. - The API only accepts same-origin POST requests and rejects cross-site calls.
- There is a process-in-flight lock for
analyze/executeoperations with the samesessionId; repeated clicks are directly rejected.
Related Links¶
If you need to reduce the manual work of organizing commits in DSH web sessions, you can check the implementation details from the source repository:
- GitHub: https://github.com/PenguinAndy/dsh-ezcommit-plugin