dshbase

插件目录 / Developer / openharness-reply-in-cn

openharness-reply-in-cn

已验证 · 实测可装 zuoguyoupan2023

✓ 持续维护 基于 2 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-14最近推送
跨平台平台

功能简介

DSH plugin that forces the model to reply in simplified Chinese (侧边栏中文回复项 + system prompt 指令)

✅
我们的评价
可用 — 实测通过,早期项目

DSH plugin that forces the model to reply in simplified Chinese (侧边栏中文回复项 + system prompt 指令) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

openharness-reply-in-cn

一个 DeepSeek Harness(dsh)插件:往系统提示词注入「必须用简体中文回复」的高优先级指令,
并在 dsh 设置页侧边栏显示「中文回复」一项。

  • host 半:ctx.systemPrompt.section({ name, order: 45, text }) 注入指令(真实逻辑);
  • client 半:注册 settings.section 槽,显示侧边栏项(与 openharness-rule-for-dsh-plugin / adhdgofly-dsh-ext 完全同构)。

注入逻辑(host half,src/host/index.ts)

export const inject = ['systemPrompt']              // 申报依赖,否则 boot 崩
export const name = 'openharness-reply-in-cn'
export function apply(ctx, config) {
  if (config?.enabled === false) return             // 可通过 patch 关闭
  const disposer = ctx.systemPrompt.section({
    name: 'openharness:reply-in-cn',
    order: 45,                                      // persona(0) 之后、工具引导(100+)之前
    text: (context) => (context.agent === undefined ? '' : <中文回复要求>),
  })
  return () => disposer?.()   // apply 返回 disposer,卸载时清理
}
  • 只 order:45,指令文本含「【回复语言 · 最高优先级】…必须用简体中文回复…代码/命令/标识符保持原文」。
  • 只有真实 agent 装配(context.agent 存在)才渲染。

遵循程度:软约束。注入一定发生,但「模型是否严格遵守」无法 100% 保证——靠 order 靠前 + 「最高优先级」措辞稳住。
验证:对话里问「系统提示里有没有『必须用简体中文回复』这条」;或发「请用英文回复」看它是否仍用中文。


⚠️ 必读:为什么代码对了却不显示(缓存/进程坑,2026-08 真实教训)

排查记录与同作者插件 openharness-rule-for-dsh-plugin 一致(改 client 后 rev 已变但 webview 不拉新的问题)。

一句话:Tauri 壳的「重启DSH」只杀后端 node 进程、不重建前端 webview;dsh 的 client bundle 按 rev 缓存在 webview 内存里,rev 变了 webview 也不拉新的。所以改 client 或加新 client 插件后,要彻底退出 OpenHarness(⌘Q)再重开,才确定看到新 bundle / 新侧边栏项。


安装

# 当前依赖目录(开发):
dsh plugin --profile web add ./openharness-reply-in-cn
# 或发布后按名装:
dsh plugin --profile web add openharness-reply-in-cn

装完彻底退出 app 重开(见缓存坑)。


依赖与构建

pnpm install   # 生成 node_modules(含 esbuild / typescript)
pnpm build     # 产出 lib/index.js(host)+ lib/client.js(client)

package.json:dsh.bundle.patch、dsh.client.platform: "web"、exports["./client"]、main → lib/index.js。


文件结构

openharness-reply-in-cn/
├── src/host/index.ts      # 注入「中文回复」system-prompt section(order 45)
├── src/client/index.ts    # 注册 settings.section 侧边栏项「中文回复」
├── build.mjs / package.json / cordis.patch.yml / tsconfig.json
└── lib/                   # 已构建 bundle

我开发的 DSH 插件

我(zuoguyoupan2023)开发维护的一系列 DeepSeek Harness(dsh)插件,均可按需通过 dsh plugin --profile web add <name> 安装:

插件 作用 GitHub 仓库 安装
adhdgofly-dsh-ext DSH Web 界面词性高亮(名绿/动红/形紫/其他灰) zuoguyoupan2023/adhdgofly-dsh-ext dsh plugin --profile web add adhdgofly-dsh-ext
openharness-reader 工作区文件浏览/编辑 + Markdown 预览 zuoguyoupan2023/openharness-reader dsh plugin --profile web add openharness-reader
openharness-reply-in-cn 强制模型用简体中文回复,侧边栏「中文回复」项 zuoguyoupan2023/openharness-reply-in-cn dsh plugin --profile web add openharness-reply-in-cn
openharness-rule-for-dsh-plugin 注入 DSH 插件开发的 CAN/SHOULD/MUST NOT 规范,侧边栏「插件开发规范」项 zuoguyoupan2023/openharness-rule-for-dsh-plugin dsh plugin --profile web add openharness-rule-for-dsh-plugin

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 openharness-reply-in-cn」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:zuoguyoupan2023/openharness-reply-in-cn

Headless(CLI)profile:

dsh plugin --profile headless add github:zuoguyoupan2023/openharness-reply-in-cn

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →