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-auto-load-history

v0.1.5

Published

打开会话时自动分页补齐整段历史,让「紧凑」排版立即折叠每个回合的思考过程(设置 → 通用可切回手动)。

Readme

dsh-auto-load-history

给 DeepSeek Harness Web 用的纯客户端插件:打开会话时自动把整段历史加载完,顶部「加载更早」不再常驻(设置 → 通用末尾的开关可关闭)。

为什么需要它

DSH 分页给会话窗口送历史:打开长会话时只有最后一段,顶部留一个「加载更早」按钮。想让更早的内容进入上下文或参与页面内的查找,只能反复点它(每页 50 条),或点右侧回合导航里最早那个未加载的圆点(每页 200 条)——长会话就是几十次点击。这个插件把这件事自动化:会话一打开就分页补齐到 hasMore === false。

行为

  • 触发:当前查看的会话进入 open 状态且 hasMore 为真时,用 DSH 自己的「跳到某处」加载路径把历史拉完,直到 hasMore 变成 false。请求内部分批(每批约 600 条),批与批之间等浏览器空闲——既不逐页往返几十次,也不会把主线程一次性占满;长会话几秒钟完成,期间滚动照常响应。
  • 不打断阅读:只有你正在滚动、并且已经离开流底部时,加载才暂停;你停手约 1 秒后它会自己继续(不需要你滚回底部),所以插件不会因为你顺手翻了两下就"失灵"。
  • 不推走你正在看的内容:每次更早的历史插入时,插件会把你的阅读位置锚定住(DSH 为「加载更早」按钮做的同类处理),因此新内容在下方展开时你看到的行不会滑动。会话刚打开时视口位置由 DSH 自己决定,这不算"你在阅读"——打开长会话不需要先滑到底部。
  • 失败闭合:连续 3 次加载都没有推进窗口(读取失败、日志到底但标记未清等)就停止本次补齐,把控制权交回 DSH 原生的「加载更早」按钮。
  • 与手动分页共存:你自己点「加载更早」或点回合导航都没问题,插件只在需要时补。
  • 不写入任何会话数据:只用公开的客户端会话接口读取更早的历史,和点「加载更早」做的事完全一样。

设置

设置 → 通用 最下方(DSH 自带设置项之后)的**「会话历史」开关**:

  • 开(默认):打开会话时自动加载全部历史。
  • 关:DSH 原生行为,只有你自己点「加载更早」才分页。

这个偏好是浏览器端的阅读习惯,保存在浏览器 localStorage(键 dsh-auto-load-history.enabled),跨标签页同步,不影响其他机器或其他浏览器。卸载插件不会删除它。

安装与卸载

dsh plugin --profile web add dsh-auto-load-history        # 安装
dsh plugin --profile web add [email protected]  # 升级到指定版本
dsh plugin --profile web remove dsh-auto-load-history     # 卸载

已发布为 dsh-auto-load-history。profile 依赖是 caret 范围,升级需要显式写版本号。安装会向 profile 增加 bundle,而 bundle 列表只在启动时读取,因此需要重启 dsh web 并刷新页面。

从源码运行:./install.sh 通过官方 profile manager 安装 link:<源码目录>(默认 DSH_PROFILE=web),./uninstall.sh 移除。卸载只移除 profile 依赖与 bundle 层,不修改 DSH 源码、会话历史或 ~/.dsh/settings.yaml。

要求

  • 不用重启也能用:这是纯客户端插件,改 client.js 后刷新页面即可(除非组成变化)。
  • 支持范围:@deepseek-ai/dsh >=0.1.7-alpha.1 <0.1.8,其中 0.1.7-alpha.1 已逐版本核对。同线后续版本可带警告运行,客户端继续用能力检查决定是否启用(缺少 SessionFace.loadOlder/loadThrough 时保持惰性,不会报错);跨到 0.1.8 之前必须重新读取 DSH 源码与实时契约。

已知限制

  • 只对当前查看的会话补齐;后台会话不做预加载。
  • 加载发生在会话刚打开时,长会话需要几秒钟;期间读者滚动时不会推走内容(位置被锚定),停手后自动继续。
  • 一次性把大量历史渲染出来本身就是重活:极大会话(数万像素、上千条消息)在每批落地时仍可能出现几百毫秒的顿挫(实测约 0.7 秒,未优化前约 3 秒)。这部分是 DSH 渲染历史的成本,插件已把自身开销降到每批两次测量。
  • 若整段日志在极短时间内被极限压缩或读取超时,插件停止后需要手动点「加载更早」。

技术细节、契约核对位置与验证清单见 AGENTS.md。

License

MIT