Back to home@TyrantG

dsh-titlecraft

DSH 会话标题插件:支持自定义模板、语义图标及可选 AI 生成与精修。A DeepSeek Harness session-title plugin with custom templates, semantic icons, and optional AI generation and refinement.

Stars
0
Language
TypeScript
Created
Sep 9, 2026
Updated
Sep 9, 2026
GitHub repo

Introduction

TitleCraft

中文 | English


中文

把 DSH 会话标题整理成短、准、统一的格式。默认标题为:

MMDD|类型|主题

快速开始

dsh plugin --profile web add dsh-titlecraft -w

安装或升级后重启 DSH Web,然后前往:

设置 → 插件 → 插件配置 → 标题工艺

TitleCraft 会接替 DSH 内置标题 provider。DSH 同时只能使用一个标题 provider。

主要功能

  • 只修改会话标题,不改消息、工作区、排序、置顶或归档状态。
  • 内置 7 种标题模板,也可使用 {date}{type}{topic}{icon} 自定义格式。
  • 标题类型可以新增、删除、启用或停用。
  • 日期可取创建时间、最后真人消息、最后完成回合或最后持久活动。
  • 内置 206 个本地语义图标,智能模式会根据主题从白名单中选择。
  • 能直接判断出完整短主题时,不调用模型;拿不准就保留原标题。
  • 可在首条真人消息后调用一次模型,也可在回合结束后进行语义精修。
  • 保护人工标题;新回合、改配置、取消或卸载都会终止过期任务。

标题规则

占位符内容
{date}按所选来源和 IANA 时区生成的日期
{type}当前启用的内置或自定义类型
{topic}完整、简短的会话主题
{icon}可选的本地图标

{topic} 必须存在。未知占位符、残缺主题和超过 80 UTF-8 字节 的结果不会写入,也不会通过截取开头强行凑标题。主题中会去除项目名称;无法可靠判断时保留当前标题。

图标是标题文本的一部分,会影响搜索、复制、分叉和 80 字节上限。插件不下载远程图标或字体。

模型调用

未指定固定模型时,TitleCraft 会优先寻找名称看起来成本较低的模型,再使用当前会话模型。名称判断不代表真实价格。

  • 首条消息模型生成默认关闭。开启后,每个实时会话最多尝试一次。
  • 回合结束精修可在真人回合正常完成后更新标题。
  • 失败时回退当前模型默认关闭;开启后最多额外尝试一次。

模型调用可能产生费用,但不会改变主会话使用的模型或思考强度。Provider 和 Model 直接从 DSH 查询,固定组合通过验证后才能保存。

原生重命名工作台

当前 DSH 界面支持时,原生“重命名”弹窗会显示两个额外操作:

  1. AI 生成摘要:生成一段可编辑摘要,并建议类型和图标。
  2. 从摘要生成标题:根据整段摘要压缩出完整短主题,只更新未保存的重命名草稿。

你可以在两步之间修改摘要、类型和图标。最终仍由原生“重命名”按钮提交;TitleCraft 不会绕过它直接保存标题。 如果当前 Workspace 不支持这些控件,设置页会显示提示;自动标题仍可正常工作。

English | 返回顶部


English

Keep DSH session titles short, clear, and consistent. The default format is:

MMDD|type|topic

Quick start

dsh plugin --profile web add dsh-titlecraft -w

Restart DSH Web after installing or upgrading, then open:

Settings → Plugins → Plugin configuration → TitleCraft

TitleCraft replaces DSH's built-in title provider. DSH can use only one title provider at a time.

Features

  • Changes session titles only. Messages, workspaces, ordering, pinning, and archive state stay untouched.
  • Includes 7 presets and custom {date}, {type}, {topic}, and {icon} templates.
  • Lets you add, remove, enable, or disable title types.
  • Uses session creation, the last human message, the last completed turn, or the last durable activity as the date source.
  • Includes 206 local semantic icons; smart mode selects one from an allowlist based on the topic.
  • Avoids a model call when a complete short topic can be inferred. If the topic is unclear, the current title stays unchanged.
  • Supports one model call after the first human message and semantic refinement after a completed turn.
  • Protects manual titles and cancels stale work after new turns, configuration changes, cancellation, or unload.

Title rules

TokenValue
{date}Date from the selected source and configured IANA timezone
{type}An enabled built-in or custom type
{topic}A complete, concise topic
{icon}An optional local icon

{topic} is required. Unknown tokens, incomplete topics, and titles over 80 UTF-8 bytes are rejected. TitleCraft never shortens a title by taking its prefix, removes project names from topics, and keeps the current title when the result is uncertain.

Icons are stored as title text, so they affect search, copy, forks, and the 80-byte limit. No remote icons or fonts are loaded.

Model calls

Without a fixed route, TitleCraft first looks for a model whose name suggests a lower cost, then uses the current session model. Model names do not guarantee pricing.

  • First-message generation is off by default and runs at most once per live session when enabled.
  • Turn-end refinement can update the title after a human turn completes successfully.
  • Fallback to the session model is off by default and adds at most one retry when enabled.

Model calls may incur provider charges. They never change the main session model or reasoning effort. Provider and Model options come directly from DSH, and a fixed pair must be validated before it can be saved.

Native Rename workbench

When supported by the current DSH interface, the native Rename dialog includes two extra actions:

  1. AI generate summary creates an editable summary and suggests a type and icon.
  2. Generate title from summary compresses the full summary into a complete short topic and updates only the unsaved Rename draft.

You can edit the summary, type, and icon between the two steps. The native Rename button remains the only way to save the title. If the current Workspace does not support these controls, Settings shows a notice; automatic titles continue to work.

中文 | Back to top