dsh-session-title-idle-refresh
其他 活跃维护

dsh-session-title-idle-refresh

2001Y/dsh-session-title-idle-refresh

自动从全部人类消息中提炼会话标题,当对话静默超过30分钟时触发自动重命名,确保标题始终反映最新讨论内容。无需手动干预,集成简单,适合长期运行的会话窗口。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
1
Open Issues
JavaScript
主要语言
MIT
开源协议
20 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:2001Y/dsh-session-title-idle-refresh
git clone https://github.com/2001Y/dsh-session-title-idle-refresh.git
git clone git@github.com:2001Y/dsh-session-title-idle-refresh.git
README.md main

dsh-session-title-idle-refresh

DSH (DeepSeek Harness 0.2.1) session-title plugin built for Yoshiki Tamura.

  • Registers the session-title provider with automatic: "first-prompt" —
    the initial title is generated exactly once, as with the stock
    provider — but generation reads all human messages (stock
    all-prompts policy, including its keep-an-adequate-title stability
    rules, with the input trimmed to the byte budget).
  • A timer scans live sessions every scanMs. A session is refreshed
    once via ctx.sessionTitle.refresh() when all hold:
    • its title does not yet cover the latest human message,
    • the last event and the last human message are older than idleMs
      (default 30 min),
    • it has at least minMessages human messages (default 2),
    • it is not a subagent child session,
    • its title is not user-pinned (rename).
      Attempts per uncovered tail are recorded in memory; a refresh is
      never retried for the same tail before max(idleMs, 30min) passes.

Install (web profile)

dsh plugin --profile web add dsh-session-title-idle-refresh
# then restart dsh web

The package ships a bundle patch (cordis.patch.yml) that inserts
the provider row with the defaults below and disables the stock
session-title-llm row — only one title provider may be registered,
and this plugin replaces it (the same swap pattern the official
session-titles bundle uses for its all-prompts provider). To tune,
restate the row in your profile's cordis.patch.yml:

- id: session-title-idle-refresh
  config:
    idleMs: 1800000
    scanMs: 60000

Config defaults

idleMs 1800000 · scanMs 60000 · minMessages 2 · maxPerScan 3 ·
targetWords 5 · targetCjkCharacters 10 · maxInputBytes 16384 ·
maxOutputTokens 4096 · timeoutMs 60000. No provider/model is pinned:
titles use each session's own logged route, like the stock provider.

Upstream

An in-tree version of this behavior (a third automatic mode,
idle, for the session-title service) was prototyped against
deepseek-ai/deepseek-harness and is kept here as
upstream-idle-mode.patch. It is shelved for now: the upstream
repository does not accept external PRs, and the maintainer
prefers the plugin form.