npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@weibaohui/dsh-smart-title

v0.1.0

Published

dsh 插件 · 会话智能标题:用 LLM 自动改写会话标题。每轮对话结束后对「用户消息 + 助手回答」的完整转写做一轮总结,标题跟随会话真实主题;首条消息即时出题、LLM 请求失败自动重试、用户手动改名不被覆盖、可选启动回填修复存量 fallback 标题。

Readme

@weibaohui/dsh-smart-title

DSH plugin npm version

会话智能标题插件:用 LLM 自动改写会话标题,告别「第一行」式标题。

核心功能

  • 全对话总结:每轮对话结束后,对「用户消息 + 助手回答」的完整转写做一轮总结,标题反映会话真正在做的事,而不是复述第一句话
  • 首条消息即时出题:会话第一条消息到达即出 LLM 标题(接管官方 first-prompt 节奏),不用等第一轮结束
  • 失败自动重试:官方内置标题提供方请求失败后回退标题会永远残留;本插件每轮结束自动重试刷新
  • 手动改名保护:你在界面上手动改过的标题(用户钉住)绝不被自动覆盖
  • 范围可控:自动跳过子代理会话与 fork 子会话;可开关「是否包含助手回答」
  • 启动回填(可选):对标题仍是回退文案的活跃会话逐个补刷(默认关闭,可设开启与会话上限)
  • 模型可指定:默认跟随会话当前模型,也可为标题单独指定一条便宜/快速的模型路由

安装

dsh plugin --profile web add @weibaohui/dsh-smart-title -w

装完重启 dsh web 即生效,无需任何配置。安装时会自动禁用内置的 first-prompt 标题提供方(session-title 服务只允许一个提供方,两者不能共存;卸载本插件后内置提供方自动恢复)。

使用

  1. 装好重启后,正常聊天即可——侧边栏会话标题会在第一轮对话后自动变成总结式标题
  2. 想调行为:设置页 → 会话智能标题(dsh-smart-title)——总开关、标题长度目标、字节预算、超时、模型路由覆盖、回填开关等全部可视化
  3. 存量会话修复:打开「启动回填」后重启一次实例,插件会对标题仍是回退文案的活跃会话逐个重写(用户手动改过的不动)
  4. 也可直接编辑 ~/.dsh/settings.yamldsh-smart-title: 节,保存后约 2 秒热生效

工作原理

  • 标题走 dsh 官方 sessionTitle 服务的日志事件机制(session/title),与本体内建提供方同一写入通道,客户端侧边栏无感知自动刷新
  • 本插件注册唯一提供方并接管其 first-prompt 自动节奏,另订阅 session/eventturn/end(completed)触发显式刷新
  • 每次刷新读取完整会话日志构建转写(用户消息按 seq 归属,助手回答按预算裁剪),经 ctx.llmpurpose: session-title 发起独立辅助请求,不影响主对话上下文与 KV Cache

联系我 :飞书群

link