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

@nicearrack/dsh-translator

v0.4.3

Published

Youdao-style word-selection translation for the DSH web GUI. Select text anywhere, click the floating button, get a translation — by default through keyless public translation endpoints, with the harness's own LLM as the other engine. 有道风格划词翻译:DSH Web GUI

Readme

dsh-translator

基于 DeepSeek Harness(DSH)的有道风格划词翻译插件。

划选任意文本——会话消息、侧栏、输入框——选区右上角浮现悬浮翻译按钮,点击即弹出译文卡片。

插件提供两个引擎,可在设置里随时切换:

  • 免费 API(默认)——公共翻译接口,不需要账号、不需要 Key,装完即用。
  • 大模型——harness 自带的大模型,选中的文本不会离开你已配置的模型管道。

| English README | 中文 | |---|---|

安装

在 DSH 的插件页点「添加插件」,npm 包名或 GitHub 地址都可以:

@nicearrack/dsh-translator
https://github.com/nicearrack/dsh-translator

以后要移除,在同一个页面卸载。

要更新,在同一个页面卸载后重新添加即可——npm 包名和 GitHub 地址都会取到最新版本。重启 DSH 后新版本生效。

使用

划选文本 → 点击悬浮翻译按钮 → 译文卡片即出。按住卡片顶部可拖动;点「固定」可锁定,避免被误关。点击译文(或原文、错误信息)即可复制。

功能

  • 任意位置划词,悬浮按钮跟随选区,自动适配深色/浅色主题。手指或触控笔划选同样会唤起按钮;选区跨行时按钮锚定在划选结束的位置,而不是整个文本块
  • 方向自动判断:选中的文字是主语言就译成英文,否则译成主语言。主语言支持 简体中文 / 繁體中文 / 日本語 / 한국어 / Русский
  • 设置就在插件自己的页面里。选「免费 API」只显示主语言、翻译服务和超时;选「大模型」才换成模型相关选项。改动对下一次翻译立即生效,无需重启
  • 卡片底部标明实际生效的一方——免费 API 显示应答的服务,大模型显示模型;命中缓存时会标注出来
  • 支持复制、拖动、固定。平时只有一张卡片,但固定住的卡片会留在原地(正在翻译的也会继续译完),不会因为你接着翻译别的内容而被替换
  • 同一段文本再问一次会走短期缓存,只花一次请求;「重试」刻意绕过缓存,重新去问
  • 接口把原文原样退回来时,卡片会标明「未翻译」,不会把它当成译文

关于「免费 API」引擎

调用腾讯、微软、火山、MyMemory 的公共接口,都不需要注册、Key 或 token。请求由 DSH 的 Host 进程发出而非浏览器,因此没有 CORS 协商,也不会带上 Cookie。自动模式会依次尝试,失败接口的冷却从 30 秒起指数退避、上限五分钟;单个页面每分钟最多 60 次请求,超出后卡片会提示稍后再试。

两点需要注意:

  • 这些是厂商网页端的内部接口,不是有文档、有 SLA 的官方 API,可能随时变更——降级链正是为此存在。全部不可用时,卡片会明确提示并指向「大模型」引擎。
  • 划选的文本会离开本机,发送到实际应答的那家服务。每个浏览器第一次用免费引擎翻译时,卡片里会说明这一点,之后不再提示。若不可接受,请使用「大模型」引擎。

截图

划选文本 → 选区右上角出现悬浮翻译按钮:

划选文本与翻译按钮

点击 → 弹出译文卡片(英译中):

英译中译文卡片

中译英方向自动判断:

中译英译文卡片

设置就在插件自己的页面里:

插件设置

License

MIT