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 "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★ 85907
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 572
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.
PerryLink/dsh-industry-research★ 215
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
PolinniZhong/dsh-knit★ 54
Puts the Markdown documents, source files, images and video that already exist anywhere in the session workspace into the DSH sidebar, ranked by relevance to the current conversation. The default lexical mode matches your recent messages against title, summary and body locally with IDF weighting (BM25) — no model calls, no network, nothing leaves the machine. The list comes from scanning the workspace rather than from a recent-files list, so restarting DSH or opening a new session does not empty it. Results are organised into a three-tier reading order (primary / supporting / related) with a verifiable reason on every row — which field matched, which document cites this one — and one click opens an in-place preview: Markdown as rendered text, relative-path images actually drawn, source code with the host's own syntax highlighting, video streamed over HTTP Range. The same Context Pack is exposed to the agent as a knit_docs tool. Later versions added read evidence and lifecycle tracking (attribution is frozen at the moment of reading), pin / exclude (exclusion applies before retrieval, and is undoable), relation evidence (references / imports / tests, with line numbers) and an incremental index reused across restarts. Since v0.23 there is also an optional hybrid mode: it is off by default and only runs once you configure an Ollama or OpenAI-compatible embedding provider yourself. When it runs, what leaves the machine is your query text plus each candidate file's title and summary — a Markdown summary is an excerpt of the body's first paragraph (at most 60 characters), a code file's summary is its workspace-relative directory, and an image or video contributes its file name; full bodies and absolute paths are not sent, and a loopback provider keeps everything on this machine. Since v0.24 it also associates uncommitted changes: a read-only git status (fixed argv, no shell, whitelisted child-process environment) combined with the same reference / import / test / mention evidence shows which files a change is likely to drag along, and it is off by default. The benefit of semantic retrieval still awaits a real-provider run, so no recall improvement is claimed.
HuanLinOTO/dsh-plugin-mineru★ 47
Expose MineRU document parsing tools to the model.
kw78/dsh-office-tools★ 32
Workspace-safe Office tools for agents: create/read Word, create/read/update Excel, and create/read PowerPoint decks with PNG/JPG/GIF image placement.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.