← 返回列表
D

openharness-reply-in-cn

v0.1.0 · 3 天前发布

DSH plugin that shows a '中文回复' label in the web sidebar and forces the model to reply in simplified Chinese.

deepseek-harnessdshdsh-pluginpluginchinesezh-cnreply-in-cn

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

    ```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 ? '' : <中文回复

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    openharness-reply-in-cn
    Repo
    Engines
    {}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime"]}}