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

@honlnk/dsh-input-assist

v0.1.1

Published

Input assistant for DeepSeek Harness Web UI: inline AI completion (FIM ghost suggestion, Tab to accept) and Chinese-friendly typo checking with click-to-fix.

Readme

dsh-input-assist

DeepSeek Harness(dsh)输入助手插件:

  • 输入补全(ghost text) — 打字停顿后调用 DeepSeek FIM 接口(/beta/completions),灰色建议内联在光标后(NovAI 同款:镜像层透明占位 + 灰字),Tab 逐词采纳、Shift+Tab 全量采纳、Esc 关闭
  • 错别字检查 — 双层检测:词典层在浏览器本地运行(约 150 条错词 + 上下文规则,200ms 即时标红、离线零成本)+ LLM 上下文校对(在/再、的/得/地等,800ms 防抖与补全同节奏)。文中红字标注(红色波浪线,当前项高亮,点红字选中),导航条逐条修正,绝不全量替换

补全快捷键(建议灰字出现时生效)

| 动作 | 快捷键 | | --- | --- | | 采纳一词(中文按词切分) | Tab | | 全量采纳 | Shift+Tab | | 关闭建议 | Esc |

快捷键说明会在建议出现时显示在输入框外侧的 dock 行(与错别字导航条同位),输入框内无任何浮层。

错别字快捷键(仅输入框聚焦且有检出时生效)

| 动作 | 快捷键 | | --- | --- | | 下一个 / 上一个错字 | Ctrl+Shift+. / Ctrl+Shift+, | | 修正当前选中项 | Ctrl+Shift+F | | 标记该处为正确输入(不替换) | Ctrl+Shift+G | | 本次输入不再提醒 | Esc |

快速开始

dsh plugin --profile web add dsh-input-assist   # 或 @honlnk/dsh-input-assist,内容完全相同
dsh --profile web          # 启动,打开 http://127.0.0.1:3080

本地开发(从源码装):

git clone https://github.com/honlnk/dsh-input-assist && cd dsh-input-assist
npm install && npm run build
dsh plugin --profile web add "$PWD"

官网(功能演示 + 安装指引):https://honlnk.github.io/dsh-input-assist/

API key 三选一(补全与 LLM 检查层需要;词典层无需任何配置):

  1. 什么都不做——插件自动复用 dsh 已保存的 DEEPSEEK_API_KEY.credentials.yaml)或环境变量
  2. ~/.dsh/settings.yaml 里写 input-assist.completionApiKey: sk-…
  3. 环境变量 DEEPSEEK_API_KEY=sk-… dsh web

配置(settings.yaml → input-assist

| 键 | 默认 | 说明 | | --- | --- | --- | | completionEnabled | true | 输入补全开关(输入框「补」按钮同效) | | completionBaseUrl | https://api.deepseek.com/beta | FIM 端点(OpenAI 兼容可换) | | completionApiKey | '' | 留空则走凭证回退 | | completionModel | deepseek-chat | 补全模型 | | completionDebounceMs | 800 | 停笔多久后请求建议(与 LLM 校对同节奏) | | completionMaxTokens | 64 | 建议长度上限 | | proofreadEnabled | true | 错别字检查开关(「校」按钮同效) | | proofreadUseLlm | true | 是否叠加 LLM 检查层(关掉则完全不花钱) | | proofreadModel | deepseek-chat | LLM 检查模型 | | proofreadDebounceMs | 800 | LLM 层防抖(与补全同节奏,两路同时返回) | | proofreadDictDebounceMs | 200 | 词典层防抖(浏览器本地扫描,零成本) |

开发与测试

源码在 src/*.ts(TypeScript strict 模式),构建用 tsdown 双入口:

  • src/index.tslib/index.js(ESM + .d.ts,host 半边,cordis loader 直接 import)
  • src/client.tslib/client.js(CJS,banner/footer 自动包 window.__ModuleLoader__.load 壳,react / dsh-client-runtime 保持外部依赖,词典等本地模块打包进 bundle)
npm install
npm run build   # tsc 类型检查由 tsdown 内置完成;产物落 lib/
npm test        # 先 build,再跑 node --test(单测指向 src/*.ts,产物守卫指向 lib/client.js)

词典曾以 DICT-SHARED 标记块在两侧逐字同步,TS 化后单一源 src/proofread-dict.ts 由构建器打进两侧,test/client-bundle.test.js 用假 ModuleLoader 真正执行 bundle 产物做守卫。

文档

架构一览

浏览器半边(lib/client.js,tsdown 从 src/client.ts 打包)   host 半边(lib/index.js)
  input.overlay  仅错误提示(无浮层)     loopback    settings 命名空间 input-assist
  input.dock     错别字面板+修正      ───RPC /input-assist───▶  complete   → FIM /beta/completions
  input.right    补/校 开关                             proofread → LLM 层(llmOnly)
  useInput 读草稿 · inputActions.setDraft 写回
  镜像层(body 挂载):文中红字 + 光标后灰色 ghost 建议
  词典层本地运行(单源 src/proofread-dict.ts,构建时打进 client bundle)

状态

  • [x] 调研与可行性(2026-08-23)
  • [x] M0 双侧插件脚手架
  • [x] M1 补全建议条(Tab 采纳 / Esc 关闭 / IME 安全)
  • [x] M2 错别字检查(词典 + LLM 双层,点击修正)
  • [x] v2 错别字改版(文中红字标注、逐条导航、标记正确、快捷键)
  • [x] v3 NovAI 化改版(ghost text 内联建议、Tab 逐词采纳、词典层下沉浏览器 200ms、LLM/补全统一 800ms)
  • [x] v4 TypeScript 重构(src/ 全量 TS、tsdown 双入口构建、词典单源化、37 测试)
  • [x] v5 CI/CD + 发布(双名 npm 包、Trusted Publishing 免 token、GitHub Pages 官网)
  • [ ] M2.5 真实 Chrome 中验证点击/快捷键手感
  • [ ] M3 流式 / 设置 UI

发布流程(v5 起)

v* tag 自动触发(版本号须与 package.json 一致):

  • Release npm — 测试通过后双名各发一份:dsh-input-assist(裸名)+ @honlnk/dsh-input-assist(scope 镜像),内容相同。认证走 npm Trusted Publishing(OIDC),无需 NPM_TOKEN;已发布的名字自动跳过(幂等)。
  • Deploy Pagesdocs/ 下的站点文件部署到 GitHub Pages。

前置(一次性):npmjs.com 上为两个包名各配置一条 Trusted Publisher(repo honlnk/dsh-input-assist、workflow release-npm.yml、environment 留空);GitHub Settings → Pages → Source 选 "GitHub Actions"。

git tag v0.1.0 && git push origin v0.1.0   # 即发布

卸载

dsh plugin --profile web remove dsh-input-assist