Preface¶
The default session-title-first-prompt-llm plugin in DeepSeek Harness (DSH) often outputs complete sentences when generating titles. For example, if a user asks “Explain what JavaScript closures really are”, the sidebar title is often a full copy of that sentence. As a result, titles become too long and hard to scan or search quickly.
The root cause is insufficient constraint in the official prompt. It only asks for “targeting about 5 words”, and the definition of “concise” is vague. This plugin optimizes the system prompt by turning “concise” into actionable rules. While preserving the original logic, it only modifies the prompt portion to resolve the problem of overly long titles.
Plugin Purpose¶
This is a session title plugin for DeepSeek Harness (DSH), designed to compress long-sentence inputs into a single word or short phrase, improving the memorability of session titles. The plugin is maintained by Relethe and is licensed under the MIT License.
Core Features¶
The plugin provides the following capabilities:
- Zero intrusion: Its logic fully reuses the official
first-prompt-llmflow (triggered by the first user message, streaming generation, fallback on failure); it only modifies the system prompt. - Automatic takeover: It is mutually exclusive with the official plugin. When loaded, it disables the official plugin and registers itself, ensuring that only one title generator is active at a time.
- Fault tolerance: If the model errors out, times out, or returns empty output, it automatically falls back to the official deterministic fallback title.
- Configurable: Supports adjusting the maximum input byte limit, maximum output token limit, and request timeout duration.
Installation and Enablement¶
The plugin is provided as a dsh bundle and does not require manual editing of configuration files. Run the following command to install it:
dsh plugin --profile web add github:Relethe/dsh-brief-session-title
After installation, restart DSH for title generation to take effect in new sessions.
Configuration¶
The plugin provides the following adjustable parameters with the following defaults:
| Key | Default | Meaning |
|---|---|---|
maxInputBytes |
4096 | Maximum UTF-8 byte length of the input content; requests fail if exceeded |
maxOutputTokens |
64 | Maximum number of tokens for title generation |
timeoutMs |
60000 | Timeout duration for each request (milliseconds) |
provider / model |
omitted | If specified, both must be provided; otherwise the current session’s primary request route is reused |
Typical Usage¶
With the optimized prompt rules, the plugin can produce more concise titles. Examples:
- “Explain what JavaScript closures really are” ->
JS closure basics - “Express the grammar of modern Chinese semi-classical style in English” ->
Semi-classical grammar in English - “System PRD for a Chinese micro-horror 2.5D sandbox survival game” ->
Game PRD - Fixing Memory Leak in Node ->
Node memory leak - Database Schema Design Review ->
Schema review
Notes¶
- New sessions only: Existing session titles remain unchanged; only new sessions are affected by this plugin.
- Manual rename lock: Titles manually renamed by users will not be overwritten by automatic generation, consistent with official DSH behavior.
- Uninstallation method: To restore default behavior, run the removal command; the official title plugin will be restored automatically:
dsh plugin --profile web remove dsh-brief-session-title
Conclusion¶
dsh-brief-session-title corrects the prompt constraints and converges verbose session titles into key information points. It is suitable for developers who want to streamline the sidebar and improve search efficiency. See the plugin directory or source repository for more details.