dsh-session-title-settings-card

August 21, 2026 · View on GitHub

Settings card + session-row Regenerate title action for the session-title-llm namespace on stock DeepSeek Harness (npm @deepseek-ai/dsh) — the two Web surfaces the Townrain fork carries, backported as a plugin so you do not need the fork.

  • Settings → Plugins → Plugin configuration gains a Session titles card (title provider / model, re-title interval, automatic-titles switch).
  • Every session row's ⋯ menu gains 重新生成标题 (Regenerate title), reaching the same regeneration path as the /retitle command.

Why patches are required

Stock harness leaves two seams closed, both acknowledged as deferred work in the official code:

  1. dsh-host-apiproxy hard-codes which settings namespaces the Web client may see (WEB_SETTINGS_NAMESPACES); a plugin cannot expose its own section. Fixed upstream in @deepseek-ai/dsh ≥ 0.1.1-rc.1settings.describe now serves every registered namespace, so no patch is needed there.
  2. dsh-client-ui-workspace hard-codes the session-row menu items with no injection point (still closed in 0.1.1-rc.1).

scripts/patch-stock.mjs applies the remaining edits (idempotent — re-run it after every dsh upgrade). On 0.1.1-rc.1+ it reports the apiproxy seam as built-in and only patches the row menu; on older versions it patches both. This is exactly what the fork does internally.

Requirements

  • @deepseek-ai/dsh ≥ 0.1.0-rc.6 (stock, any profile using the web app; verified against 0.1.0-rc.6 and 0.1.1-rc.1)
  • dsh-session-title-interval-llm installed and composed in injected mode (stock harness has no interval cadence on the session-title service; the plugin's README shows the exact cordis.patch.yml row)

Install

1. Patch the stock harness (one-time per upgrade)

node scripts/patch-stock.mjs

Output tells you what was patched / skipped. Restart the harness afterwards (a Web page refresh alone is enough for the row menu; on older dsh versions the settings card needs the apiproxy change loaded, so a restart is the safe path).

2. Mount the plugin

Junction the package into your profile's node_modules:

New-Item -ItemType Junction -Path $env:USERPROFILE\.dsh\profiles\web\node_modules\dsh-session-title-settings-card -Target <this-repo>

Add the loader row to ~/.dsh/profiles/web/cordis.patch.yml (pure-client plugins must be mounted via insert rows, not the bundles array):

- insert:
    - id: session-title-settings-card
      name: dsh-session-title-settings-card

Restart the harness. The card appears only while a title provider exposes the session-title-llm namespace (i.e. dsh-session-title-interval-llm is composed); otherwise it renders nothing.

3. Configure

Settings → Plugins → Plugin configuration → 会话标题 / Session titles:

  • 标题提供方 / Title provider + 标题模型 / Title model — set both or clear both (blank = follow the session's logged route)
  • 每多少条消息重新命名 / Re-title every N prompts — the interval
  • 自动重命名 / Automatic titles — off keeps only the deterministic fallback

Changes apply live (the injected listener re-reads the resolved section on every generation) — no restart after saving.

Notes

  • The row-menu label is hard-coded Chinese (重新生成标题); the card itself ships en/zh locale bundles.
  • dsh-session-title-interval-llm provides the HTTP bridge (POST /plugins/session-title/retitle) the menu item fetches; it resolves any persisted session, so historical rows work without a live agent.
  • Upgrading @deepseek-ai/dsh overwrites both patched files — re-run scripts/patch-stock.mjs.

License

MIT — see LICENSE. The card UI is ported from deepseek-harness (MIT), packages/client/ui-settings-plugins as carried by the Townrain fork.