DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

Relethe /

Relethe/dsh-brief-session-title

Verified

DSH session-title plugin: condenses a full sentence into a single word for easier recall.

★ 1 Stars0 Forks1 IssuesN/A Community rating0 Confirmed installs
View on GitHubProject homepage
READMESource: main@5e26e9f3

dsh-brief-session-title

English | 中文

A DeepSeek Harness (DSH) session-title plugin that condenses a full sentence into a short, scannable title.

Why this plugin

DSH generates session titles with the official session-title-first-prompt-llm plugin, which often outputs a complete sentence — a verbatim echo like "Explain what JavaScript closures are" ends up in the sidebar, long and hard to scan.

The root cause is the official prompt: its only length constraint is "Aim for about 5 words" — "aim for" is a soft target that models routinely overshoot, and it asks for "concise" without showing what concise means. The goal is not specific enough, and that is what makes titles wordy.

This plugin keeps all official logic untouched and changes exactly one thing: the system prompt — explicit rules plus correct/incorrect examples that turn "concise" into an executable standard.

Examples

Session content (original) This plugin's title
解释一下JavaScript闭包到底是什么 JS闭包浅说
用英语表达中国近代半文言文文法 半文言文法表达
中式微恐2.5D沙盒生存游戏系统PRD 游戏PRD
Fixing Memory Leak in Node Node memory leak
Database Schema Design Review Schema review

Core idea: prompt optimization

The new prompt gives the model four hard rules:

  1. PLAIN ENGLISH for English output — plain and direct;
  2. literary-vernacular hybrid for Chinese output — a compact classical-modern blend (e.g. "浅说", "文法表达");
  3. Avoid verbs in the output — verbs are the skeleton of a sentence; remove them and the sentence collapses into a phrase;
  4. Shrink to under 5 words, like a professional poet — shorter is better.

Five correct/incorrect example pairs anchor the target style, so the model imitates the pattern instead of guessing what "concise" means.

Features

  • A verbatim port of the official provider: this build mirrors session-title-first-prompt-llm (DSH 0.2.2-rc.1) line by line — message selection, JSON framing, byte caps, output-token cap, timeout code, route resolution, reasoning-effort selection, tool-call / max-token / empty-title rejection, normalizeSessionTitle, and the session/title-llm-request log event all stay official; the only difference is what systemPrompt() returns. After a DSH upgrade, diff index.js against the official lib/index.js — nothing but the prompt should differ;
  • Exactly one provider: the bundle patch disables the official plugin, and the title service rejects a second registration, so two generators can never compete;
  • Fail-safe: on model error, timeout, or empty output, it falls back to the official deterministic fallback title;
  • Configurable: input byte cap, output token cap, and timeout are all tunable.

Compatibility

Requires DSH 0.2.1-rc.x – 0.2.2-rc.x (@deepseek-ai/dsh-session-title* >= 0.2.1-0). DSH 0.2.1 replaced the shared generateSessionTitleWithLlm() helper with executeSessionTitleLlm() plus provider-owned prompt framing and output parsing; 0.2.2-rc.1 keeps those five entry points unchanged. If a later DSH changes the shared signature again, the plugin fails loudly instead of writing a malformed log event.

Installation

This plugin is a dsh bundle — install it directly from GitHub, no manual config editing:

dsh plugin --profile <name> add github:Relethe/dsh-brief-session-title

<name> is the profile whose plugins you manage (web, headless, desktop, …). Desktop builds also expose the same operation from the sidebar Plugins page; both paths write the profile's package.json and apply the bundle's own patch layer.

If the package is published to npm, the same command works with the package name:

dsh plugin --profile <name> add dsh-brief-session-title

For a local checkout (relative paths resolve against your invoking directory):

dsh plugin --profile <name> add ./dsh-brief-session-title

dsh plugin forwards its arguments to pnpm and then reconciles: because this package declares dsh.bundle, it joins the profile's bundle layer automatically, and the bundle's own cordis.patch.yml applies (disable the official title plugin + mount this one).

Restart DSH — new session titles take effect from then on.

Configuration

Key Default Meaning
maxInputBytes 4096 UTF-8 byte cap for the framed JSON input; oversized input fails instead of truncating
maxOutputTokens 4096 Output-token cap for the title request (the official dsh-base value: a ceiling against runaway output, not a length target)
timeoutMs 60000 Per-request timeout in milliseconds
provider / model omitted Supply both to use a dedicated route; omit to reuse the session's main-request route

targetWords / targetCjkCharacters are intentionally not exposed: the custom prompt fixes its own length rules, so those official knobs have nothing to configure here. The Config schema does not declare them, and writing them fails at apply time in resolveSessionTitleLlmConfig with unknown config key — they can never silently become no-ops.

Notes

  • New titles only: existing sessions keep their stored titles;
  • Manual renames pin: a user-renamed title is never overwritten by automatic generation (official DSH behavior);
  • To revert: dsh plugin --profile <name> remove dsh-brief-session-title — the official title plugin resumes automatically.

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 5e26e9f33c47

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout