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

@hanxu131/dsh-autotitle

v0.1.3

Published

DeepSeek Harness slash command /title: generate a session title from the conversation with smart trimming and optional confirm

Readme

@hanxu131/dsh-autotitle

DeepSeek Harness(DSH) 加一条斜杠命令 /title:根据当前对话生成会话标题,长对话会智能删减后再调用模型。

English · npm · GitHub · 插件开发文档


这是什么?

一句话:/title 给当前会话起一个清楚的名字。

| 命令 | 做什么 | | --- | --- | | /title | 读对话 →(太长就删减)→ 用当前模型生成标题 → Web 上可确认 → 写入会话标题 | | /title 我的标题 | 不调模型,直接把会话标题设成你写的名字 |

适用场景:

  • DSH Web UIdsh web
  • ACP / DSHACP(Zed 等客户端)
  • 其他挂了 commands 注册表的 DSH profile

开始之前

  1. 已安装 Node.js(建议 ^22.19>=24
  2. 能跑通 DSH,例如:
dsh --version
# 或
npx -p @deepseek-ai/dsh dsh --version
  1. 想清楚你平时用哪个 profile(常见:webacp)。插件要装进你实际启动的那个 profile,不会全局共享。

安装(推荐)

把下面的 web 换成你的 profile 名(例如 acp):

dsh plugin --profile web add @hanxu131/dsh-autotitle

没有全局安装 dsh 时:

npx -p @deepseek-ai/dsh dsh plugin --profile web add @hanxu131/dsh-autotitle

装完必须重启

| 你用的前端 | 重启什么 | | --- | --- | | Web UI | 停掉再开 dsh web | | DSHACP / Zed | 重启 ACP / dsh --profile acp 进程 |

然后在对话里输入 /title 试一下。

升级

dsh plugin --profile web update @hanxu131/dsh-autotitle

卸载

dsh plugin --profile web remove @hanxu131/dsh-autotitle

使用说明

Web UI 确认框

默认 confirm: true 时,Web 会弹出确认:

  1. 接受此标题 — 采用生成结果
  2. 重新生成 — 再调一次模型
  3. 取消 — 不改原标题

也可以在下方「输入你的答案」里写自定义标题再提交。

选项旁边的数字 1 / 2 / 3 只是展示,不能当快捷键(这是 DSH Web UI 的限制)。请用鼠标点选。

ACP / headless

没有确认 UI 时,生成后会直接设为会话标题。


配置(可选)

默认配置在本包的 cordis.patch.yml。要改参数,可在对应 profile 的用户补丁里覆盖同名行,例如 ~/.dsh/profiles/web/cordis.patch.yml

- insert:
    - id: autotitle
      name: '@hanxu131/dsh-autotitle'
      config:
        confirm: true
        maxLength: 60
        language: follow
        prefix:
          enabled: true
          types: [Bug, Feature, Question, Refactor, Docs]
        trim:
          threshold: 15000
          window: 8000
          anchorChars: 500
        maxOutputTokens: 64
        timeoutMs: 30000

| 配置项 | 默认 | 含义 | | --- | --- | --- | | maxLength | 60 | 提示模型「标题最多约这么长」 | | prefix.enabled | true | 允许 [Bug] 这类前缀 | | prefix.types | 见上 | 可选前缀列表 | | language | follow | follow / zh / en | | trim.threshold | 15000 | 估算 token 超过此值才删减 | | trim.window | 8000 | 删减后保留最近约多少 token | | trim.anchorChars | 500 | 第一条用户消息锚定截断长度 | | confirm | true | 有确认 UI 时是否询问 | | maxOutputTokens | 64 | 生成标题的最大输出 token | | timeoutMs | 30000 | 生成超时(毫秒) |

长对话删减策略:保留第一条用户消息(主题锚)+ 最近窗口,中间用 [... N messages omitted ...] 省略。


和内置自动标题的关系

DSH 自带的 first-prompt 自动标题(dsh-session-title-first-prompt-llm)会在首条消息后自动命名。本插件是手动 /title,看整段(可删减)对话,两者互补,不必关掉内置功能。


本地开发

git clone https://github.com/ECHOUniverse/dsh-autotitle.git
cd dsh-autotitle
pnpm install   # 或 npm install
pnpm build
dsh plugin --profile web add link:"$(pwd)"

改完代码后重新 pnpm build,并重启对应 DSH 进程。

发布新版本(维护者):

npm run release          # patch:测试 → 升版本 → npm publish → 推送 tag
npm run release:minor    # minor 版本

安装已发布版本:

dsh plugin --profile acp update @hanxu131/dsh-autotitle

链接

| 资源 | 地址 | | --- | --- | | npm | https://www.npmjs.com/package/@hanxu131/dsh-autotitle | | GitHub | https://github.com/ECHOUniverse/dsh-autotitle | | DeepSeek Harness | https://deepseek.com/harness/zh/ | | 第一个插件教程 | https://deepseek-harness.github.io/deepseek-harness/develop/basic/ | | 姊妹项目(Pi) | https://www.npmjs.com/package/@hanxu131/pi-autotitle | | DSHACP(Zed) | https://github.com/ECHOUniverse/dshacp |

License

MIT