Converts half-width punctuation in AI replies to full-width Chinese punctuation, so copied answers stay publication-ready.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/addie-ace/dsh-fullwidth-punctuation/releases/download/v0.1.0/dsh-fullwidth-punctuation-0.1.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:addie-ace/dsh-fullwidth-punctuation
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
让 DeepSeek Harness 的 AI 回答输出中文全角标点:回答在界面上是全角,用户直接复制回答内容也是全角。面向政务公文、汇报材料等对「标点统一全角」有硬性要求的写作场景。
原理
插件是纯 host 端 Cordis 插件,监听 llm/stream 瀑布(@deepseek-ai/dsh-llm 官方设计的流拦截点),在数据源头把模型输出文本里的半角标点转换为中文全角:
- 模型输出 →
llm/stream拦截 → 转换 → 写入会话存储 → 渲染到界面 → 复制 - 因为转换发生在源头,界面显示、复制按钮、选中复制拿到的都是同一份全角文本。
同时注入一条 system prompt 提示模型尽量输出全角(双保险,减少后处理负担)。
转换规则(智能全角,不破坏代码/数字/链接)
| 输入 | 输出 | 说明 |
|---|---|---|
, ; ! ? |
, ; ! ? |
无条件转换 |
. |
。 |
数字小数点(3.14)、省略号(...)不转 |
: |
: |
时间(10:30)、URL(http://)不转 |
( ) |
( ) |
markdown 链接 [text](url) 内的括号不转 |
" |
“ ” |
配对转换 |
代码块 ``` / ~~~ |
不转 | fenced code 整体跳过 |
行内代码 ` |
不转 | inline code 跳过 |
| 裸 URL | 不转 | http://example.com/a.b 保持原样 |
< > [ ] * # - _ ' |
不转 | 歧义过大,保守保留 |
只转换 AI 的回答文本:不转用户输入、不转工具调用的 JSON 参数、不转推理(reasoning)内容。
安装
# 方式一:本地打包后安装(推荐,离线可用)
cd dsh-fullwidth-punctuation
npm pack # 生成 dsh-fullwidth-punctuation-0.1.0.tgz
dsh plugin --profile web add ./dsh-fullwidth-punctuation-0.1.0.tgz
# 方式二:直接用目录安装
dsh plugin --profile web add ./dsh-fullwidth-punctuation
安装后重启 Web GUI(或重启 dsh web)生效。
卸载
dsh plugin --profile web remove dsh-fullwidth-punctuation
验证
- 运行单元测试:
node --test test/ - 装好后问 AI:「写一段材料,包含逗号、句号、冒号和括号」,观察回答与复制内容均为全角。
- 再让 AI 输出一段代码块,确认代码块内的半角标点没有被改写。
边界说明
- 转换只作用于走标准
llm/stream的模型输出(DeepSeek Harness 的 agent-loop 全部走该路径)。 - 半角双引号
"会被配对成中文引号;英文引文场景如不希望转换,请卸载插件。 - 裸域名(无
http://前缀)中的点号可能被当作句号转换,URL 请写全前缀。 - 首版默认开启,无设置界面;如需开关可后续版本加配置项。
开发
node --test test/ # 运行测试
核心文件:
lib/index.js:host 插件入口(llm/stream监听 + system prompt 注入)lib/fullwidth.js:转换核心(流式安全状态机)
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 103026
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 779
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
Roland0511/dsh-marktext★ 488
WYSIWYG Markdown editor in the DSH right sidebar, built on MarkText's muya engine: open a .md file, edit it as a rendered document, and save back through ctx.fs with a version guard.
ECNU/EduWork#dsh-knowledge-studio★ 467
A workspace-based Studio for source-grounded reports, slides, tables, mind maps, quizzes, flashcards, audio and video, using DSH models and shared artifact services. Office generation requires Python 3.12+ with its dependencies and DSH_OFFICE_PYTHON configured; media rendering requires Chromium, and local ASR additionally requires whisper.cpp and a model.
PerryLink/dsh-industry-research★ 228
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
joeseesun/qiaomu-ui-learn-dsh★ 129
Browse UI design references and interaction examples, take design quizzes, and export learning notes as Markdown.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.