Wuxie233/dsh-plugin-session-title ↗★ 0
@wuxie/dsh-session-title
Settings page for auto-title prompt and optional title model; host intercept of purpose=session-title LLM calls
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-session-title
设置 → 会话标题:随时改自动取名系统提示词,并可锁定取名模型。
默认提示词是本机 OpenCode agent.title.prompt 的工单风格中文。清空提示词则使用 DSH 自带英文短指令。恢复默认只写回这段提示词,不改模型选择。
行为
- 时机仍是第一条合格用户消息(人手或 Host Automation)后取一次。之后不自动重取;侧栏手改过的标题钉住。
- 默认取名模型跟随当前对话路线。设置页可改成已装模型。
- 锁定的路线当时不可用:回退到对话路线,host 打警告。
- host 拦截
purpose: 'session-title'的 LLM 调用。冻结的GenerateOptions会克隆后再发,不改原对象。 session/title-llm-request仍可能记录 helper 原始 system/route;真正发出去的是克隆后的信封。
安装 / 更新
./install.sh
# ~/.dsh/profiles/web/cordis.patch.yml:
# - insert:
# - id: session-title
# name: '@wuxie/dsh-session-title'
# 重启 dsh web(host 半)
# 刷新页面(设置页)
验证
- 纯函数:
node scripts/policy.test.mjs node --check lib/client.js;ESM 的index.js/logic.js复制为.mjs再查- 部署后:
cd ~/.dsh/profiles/web && node -e "await import('@wuxie/dsh-session-title')"