dsh-chat-tweaks
> A UI-tweak plugin for the DeepSeek Harness: show the provider display name in the composer model seat, remove the chat column max-width, and more — every feature has its own switch on a dedicated Settings → Chat Tweaks page, applied live without a restart. > > DeepSeek Harness 的界面美化插件:在模型选择器显示 厂商名、取消对话内容最大宽度等,每个功能都在独立的设置 → 聊天增强 页面中独立开关,全部即时生效、无需重启。
 
中文 | English
Features
| Switch | Effect |
|---|---|
| Show provider name | The composer model seat shows the provider display name next to the model name, so identical model names from different providers are distinguishable (e.g. DeepSeek · DeepSeek-V4-Flash) |
| Remove content max-width | The message column is no longer capped at 748px (--dsh-chat-content-width) and fills the available space |
Features are organized as a registry (src/client/features.ts) — adding a UI tweak = one registry entry + two locale keys, and the settings page grows a switch automatically (see [Adding a feature](#adding-a-ui-feature)).
Screenshots
Settings → Chat Tweaks (dedicated page):

Model seat with provider label:

Install
# From GitHub (recommended, once published)
dsh plugin --profile web add https://github.com/haiyoucuv/dsh-chat-tweaks/archive/refs/tags/v0.1.0.tar.gz
# Or from a local directory (development)
dsh plugin --profile web add link:/path/to/dsh-chat-tweaks> You can also install it with pnpm directly in the profile directory: > > ``bash > cd ~/.dsh/profiles/web && pnpm add /path/to/dsh-chat-tweaks > ``
> ⚠️ The old dsh-model-provider-label plugin is deprecated: its "show provider name" feature has been merged into this plugin. If you installed the old version, remove it first — both shadow the single conversation.input.model slot at priority -100, and coexistence throws: > > ``bash > dsh plugin --profile web remove dsh-model-provider-label > `` > > Guide and historical releases of the old plugin: <https://github.com/haiyoucuv/dsh-model-provider-label>
Restart dsh web (Ctrl+C, then run dsh web again) so the browser client loads the plugin bundle.
Expose the settings namespace (required, once)
> ⚠️ Known limitation of this DSH version: browser-visible settings namespaces are gated by a hardcoded allowlist (WEB_SETTINGS_NAMESPACES) in dsh-host-apiproxy. Without this step the switches render disabled and writes fail (error settings-not-exposed).
Run the idempotent patch script shipped with the plugin (re-run after a profile reinstall or a dsh upgrade):
npm run expose # same as: node scripts/patch-apiproxy.mjsThen restart dsh web again. The switches now read/write normally and values persist in ~/.dsh/settings.yaml.
Usage
Open Settings → Chat Tweaks and toggle:
- Show provider name — provider prefix on the model seat;
- Remove content max-width — full-width message column.
All changes apply immediately; no restart needed.
Development
pnpm install # installs esbuild / typescript dev deps
npm run build # builds lib/index.js (node half) + lib/client.js (browser half)
npm run typecheck # TypeScript type checklib/ is generated by scripts/build.mjs and committed; rebuild after editing src/ (a page refresh is enough, no server restart).
How it works
- Node half (
src/index.ts): registers thedsh-chat-tweakssettings namespace (defaults on); values persist to~/.dsh/settings.yaml. - Browser half (
src/client/):
- subscribes to the settings via ctx.settingsScope.bind; features carrying an apply run their side effect live; - registers a dedicated Settings tab (settings.section) "Chat Tweaks" (nav label + page, alongside Models / Plugins / Agent Presets / File Mentions), with one switch per FEATURES registry entry; - shadows the conversation.input.model seat at priority -100; the provider-name switch drives the trigger reactively (data reuses the host modelDirectories service, so behavior matches the stock implementation).
The full-width CSS targets the stable [data-chat-flow] attribute (hash-independent) and overrides the stock rule with !important; the switch injects/removes a <style> tag live.
Adding a UI feature
1. Add one entry to FEATURES in src/client/features.ts: { key, labelKey, descKey, default, apply? } - apply(enabled) — side effect when the switch flips (inject/remove CSS or DOM); - render features (e.g. provider name) don't need apply; components read the settings scope reactively. 2. Add the label / desc locale keys to zh / en in src/client/index.tsx. 3. Add the matching field to the schema in src/index.ts (default must match the registry). 4. npm run build, refresh — the settings page grows a switch automatically.
FAQ
| Symptom | Cause & fix |
|---|---|
| Switches are disabled | Namespace not exposed: run npm run expose, then restart dsh web |
| UI unchanged after code edits | lib/ not rebuilt: run npm run build, then refresh |
| Model seat missing / error | Coexists with old dsh-model-provider-label: uninstall the old plugin |
| Where are values stored | The dsh-chat-tweaks section of ~/.dsh/settings.yaml |
Compatibility
- Target: DeepSeek Harness web (
dsh --profile web),0.1.0-rc.6series; - Dependencies: see
peerDependenciesinpackage.json.
License
[MIT](LICENSE) © dsh-chat-tweaks contributors