Introduction¶
The sidebar default session title in DeepSeek Harness (DSH) is usually only a single sentence generated by the model, making it hard to quickly distinguish the conversation’s date and work type. The dsh-session-title-pattern plugin uses the model to summarize the entire conversation and standardizes the title into the Date|Type|Topic format.
Core Features¶
This plugin is maintained by cq-guojia and is open source under the MIT license. It mainly implements the following features:
- Automatically generate formatted titles: By default, the title is split into date, type, and topic. The date is taken from the session creation time (local timezone, MMDD format); the type follows the interface language (Chinese UI displays two characters, English UI displays one word); the topic is a summary of the entire conversation.
- Support custom title templates: Supports placeholders such as
{MMDD},{YYYY},{type}, and{topic}for flexible formatting, for example{topic}|{MMDD}. - Periodic recomputation: By default, title recomputation is automatically triggered every 10 messages.
- Specify the title generation model: You can specify the model used to generate titles in settings, or choose to follow the session’s primary model.
- Manually rename sessions: Supports manually changing the title by clicking the button next to the title or entering the
/retitlecommand. - Expand title display width: To address upstream style limitations, it injects CSS to override the maximum width so that the current session title can display wider.
Installation and Enablement¶
Install and enable it via the official plugin command; no additional configuration is required:
dsh plugin --profile web add dsh-session-title-pattern
After installation, the plugin will be automatically loaded with the DSH process, and the title will be automatically generated after the first message in the first session.
Configuration¶
The plugin provides two configuration methods: the settings interface and a configuration file.
Settings Interface¶
In the DSH plugin detail page, you can configure the following parameters:
- Recompute every N messages: The interval for title recomputation, defaulting to 10. Setting it to 0 calculates only once when the session is created.
- Model for title summaries: The model used to generate titles, supporting a specific Provider or following the primary model.
- Timeout: The timeout for model calls (milliseconds).
- Title format / Title length limit: The title template and length limit.
Configuration File¶
For scripted or batch deployment, you can configure it via cordis.patch.yml:
- id: session-title-pattern
config:
retitleEvery: 10
template: '{MMDD}|{type}|{topic}'
maxBytes: 80
Working Mechanism and Notes¶
- Only processes top-level sessions: The plugin does not automatically name sub-sessions (forked sessions).
- Local fallback mechanism: If the initial title generation fails, a local fallback title is used (date + the first 8 words/bytes of the first message). If a title already exists, subsequent generation failures will retain the old title.
- Display width limit: Upstream styles limit the title width to 220px. The plugin injects CSS
[class*="_crumbCurrent"]{max-width:min(640px, 60vw) !important;}to expand the current session title. If the upstream class name changes, this extension may fail. - Version dependency: Requires DSH version >= 0.1.7-rc.1.
Use Cases¶
Suitable for agent developers who need to maintain a large number of sessions long-term and want to quickly distinguish work types and time points. The plugin significantly improves the information density and readability of the sidebar.