Cerbur/clutch-dsh--packages-clutch-dsh-title ↗★ 25

@cerbur/clutch-dsh-title

Configurable deterministic session titles for DeepSeek Harness. 适合需要使用自定义模板或表情符号格式化并刷新 DSH 会话标题的用户。

패키지
@cerbur/clutch-dsh-title
호환성
미검증
Harness peer 범위
>=0.1.2-rc.1
Cordis peer 범위
4.0.1
버전
0.1.3
라이선스
MIT
최근 업데이트
2026. 9. 17.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Cerbur/clutch-dsh#46397fb4c63ccc1a5ad66dc1e51c07890dcefb64&path:packages/clutch-dsh-title

Usage

Choose a title template

  1. Start DSH Web with dsh web.
  2. Open Settings → Session Title.
  3. Keep Use title templates enabled, choose a row, and select Activate.
  4. Create a new Session, or use DSH's native title refresh action for an existing Session.

The read-only default template is selected in a fresh settings file. A newly selected format does not rewrite existing titles until DSH explicitly generates or refreshes one.

Manage templates

Fresh settings include an editable emoji template while the built-in default template remains selected. The emoji template can be edited or deleted; deleting it does not recreate it on a later settings registration.

  • Duplicate any row, including default, to open an editable copy.
  • Give a copy a unique name, edit its YAML, and select Save. Saving does not activate it.
  • Select Activate when a saved template should become effective.
  • View or select default, but do not edit or delete it.
  • Deleting the active custom template selects default.
  • Each row shows an illustrative example while editing. Examples do not call a model.

Create a custom template

The editor accepts a template and optional fields. A template reference such as ${daytime} is resolved from fields.daytime, and ${desc} is resolved from fields.desc:

Each ${fieldName} reference is resolved by fields.; it is a field substitution, not an instruction or expression.

template: '${daytime} | ${desc}'
fields:
  daytime:
    kind: datetime
    source: session.createdAt
    format: MMDD
    timezone: Asia/Shanghai
  desc:
    kind: llm-text
    instruction: Summarize the first prompt in a few words
    maxCharacters: 32

Use datetime or literal for deterministic values. Use llm-enum for a controlled model-selected value, or llm-text for a short model-generated value. Saving validates the YAML and field definitions before the template can be activated.

Refresh / regenerate a title

Use DSH's native Session title refresh action to explicitly run the current provider again. The refresh uses the current template and the Session's original createdAt value, so a datetime field does not change merely because the title was refreshed.

Disable custom titles

Turn off Use title templates in Settings → Session Title. The package keeps the saved templates and selection, but DSH resumes its native first-prompt title generator.

View generation statistics

Open Settings → Session Title to see cumulative title-model generations with valid usage data, input tokens, output tokens, total tokens, and the latest call details when the model reports them. Reset requires confirmation. Deterministic-only templates make no model request and therefore do not add a generation statistic.

Configuration

Template settings are stored under the clutch-dsh-title section of $DSH_HOME/settings.yaml. This settings file is the source of truth for the template map, active template, and enabled state.

DSH normally uses ~/.dsh/settings.yaml as the default location for that file, but the documented source of truth is $DSH_HOME/settings.yaml rather than a hard-coded home-directory path. The package does not use browser storage or clutch.yaml.

External edits to the settings file are picked up by DSH's settings reload path. Invalid template entries remain visible in Settings so they can be repaired instead of silently disappearing.