Introduction

The official session-title-first-prompt-llm in DSH (DeepSeek Harness) automatically names a session only once, when the first message is sent. If the later conversation drifts from the initial topic, the official logic does not update the title. The dsh-session-retitle plugin fills this gap: it adds a “Rename” button to the session header, lets you trigger it manually, reads the current session contents, uses a model to generate a short Chinese title, and writes it back.

Core Features

  • Rename button in the session header: Adds an action entry on the right side of the session header.
  • Automatic title generation: Reads session contents and uses the current model to generate a short Chinese title.
  • Zero runtime dependencies: It does not import any @deepseek-ai/* packages and exposes only two HTTP routes.
  • Official service integration: Renaming goes through the official session-title service, with concurrency protection and source pinning.
  • Flexible input handling: If the input box is left empty, a title is generated automatically from the contents; if a name is entered, it is used directly (no model call is consumed).
  • Theme following: The UI colors use DSH’s --dsw-alias-* CSS variables, so light and dark themes take effect automatically.
  • Route fallback and fault tolerance: Supports candidate route fallback and concurrency protection within the same session.

Installation and Enablement

  1. Ensure pnpm is in your PATH.
  2. Run the installation command:
dsh plugin --profile web add github:BPTumbleweed/dsh-session-retitle
  1. Restart the DSH service. After the restart, the UI will be interrupted for 35–45 seconds; please wait. After loading completes, perform a Ctrl+Shift+R hard refresh in your browser to load the new client-side button.

Typical Usage

  1. Open any DSH session.
  2. On the right side of the session header, find and click the “Rename” button.
  3. In the popup input box:
    - Leave empty: Click “Auto-name”; the plugin reads the session contents and calls a model to generate a title.
    - Enter content: Your entered name is used directly, without consuming a model call.
  4. After a few seconds, the session name updates to the new title, and the sidebar list updates synchronously.

Configuration Options

The plugin is configured via overrides in the profile’s cordis.patch.yml:

Key Default Description
routePrefix /dsh-session-retitle Route prefix
maxTitleBytes 80 Title byte budget
maxDigestBytes 8000 Session material limit sent to the model
maxDigestItems 16 Maximum number of messages to include (human messages + assistant replies)
timeoutMs 45000 Timeout for the title model call
maxOutputTokens 512 Maximum output tokens for the title model
provider / model deepseek-official / deepseek-flash Fallback route configuration

Notes

  • Session state limitation: Only sessions currently alive in memory (not archived) can be renamed; historically archived sessions cannot be updated.
  • No data residue: The plugin does not modify files or write to the data directory, so removing it leaves no junk behind.
  • Manual override protection: Once a name has been manually changed, the official automatic naming will not override it (source.kind = user is pinned).
  • Validation endpoint: You can verify the plugin status with the following command (replace <port>):
curl -s http://127.0.0.1:<端口>/dsh-session-retitle/status | head -40

Conclusion

This plugin solves the problem of delayed DSH session naming through minimal interaction (a single button) while maintaining compatibility with official services. All materials use only human messages and assistant replies; tool results are filtered to ensure accurate title generation.

  • Repository: https://github.com/BPTumbleweed/dsh-session-retitle
  • Maintainer: BPTumbleweed
  • License: MIT