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

@kongjianguan/dsh-think-sticky

v0.1.3

Published

Pin the Think disclosure row (expand/collapse control) to the viewport top when long reasoning text scrolls past.

Readme

dsh-think-sticky

DeepSeek Harness(dsh web)客户端插件:思考块(Think)的展开/收起标题行 sticky 贴住视口顶部——长思考内容滚动时,按钮始终可见,交互与视觉对齐官方 chat.deepseek.com。

English version: README-en.md

安装

方式一:npm 安装(推荐,已发布版本)

  1. 用 dsh 的插件命令安装到 web profile(等价于在 ~/.dsh/profiles/web 下执行 pnpm add):

    dsh plugin --profile web add @kongjianguan/dsh-think-sticky
  2. ~/.dsh/profiles/web/cordis.patch.yml 追加插件挂载条目——内容即本仓库根目录的 cordis.patch.yml

  3. 重启 dsh web(客户端模块扫描需重启生效;之后插件支持热重载)。

方式二:本地开发(未发布 / 改源码时)

把本目录链接进 profile 的模块目录,再按方式一第 2、3 步追加补丁条目并重启:

ln -sfn "$PWD" ~/.dsh/profiles/node_modules/@kongjianguan/dsh-think-sticky

注意:两种方式不要同时使用——方式二的符号链接与 pnpm 安装的文件在同一路径,会互相冲突。

功能

  • 滚动固定:思考块(Think 折叠行)以及命令卡片、工具、bash 等块类型的标题行(data-disclosure-rowdata-variant="bash")sticky 于对话滚动容器顶部(top: 0)——块内容高于视口时,展开/收起按钮不再滚出视野
  • 默认透明:未钉住时行完全透明,与普通内容无异;只有行真正钉住且块处于展开态aria-expanded="true")时才显示遮罩
  • 官方同款淡化:钉住时行下方出现 24px 渐变淡化带(linear-gradient(var(--dsw-alias-bg-base), transparent),官方 .c99b79f8 曲线),滚动的内容"融化"在行下而非被硬边截断;无边框、无阴影、无常驻背景块
  • 主题适配:全部使用 dsh web 设计令牌(--dsw-alias-bg-base),深色/浅色主题自动跟随
  • JS 驱动钉住态:滚动监听(capture 阶段 + rAF 节流)逐行判断是否跨过滚动容器顶边,切换 dsh-pinned 类;遮罩透明度过渡 120ms
  • 优雅降级:若上游把行包进 overflow-hidden 祖先导致 sticky 失效,行为退回"随内容滚走",遮罩不出现,不影响原有功能

工作原理

  • 纯客户端lib/index.js 仅为满足 Cordis 加载契约的空 Host 插件;全部行为在 lib/client.js(浏览器 bundle,window.__ModuleLoader__.load(...),由 package.jsondsh.client 声明发现)
  • 注入样式:启动时注入带 data-plugin="dsh-think-sticky"<style>,幂等(HMR 重载不重复注入),卸载时移除
  • 钉住检测scrollerOf() 沿祖先链找第一个可滚动容器;行矩形同时"压住"容器顶边判定为 pinned
  • 遮罩层级:行内 ::after(页面背景色,z-index -1)保证钉住时文字不透视滚动内容;::before(渐变淡化带)位于行下方 24px

许可证

MIT — see LICENSE