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

dsh-session-tools-plugin

v1.0.1

Published

DSH (DeepSeek Harness) web plugin: session menu delete with confirmation & auto-switch, ↑/↓ input-history recall, Esc interrupt & prompt restore, Ctrl+G modal editor.

Readme

dsh-session-tools-plugin

DSH(DeepSeek Harness)Web 客户端插件,补全会话管理与人机交互能力:

  1. 删除会话 —— 会话列表「…」菜单末尾新增「删除会话」,二次确认弹窗防误删;删除当前活跃会话后自动切换到最近会话,无其它会话时自动新建空会话。
  2. ↑ / ↓ 恢复输入历史 —— 输入框为空时按 回填上一条已发送的用户消息,继续按 向上翻阅更早输入, 向下翻阅(翻过最旧再按 清空)。
  3. Esc 中断并恢复输入 —— AI 正在思考或执行工具调用时按 Esc 立即中断,并把刚刚发送的 prompt 原文回填到输入框;未运行时 Esc 保持原逻辑。
  4. Ctrl+G 模态编辑器 —— 输入框聚焦时按 Ctrl+G 弹出大尺寸模态编辑器,Ctrl+Enter 或「保存并发送」后内容回填输入框并发送。

安装

作为 DSH Web 客户端插件安装(声明 dsh.client,平台 web):

npm install dsh-session-tools-plugin

将包加入部署的依赖/插件表后,DSH 会通过 dsh.client 扫描自动发现并加载 ./client 包(无需 Host 侧配置)。插件依赖以下已发布包提供的服务与插槽(peerDependencies):

  • @deepseek-ai/dsh-client-runtime —— sessions / workspaces / slots 服务
  • @deepseek-ai/dsh-client-locale —— locale 服务与字典
  • @deepseek-ai/dsh-client-ui-conversation —— conversation.input.left 插槽
  • @deepseek-ai/dsh-client-ui-layout —— shell.overlay 插槽
  • react ^18

使用说明

1. 删除会话

  • 侧边栏会话行尾 → 菜单最后一项「删除会话」(红色)。
  • 二次确认弹窗显示会话标题;若会话正在运行会额外提示。
  • 删除当前活跃会话 → 自动切换到最近更新的其它会话;没有其它会话时在原工作区新建空会话并打开。删除非当前会话仅从列表移除,不切换。
  • 说明:DSH 没有物理删除会话的 API(日志为追加式存储),删除在实现上等价于官方「归档会话」——从所有列表/分组隐藏,日志文件仍保留在磁盘。

2. ↑ / ↓ 输入历史

  • 输入框为空且焦点在输入框时按 :回填最近一次发送的消息;继续 翻更早。
  • 向下翻;翻过最旧一条后再按 清空回填。
  • 仅回填用户发送的消息(user / steering),不含 AI 回复、工具结果或系统提示;相邻重复消息合并。
  • 手动编辑回填内容后翻页状态自动重置;输入框非空时 / 保持光标移动等原行为。

3. Esc 中断并恢复

  • 会话运行中(AI 思考/工具执行)在输入框按 Esc:取消当前回合,并把刚发送的 prompt 原文回填输入框,便于修改后重发。
  • 未运行时 Esc 保持原逻辑(关闭弹层 / 无操作)。

4. Ctrl+G 编辑器

  • 输入框聚焦时按 Ctrl+G:弹出模态编辑器(预填当前输入)。
  • Ctrl+Enter 或「保存并发送」→ 回填并立即发送;Esc 或「取消」放弃。
  • 适合编写长 prompt、多行代码片段。

快捷键冲突规避

  • 全部按键在 window 捕获阶段处理,仅当事件目标为作曲栏 textarea([data-composer-card] 内)、且无命令菜单/弹层打开时才拦截;输入法组合(IME)期间全部放行。
  • 模态框打开期间快捷键暂时禁用,避免误触。
  • Ctrl+G 在文本区主动 preventDefault,避免触发浏览器“查找下一处”类默认动作。

已知边界

  • 「删除会话」菜单项依赖官方会话行与菜单的 DOM 结构([role="treeitem"] / [role="menu"]);DSH 升级若改动该结构,菜单项可能失效(删除本体走官方 archiveSession 服务,确认弹窗与切换逻辑不依赖 DOM)。
  • ↑ 历史长度受已加载消息窗口限制(旧消息分页加载后才进入历史)。
  • 会话日志不会被物理删除(归档语义),这是平台限制。

License

MIT