dsh-docx-format
所有生成的 .docx 自动套用《通用公文格式规范》——工具 + 提示词规则 + 结果钩子。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Romebody/dsh-docx-format說明文件
閱讀完整 README ↗配置
cordis.patch.yml 里是默认值:
| 键 | 默认 | 说明 |
|---|---|---|
autoFormat | true | 关闭后只保留工具与提示词 |
formatExisting | false | 只处理插件加载后新写的文件;改 true 会连旧文件一起规范化 |
debounceMs | 1200 | 结果钩子去抖 |
timeoutMs | 120000 | 单次 python 超时 |
python | '' | 显式解释器;空则用 DSH_DOCX_PYTHON → ~/.dsh/dsh-runtimes/.../python.exe → PATH |
skipPatterns | *格式要求* 等 | 通配符匹配文件路径,命中不自动改(防止改到格式规范原件) |
skipRequestKeywords | ['实验报告'] | 请求文字白名单:会话最后一条用户消息含该词就整条请求停用插件 |
maxFilesPerTurn | 8 | 一轮最多自动处理几个文件 |
prompt.enabled / order | true / 3260 | 提示词段开关与排序 |
defaults | {} | 透传给 docxfmt.py,覆盖任何 DEFAULTS(如 linePt、signature.seal、skipContentKeywords) |
引擎侧的附件相关键(写进 defaults 即可覆盖):
| 键 | 默认 | 说明 |
|---|---|---|
attachLineIndentChars | 2 | 「附件:1.」首行缩进字符数 |
attachContIndentChars | 5 | 多附件「2.」首行缩进字符数 |
attachWrapIndentChars | 6 | 折行续行段的首行缩进字符数 |
attachSplit.enabled | true | 关掉就完全不碰附件分段 |
attachSplit.mode | word | word = 用 Word/WPS 实测折行后自动拆段;indent-only = 只排 2/5 缩进、不拆段 |
attachSplit.maxRounds | 12 | 长条目要拆成多段,最多迭代几轮 |
attachSplit.minCharsToMeasure | 20 | 短于此长度的条目直接跳过,不启动 Word |