cq-guojia/dsh-session-title-pattern ↗★ 2

dsh-session-title-pattern

自动将会话标题整理为日期|类型|主题格式 适合需要自动规范化、结构化管理 DSH 历史会话标题的用户。

套件
dsh-session-title-pattern
相容性
待驗證
Harness 依賴範圍
>=0.1.7-rc.1 <0.3.0-0
Cordis 依賴範圍
^4.0.2
版本
0.8.9
授權
MIT
最近更新
2026年10月13日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:cq-guojia/dsh-session-title-pattern

Configuration

Settings UI (recommended)

Plugin page: the configuration form under the bundle description

Since dsh 0.1.7 the settings live on the plugin's own page: open the Plugins view in the sidebar, find this plugin under Installed, and open its detail page — the configuration form sits between the description and the entry rows.

ItemMeaning
Recompute every N messagesDefault 10. 0 = compute once when the session is created
Model for title summaries (provider / model)Two dropdowns on one row: pick a provider on the left (first item "follow the chat model" = empty follows the session's main model), then a model on the right — selecting a provider auto-picks its first model. Options come from providers you have configured; falls back to two text fields when the directory is unavailable
TimeoutRaise it when the model is slow (e.g. a free tier queueing)
Title format / Title length limitWhat the three parts look like, and how long the title may get

Edits are staged and written only when you press "Save"; each field marks whether it was customized and can be reset on its own; leaving the form discards unsaved edits.

The UI copy is bilingual and follows dsh's interface language (Settings → General → Language).

cordis.patch.yml in the profile

For scripted or bulk deployments:

- id: session-title-pattern
  config:
    retitleEvery: 10
    template: '{MMDD}|{type}|{topic}'
    maxBytes: 80
KeyTypeDefaultMeaning
retitleEverynumber10How many human messages between title recomputes; minimum 0; 0 = compute once when the session is created
providerstringemptyModel provider; must be paired with model; empty follows the session's main model
modelstringemptyModel id; must be paired with provider
timeoutMsnumber90000Timeout for one model call (ms)
maxOutputTokensnumber2048Output token fuse; reasoning counts against it too. Not shown in the UI; reach for it here when needed
maxInputBytesnumber4096Input byte cap for one call
templatestring{MMDD}|{type}|{topic}Title format template
maxBytesnumber80Total title length cap (UTF-8 bytes), minimum 20

The | in the default template is a full-width vertical bar (U+FF5C). A placeholder the plugin does not recognize stays in the title verbatim (e.g. {date}), so a typo in the template is obvious at a glance.

⚠️ maxBytes must be ≤ maxTitleBytes of the session-title row (dsh-base uses 80 by default); anything beyond is silently truncated.

Precedence is schema default → composition layer (this section) → user layer (settings UI): for a field you changed in the UI, editing cordis.patch.yml has no effect until you "Reset" it in the UI first.