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

@known-mouse/dsh-history-question-nav

v1.0.0

Published

DSH web plugin: a right-side question navigator for the current session. Lists every user question and scrolls to the matching message on click.

Readme

@known-mouse/dsh-history-question-nav

一个 DeepSeek Harness Web 客户端插件:在窗口右侧列出当前会话里你问过的每一个问题,点击任意一条即可平滑滚动定位到对话中对应的位置(问题气泡会短暂高亮)。

  • 右侧常驻「问题 / Questions」面板,按对话顺序列出当前会话的所有用户问题。
  • 点击某条问题 → 会话滚动到该问题所在位置并短暂高亮。
  • 面板可收起为右上角「问题」小按钮。
  • 跟随当前会话:切换会话时列表自动换成那个会话的问题。
  • 中英双语:注册了 question-nav locale 命名空间(zh/en),随 DSH 的语言设置自动切换。

目录结构

dsh-history-question-nav/
├── package.json          # dsh.bundle.patch + dsh.client.platform = "web"
├── cordis.patch.yml      # profile 补丁层:insert 本插件行
├── lib/
│   ├── index.js          # host 半边(故意为空)
│   ├── client.js         # 浏览器半边(window.__ModuleLoader__.load 打包格式)
│   └── types/            # 最小 d.ts 声明
└── README.md

客户端半边只依赖外壳已提供的 react(无需任何 dsh.client.external),通过 ctx.slots.inject("shell.overlay", ...) 注册到布局的框架级悬浮层,用 ctx.sessions.binding(currentId) 读取当前会话的 conversation 快照;文案经 ctx.locale.register("question-nav", { zh, en }) 注册并在组件里走 t 座位。

安装(发布到 npm 之后,其他用户)

dsh plugin --profile web add @known-mouse/dsh-history-question-nav

dsh plugin 会:① pnpm add 安装依赖;② 检测到本包声明了 dsh.bundle, 自动把它加进 profile 的 bundles 层,于是 cordis.patch.yml 的 insert 行自动生效。 最后重启 Web 服务并刷新页面:

dsh web

需要本机已安装 pnpm(dsh plugin 通过它管理依赖)。

手动安装(不依赖 dsh plugin)

  1. 把本目录放到 profile 的 node_modules 下,并把 @known-mouse/dsh-history-question-nav 加进 profile package.json 的 dependencies。
  2. 把 cordis.patch.yml 的内容合并进 profile 的 cordis.patch.yml,或者直接把 @known-mouse/dsh-history-question-nav 加进 dsh.profile.bundles。
  3. 重启 dsh web 并刷新页面。

发布

  1. 确认 package.json 里 private 已移除、version 正确、files 包含 lib/ 与 cordis.patch.yml。
  2. 登录 npm 并公开发布(scoped 包必须显式 --access public):
    npm login
    npm publish --access public
  3. 发布后,其他用户即可用上面的 dsh plugin --profile web add <包名> 安装。

也可以不经 npm、直接从 git 仓库安装:

dsh plugin --profile web add git+https://github.com/known-mouse/dsh-history-question-nav

说明:git 方式会在安装时跑 prepare 脚本构建客户端 bundle,pnpm 默认拦截, 首次安装时按提示把 pnpm 打印的 key 加进 profile 的 pnpm-workspace.yaml 的 allowBuilds 再重跑即可。

原理要点

  • shell.overlay 是 ui-layout 声明的框架级悬浮层(additive list,root scope), 本插件把面板注册进去,pointer-events:auto 让面板可交互,其余保持 click-through。
  • 当前会话 id 来自全局标准钩子 useSessions(s => s.current);会话的 conversation 快照通过注入的 ctx.sessions 用 binding(id).session 取得,并用 useSyncExternalStore 订阅。
  • 问题列表来自 ConversationSnapshot.chat(order + nodes.get(key)),过滤 kind === "user";每个 chat 节点在 DOM 上带有 data-chat-anchor-key,点击时按 该 key 找到元素,再对 [data-conversation-scroll] 滚动容器做平滑滚动。