dsh-session-title-interval-llm
Every-N-prompts automatic session-title plugin for DeepSeek Harness (interval cadence LLM provider)
- Stars
- 1
- Language
- TypeScript
- Created
- Aug 15, 2026
- Updated
- Aug 16, 2026
Introduction
dsh-session-title-interval-llm
English | 中文
A DeepSeek Harness plugin that keeps the sidebar session title tracking the whole conversation: an optional ctx.sessionTitle provider that runs a cheap LLM title request on the first eligible prompt, then re-titles the session every interval new human prompts. It registers the interval cadence — the harness's third automatic mode beside first-prompt and all-prompts — so a deployment routes titles to a cheap model (deepseek-v4-flash and friends) while the working model stays untouched.
The repository ships two packages: packages/session-title-interval-llm (the plugin) and packages/session-title-llm (its vendored shared title-LLM helper: framing, limits, timeout, the session-title-llm settings section, and live re-registration). The helper is vendored so the plugin installs as one self-contained repository; the upstream harness publishes the same package under @deepseek-ai/dsh-session-title-llm and the plugin uses whichever resolution wins.
Two integration modes
- Injected mode — zero harness changes. Set
mode: 'injected'in the plugin config: the plugin listens tosession/event, counts eligible human messages per session, and appendssession/titleevents directly. The deterministic fallback, the title fold, and the manual-rename pin keep working because every surface reads the log. A/retitleslash command (registered when a commands service is composed) regenerates on demand and deliberately unpins a manual rename. This is the self-contained path: the repository alone delivers the whole feature on a stock harness. - Provider mode (default). Registers the
intervalcadence on the session-title service, which requires a harness build whose service ships the interval cadence (deepseek-ai/deepseek-harness upstream change, also carried by the Townrain fork). It integrates with every service-owned surface: automatic scheduling, explicit refresh, and the web session-row Regenerate title action.
Install
Junction the two packages into your profile's healed node_modules, then mount the plugin row:
New-Item -ItemType Junction -Path $env:USERPROFILE\.dsh\profiles\node_modules\@deepseek-ai\dsh-session-title-interval-llm -Target <this-repo>\packages\session-title-interval-llm
New-Item -ItemType Junction -Path $env:USERPROFILE\.dsh\profiles\node_modules\@deepseek-ai\dsh-session-title-llm -Target <this-repo>\packages\session-title-llm
Then add to profiles/<profile>/cordis.patch.yml (disable the bundle's default title provider first, then insert this one):
- id: session-title-llm
disabled: true
- insert:
- id: session-title-interval
name: '@deepseek-ai/dsh-session-title-interval-llm'
config:
targetWords: 5
targetCjkCharacters: 10
maxInputBytes: 4096
maxOutputTokens: 64
timeoutMs: 60000
interval: 5
provider: deepseek-official
model: deepseek-v4-flash
mode: injected
Restart the harness. With mode: 'injected' the sidebar titles start tracking the conversation on a stock harness: the first eligible prompt is titled immediately, then every interval prompts. /retitle regenerates (and unpins) a title on demand. On a harness with the interval cadence (the fork above), omit mode for the provider path, where the title model, the interval, and the automatic-titles switch also appear under Settings → Plugins → Plugin configuration (the shared session-title-llm settings section) and each session row's three-dot menu gains Regenerate title.
Session-row Regenerate title on stock harness
Injected mode also ships the row-menu surface on stock harnesses: the plugin
registers a webserver bridge, POST /plugins/session-title/retitle
({ "sessionId": "..." }), that resolves any persisted session via
sessions.get (no live agent required, so historical rows work) and runs the
same regeneration path as /retitle — the deliberate unpin included.
To surface it as a menu item, pair this plugin with
dsh-session-title-settings-card,
which injects the Regenerate title entry into the stock session-row menu
and patches the two stock seams the fork carries (its scripts/patch-stock.mjs
is idempotent — re-run after every dsh upgrade). Without the card plugin, the
bridge is still reachable directly (curl, other clients).
Configuration
See packages/session-title-llm/README.md for the shared required fields (targetWords, targetCjkCharacters, maxInputBytes, maxOutputTokens, timeoutMs, optional paired provider/model, optional enabled) and packages/session-title-interval-llm/README.md for the interval cadence contract.
Omit both provider and model to inherit the exact route from each logged main request; set both to route titles independently of the working model.
License
MIT — see LICENSE.