@michengai/dsh-simplify
DSH 代码简化插件:限定 Git 变更范围,支持未跟踪文件、跨平台路径与可靠的 Git 异常处理
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MichengAI/dsh-simplify说明文档
阅读完整 README ↗Usage
| Input | Scope |
|---|---|
/simplify | Net changes from HEAD to the working tree, including untracked files; fall back to the last commit only when there are no changes |
/simplify --staged | Staged changes only; reject selected staged files that also have unstaged changes |
/simplify --ref=main | The specified commit to the working tree, including untracked files; no fallback |
/simplify --ref HEAD | Explicit HEAD scope without previous-commit fallback |
/simplify src/a.ts "src/中文 文件.ts" | Changes in selected files; review untracked files in full |
/simplify src | Expand changed files within a directory |
/simplify -- --special.ts | Use the option terminator for paths starting with a hyphen |
- Paths are relative to the session directory. Absolute paths inside the repository are supported; prompts use paths relative to the repository root.
- Single and double quotes group paths containing spaces; backslashes remain path characters. No shell expansion, wildcard expansion, or command substitution is performed.
--refaccepts branches, tags, and single-commit expressions, nota..bora...b. It cannot be combined with--staged.- Before the initial commit, files in the selected scope are treated as new and may be simplified in full. Default mode includes staged and untracked files;
--stagedincludes only staged files. Select files or directories to narrow the scope; file count and size limits still apply. A clean repository with only one commit returns no changes. - Previous-commit fallback compares HEAD with its first parent. Merge commits do not receive a multi-parent review.