58fly/dsh-language-guard ↗★ 0

dsh-language-guard

Lock model reasoning and replies to a target language in DeepSeek Harness (Simplified Chinese by default): three strength levels, configurable prompt sections, periodic reminders, a settings panel with a quick language switch. 适合需要强制模型用特定语言(如中文)回答,防止其中途跑调的用户。

パッケージ
dsh-language-guard
互換性
未検証
Harness ピア範囲
>=0.2.1-rc.2
Cordis ピア範囲
>=4.0.5
バージョン
0.2.1
ライセンス
MIT
最終更新
2026/10/19

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:58fly/dsh-language-guard

ドキュメント

README 全文を読む ↗

Configuration

Seven fields, all volatile (a change takes effect immediately — no restart, no plugin remount):

FieldTypeDefaultRangeDescription
languageMode"" | "auto" | "manual"""tri-state enum, case-sensitiveLanguage mode. "auto" follows the interface language, "manual" pins targetLanguage, "" means "never chosen" and is resolved by the migration rule below
targetLanguagestring"zh-CN"a valid BCP-47 tag (/^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/)Target language. zh-CN Simplified Chinese, zh-TW Traditional Chinese, en English, ja Japanese, ko Korean; any other valid tag is used as-is
strength"B" | "C" | "D""C"enum, case-sensitiveStrength level, see above
injectEveryNRoundsnumber83–50, integerHow often the Periodic self-check is added. Only used at D; the control is disabled at other levels
preserveCodeTermsbooleantruetrue / falsetrue: code, commands, paths, identifiers, API fields and raw error text stay verbatim. false: technical terms are preferred in the target language, with the English term in parentheses when needed
extraRulesstring""any textAppended after the built-in rules. Empty means built-in rules only
overrideHeadstring""any textReplaces the built-in opening text entirely (extraRules is still appended after it). Empty or whitespace-only falls back to the built-in text

The targetLanguage → display name mapping is fixed (no language guessing): zh-CN / zh-Hans / zh-SG → 简体中文, zh-TW / zh-HK / zh-MO / zh-Hant → 繁體中文, en / en-US / en-GB → English, ja / ja-JP → 日本語, ko / ko-KR → 한국어; any other valid tag is displayed as the code itself.

Configuration lives in the profile's cordis.patch.yml. A patch replaces config wholesale — it does not deep-merge — so a manual override must restate every field, otherwise the omitted ones are lost:

- id: dsh-language-guard
  name: dsh-language-guard
  config:
    languageMode: auto
    targetLanguage: zh-CN
    strength: C
    injectEveryNRounds: 8