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

@gavinc-cn/dsh-patch-ask-expand

v0.1.2

Published

让 Web GUI 里「提问 / 回答」这一行(ask_user_question)默认展开:启动时对 dsh-client-ui-tool 的 client bundle 打一个幂等文本补丁。

Readme

@gavinc-cn/dsh-patch-ask-expand

让 DSH Web GUI 里「提问 / 回答」这一行(ask_user_question)默认展开。

做法与风险(请先读)

@deepseek-ai/dsh-client-ui-tool 是 npm 上的成品包(本机没有对应源码),因此本插件在启动时对该包的 client bundle 打一个幂等文本补丁:

<dsh home>/profiles/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js

⚠️ 它会改写另一个已安装包的源文件(并保留 .orig 备份)。dsh 升级或 dsh-client-ui-tool 升级后 锚点可能失效,此时插件会检测到并跳过(日志里提示核对 ToolRow / QuestionToolRow 的 expandable / open 写法后更新锚点),不会把文件改坏。

卸载方式:从 profile patch 删掉注册行,再把 lib/client.js.orig 覆盖回 lib/client.js。

结构

lib/index.mjs    node 半:启动时应用/回滚补丁(apply)
lib/patch.mjs    幂等文本补丁的实现(applyPatch / isPatched / restoreOriginal)
test/            node --test 单测 + 组件渲染测试(开发用,不随包发布)

配置(profile patch 的条目 config)

| 键 | 默认 | 说明 | |---|---|---| | disable | false | 置 true 时不打补丁(可用来临时关掉) | | bundlePath | <dsh home>/profiles/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js | 目标文件 | | logPath | <home>/.kimi-code/hooks/logs/patch_ask_expand.log | 日志文件 | | reapply | false | 置 true 时周期性复查并重打补丁(用于 dsh 热升级后自动修复) | | reapplyMs | 5000 | 复查间隔(≥1000ms) |

安装

本包随 @gavinc-cn/dsh-plugins-ui bundle 下发(该包 patch 里有一条 - id: dsh-patch-ask-expand 行, 在面板里就是一个开关)—— 它虽然改的是 Web GUI 的产物,但运行体在宿主(node)侧,所以 「只装 UI bundle」也会带上它。

本包自身不是 bundle 型包(未声明 dsh.bundle),dsh plugin add 只会把它装成普通依赖、不会加载。 单独安装(不走 bundle)时按 profile 本地插件方式:

  1. 把包放到 <dsh home>/profiles/node_modules/@gavinc-cn/dsh-patch-ask-expand/;
  2. 在 <profile>/cordis.patch.yml 增加注册行(需要调参时在条目上加 config:):
- insert:
    - id: dsh-patch-ask-expand
      name: "@gavinc-cn/dsh-patch-ask-expand"
  1. 重启一次 dsh web。

开发

npm test        # node --test test/patch.spec.mjs test/component-render.spec.mjs

已知边界

  • 零三方依赖(只用 node: 内置模块)。
  • 强依赖被补丁包的文本结构,属「成品包补丁」形态,dsh 升级后需要跟进锚点。