Romebody/dsh-docx-format ↗★ 0

dsh-docx-format

所有生成的 .docx 自动套用《通用公文格式规范》——工具 + 提示词规则 + 结果钩子。

Package
dsh-docx-format
Compatibility
Unverified
Version
1.0.0
License
MIT
Last updated
Oct 30, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Romebody/dsh-docx-format

配置

cordis.patch.yml 里是默认值:

键默认说明
autoFormattrue关闭后只保留工具与提示词
formatExistingfalse只处理插件加载后新写的文件;改 true 会连旧文件一起规范化
debounceMs1200结果钩子去抖
timeoutMs120000单次 python 超时
python''显式解释器;空则用 DSH_DOCX_PYTHON → ~/.dsh/dsh-runtimes/.../python.exe → PATH
skipPatterns*格式要求* 等通配符匹配文件路径,命中不自动改(防止改到格式规范原件)
skipRequestKeywords['实验报告']请求文字白名单:会话最后一条用户消息含该词就整条请求停用插件
maxFilesPerTurn8一轮最多自动处理几个文件
prompt.enabled / ordertrue / 3260提示词段开关与排序
defaults{}透传给 docxfmt.py,覆盖任何 DEFAULTS(如 linePt、signature.seal、skipContentKeywords)

引擎侧的附件相关键(写进 defaults 即可覆盖):

键默认说明
attachLineIndentChars2「附件:1.」首行缩进字符数
attachContIndentChars5多附件「2.」首行缩进字符数
attachWrapIndentChars6折行续行段的首行缩进字符数
attachSplit.enabledtrue关掉就完全不碰附件分段
attachSplit.modewordword = 用 Word/WPS 实测折行后自动拆段;indent-only = 只排 2/5 缩进、不拆段
attachSplit.maxRounds12长条目要拆成多段,最多迭代几轮
attachSplit.minCharsToMeasure20短于此长度的条目直接跳过,不启动 Word