Automatic Session Title Update (dsh-session-auto-title)

Introduction

DeepSeek Harness (DSH) uses a “first message determines title” strategy by default: the first few words of the initial user message become the session title. In long conversations, topics may drift from the original subject to tangential threads or diverge entirely, making the first message a poor representation of the current session content. Manually renaming each session at the end of a conversation is tedious and costly.

Plugin Overview

dsh-session-auto-title is a DSH client plugin that automatically renames sessions based on the full conversation content. Maintained by hningy, it addresses the problem of stale titles in long conversations and provides a settings page to control trigger timing and strategies.

Core Features

  • Generates titles based on the entire conversation, not just the first message
  • The settings page offers a master toggle, trigger timing (every new message / every N messages), an option to keep the title unchanged if it’s still accurate, a target character count for Chinese titles, and the number of messages to include in naming
  • Title generation uses a lightweight auxiliary model request that does not block normal replies and does not consume tokens from the main conversation
  • Manually edited titles are locked and will not be overwritten by the plugin
  • For very long sessions, earlier intermediate messages are automatically discarded before individual messages are truncated, ensuring the input stays within budget

Installation and Activation

Install via Web Profile:

dsh plugin --profile web add dsh-session-auto-title

Desktop version: enter dsh-session-auto-title in “Settings → Plugins → Add Plugin”.

If it doesn’t appear after installation, restart dsh web or close and reopen the desktop app.

Settings Page

Navigate to “Settings → Session Title” (click “Settings” in the bottom-left of the sidebar; it appears after “Status Text” in the list).

Item Description
Enable Auto-Naming Master toggle. When off, no titles are modified, existing titles are preserved as-is, and no auxiliary model requests are made
Trigger Timing Every new message or Every N messages (N can be 1–50)
Keep Title if Still Accurate When off, the title is rewritten on every trigger, even if the topic hasn’t changed
Target Character Count for Chinese Titles 2–40; non-Chinese titles are scaled proportionally
Number of Messages for Naming 1–60; the earliest message is always kept as an anchor, with the rest taken from the most recent window

After saving, the plugin row reloads and operates according to the new settings starting from the next message. Settings are written to the profile’s cordis.patch.yml (the session-auto-title line) and persist across restarts.

Typical Usage

Suppose the current session is discussing “how to process PDF documents with Python”. As the conversation deepens, the topic shifts to “how to extract tables from PDFs”. With auto-naming enabled, the plugin detects the topic shift and generates a new title based on the full conversation content, rather than remaining stuck on the initial “how to process PDF documents with Python”.

In “Settings → Session Title”, set “Trigger Timing” to “Every N messages” (e.g., 3), “Number of Messages for Naming” to 12, and “Target Character Count for Chinese Titles” to 12. The plugin will then generate a new title every 3 user messages, using the most recent 12 messages (with the earliest message retained as an anchor).

Use Cases and Notes

Best suited for scenarios requiring long-term session title maintenance where conversation topics may evolve, such as technical discussions and project collaboration.

The plugin runs with the current dsh process’s permissions. Review the source code and license before installing. The plugin uses the MIT license; the full source code is available in the GitHub repository.

Closing

dsh-session-auto-title enables session titles to evolve with topic shifts through conversation-wide auto-naming, reducing the manual maintenance burden. For more details, visit the directory page and the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye