JohnXu22786/session-titler
dsh-session-caption
Two-phase session captioning for the DeepSeek Harness: instant keyword captions while busy, budget-model refinement when idle
Install
npx @deepseek-ai/dsh plugin --profile demo add github:JohnXu22786/session-titlerRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/session-titler)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from JohnXu22786/session-titler, cleaned of badges and images.
dsh-session-caption
Two-phase session captioning (automatic naming) for DeepSeek Harness (dsh): while a session is active, a title is generated instantly from keywords; once idle, the cheapest capable model is called to refine it. Everything runs in the background without interrupting the main flow — no wasted spend on titles.
user sends message ──► [Phase 1] instant keyword captioning (zero cost, millisecond)
│
└─► session idle for 5s ──► [Phase 2] budget-model refinement + one-line summary
│
└─► written to session/title (traceable)
Problem It Solves
New harness sessions are timestamp-numbered by default, making long session lists hard to scan. Existing approaches either only "wait for idle then generate" (no title while the user waits) or call the model every turn (expensive). This plugin splits the two ideas into complementary phases:
- Phase 1 · Instant captioning: the moment a user message lands, keywords are extracted from the latest message and a title appears with near-zero latency, without calling any model;
- Phase 2 · Idle refinement: once the session goes quiet, a single auxiliary call upgrades the title from a "keyword string" to a natural phrase and also produces a one-line session summary (within the same request, no extra billing);
- Cost guardrail: refinement defaults to the cheapest tier among registered models (
flash/haiku/minietc.), with explicit model override and full phase-2 disabling both available.
Features
- Two-phase pipeline: instant keyword captioning → idle budget-model refinement, title evolves with the session;
- Cost control: budget routing picks and caches the cheapest model from the registered model directory by name pattern, invalidated automatically on model topology changes;
- Original keyword algorithm: noise stripping (code blocks/URLs/Markdown) → script detection (Latin/CJK) → stopword and function-word filtering → order-preserving/character-budget truncation, works for Chinese, English, Japanese, and Korean;
- Multilingual: title language follows the message language; Latin titles are length-capped by word count, CJK titles by character count;
- Title deduplication: identical titles are not written twice; cross-session duplicates get a numbered suffix automatically (
Fix Login Bug (2)); - Summary integration: refinement also produces a one-line session summary, written to the session log via the
session/caption-noteevent for list UIs, export tools, etc.; - Respects manual titles: automatic generation stops completely after a manual rename — never overrides (even a rename during an in-flight refinement call is not written back);
- Zero-config to start: defaults work out of the box; every behavior is tunable.
Installing in DSH
Install the latest version into a profile from GitHub:
dsh plugin --profile demo add github:JohnXu22786/session-titler
Remove it:
dsh plugin --profile demo remove dsh-session-caption
This plugin is a standard dsh bundle (configuration layer + plugin code), installed into a profile via dsh plugin:
# install from a local directory (development / self-use)
dsh plugin --profile demo add /path/to/dsh-session-caption
…
