jide315/dsh-reasoning-language

jide315/dsh-reasoning-language

通过可配置的系统提示词章节要求模型使用指定语言推理(默认简体中文),并默认展开思考行,同时保留用户手动折叠的状态。

UI 개선deepseek-harnessdshi18n

dsh-reasoning-language

简体中文

Ask DeepSeek Harness to use a chosen reasoning language (Simplified Chinese by default), and expand thinking rows while preserving rows the reader manually collapses. The language is a system-prompt request; model compliance is not guaranteed. Final replies follow the user's language.

Compatibility

Version 0.2.0 targets the DSH 0.2 configuration API. Verified against published DSH 0.2.0-rc.2 (latest) and 0.2.1-rc.2 (next), as of 2026-10-18. Requires Node ^22.19.0 || >=24, Cordis >=4.0.4, and @deepseek-ai/schemastery >=3.18.4. DSH 0.1 users should keep plugin 0.1.0. Future DSH prerelease tuples require explicit verification.

Install or upgrade

Install the prebuilt release into your active profile (replace web if needed):

dsh plugin --profile web add https://github.com/jide315/dsh-reasoning-language/releases/download/v0.2.0/dsh-reasoning-language-0.2.0.tgz

Alternatively install the tagged JavaScript sources:

dsh plugin --profile web add github:jide315/dsh-reasoning-language#v0.2.0

These commands also replace an existing installation of the same package. Restart DSH after installation, then reload the browser. No build script or npm account is needed. The package is distributed through GitHub Releases, not currently through npm.

Settings

Open Settings → Thinking language. The page provides:

SettingDefaultBehavior
EnabledOnRequest the chosen reasoning language during subsequent prompt assemblies.
Thinking language简体中文Any language name; whitespace is trimmed and input limited to 80 characters.
Expand thinking rowsOnExpand streamed and existing thinking rows after the Host accepts the setting.

Changes persist in the active profile's cordis.patch.yml, under the Loader entry id dsh-reasoning-language. Model-language changes apply at the next prompt assembly; existing text is never translated or rewritten. The final-answer language is not overridden. Code, paths, commands, error text, URLs and proper nouns are explicitly excluded from translation.

DSH 0.2 removed settings.register() and browser settingsScope. This version exports a plugin Config with volatile fields and uses configForms.get('dsh-reasoning-language'). Refused writes show an error; the expander changes only after accepted state reaches the shared form.

Migrating 0.1.0 preferences

DSH 0.2 may have moved the old settings.yaml to settings.yaml.imported. The former namespace reasoning-language differs from the plugin's Loader entry id, so those preferences are not automatically restored by this plugin. Re-enter them in the settings page, or copy the three values into the existing profile patch entry:

- id: dsh-reasoning-language
  config:
    enabled: true
    language: 简体中文
    expandThinking: true

Use the profile's existing entry if present. Avoid composing two copies of this plugin.

Disable, remove and rollback

The Enabled switch controls language injection; the expansion switch is independent. Turn both off to disable both behaviors. Removing the package:

dsh plugin --profile web remove dsh-reasoning-language

Restart DSH after removal. To roll back, install the previous Git commit together with a compatible DSH 0.1 runtime: dsh plugin --profile web add github:jide315/dsh-reasoning-language#c2273c8.

Development and verification

pnpm install --frozen-lockfile
pnpm test
pnpm run test:integration
node scripts/check-release.mjs
npm pack --dry-run

The integration suites boot a real DSH Loader with SettingsForms, ConfigEditor and SystemPrompt, and exercise the published browser ConfigForms with real React and DOM events. They cover live edits, persistence/restart, revision conflicts, reset, rejected writes and user disclosure choices. CI runs both supported DSH versions under Node 22 and 24.

The disclosure behavior uses [data-variant="think"] and [data-disclosure-row], verified against the current upstream components. Changes to those DOM markers require an update. This plugin does not make network requests of its own, read credentials, or rewrite conversation history. Settings use DSH's existing configuration transport. Report bugs through this repository's Issues.

License

MIT. See LICENSE.