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

@objectivex666/dsh-settings-search

v1.13.1

Published

DSH settings panel search plugin – instantly filter setting sections and general items with navigation guidance. Installable via `dsh plugin add`.

Downloads

2,120

Readme

dsh-settings-search

为 DSH(Cordis)设置面板提供即时搜索能力,快速定位设置页与通用设置项。

npm version license node Awesome DSH Plugin Listed on dsh-plugin.org

中文 · English


功能特性

  • 🔍 实时搜索:在设置面板中嵌入搜索框,输入关键词立即过滤所有已注册的设置页(settings.section)与通用设置项(settings.general.item)。
  • 🧩 三种搜索样式:可选择经典侧栏、窗口顶栏或弹出搜索页;选择会保存在当前浏览器。
  • ⌨️ 搜索快捷键(v1.10.0):在设置面板内按 Ctrl+F 或 ⌘F 聚焦搜索框;可在「设置搜索」页启用或关闭,关闭后保留浏览器默认查找。
  • 🤝 导入 DSH 模型配置(v1.9.0):在 AI 配置区一键读取 DSH 当前默认模型的 Base URL 与模型名;默认模型是 DSH 内置的 DeepSeek 路由时(设置里不含 Base URL),导入 DeepSeek 的接口地址 https://api.deepseek.com/anthropic。为避免凭据扩散,导入始终不包含 API Key。
  • 🎯 新用户引导(v1.9.0):仅在安装后首次打开设置面板时弹出引导弹窗,介绍四种搜索样式、拼音/意图/AI 联想、点击即达与自动导入索引等核心功能;不再提供“不再显示”和手动重开按钮。
  • 📂 页内选项搜索(v1.2.0):不只搜页面,还能直达每个设置页内部的具体选项——插件页的标签页(settings.plugins.tab)、旧版的插件卡片座位(settings.plugin.item / web-ui.plugin.item,0.2 已移除)、通用设置行等,结果以「页面 › 选项」面包屑展示。
  • 🔤 拼音联想搜索(v1.5.0):输入拼音首字母(如 sz)或全拼(如 shezhi)即可联想中文设置项;支持 ↑/↓ 选择、Enter 跳转、Esc 关闭,命中的文字自动高亮。
  • 🧠 意图联想搜索(v1.6.0):直接描述想做的事(如「太亮了」「字太小」「忘记密码」),无需知道选项名即可联想真实设置项,结果在「猜你想找」分组展示。
  • 🤖 AI 联想搜索:没有本地匹配时,用你配置的 OpenAI 兼容、Anthropic 或本机 Ollama 模型理解搜索意图并推荐设置项。默认关闭,可在「设置搜索」页开启并配置;Ollama 无需 API Key。
  • 💾 持久设置索引(v1.12.0):首次采集后的设置索引保存在本机浏览器;只在首次安装、其它插件安装或更新时重建,也可在「设置搜索」页手动重建。
  • 🧾 日志与查看(v1.13.0 / v1.7.0):记录插件运行、搜索与 AI 请求的关键动作。日志按天写入 DSH 日志目录($DSH_HOME/logs/dsh-settings-search/settings-search-YYYY-MM-DD.log,文件名带日期,每天一个文件);单个文件上限 100 MB,超出则同日续写编号分片(.1、.2…),整个日志目录上限 100 MB,超出时删除最旧的文件(正在写的文件永不删除)。「设置搜索」页可直接查看日志、打开日志文件夹、复制、导出或清空;「日志」标题旁的计数显示当天文件的条目数。不会记录 API Key。
  • 🧭 点击即达:选中结果后自动点击对应的左侧导航项打开所在分区;若是页内标签页会继续点开对应标签,并高亮闪烁目标选项行。无法自动跳转时显示手动路径提示。
  • 🌱 启动自动索引(v1.8.0):首次打开设置面板时自动遍历各设置分区,静默读取分区内选项(如「启用创意工坊卡片」)并导入搜索索引;此后分区选项无需逐页手动打开即可直接搜索,读取完成后自动恢复当前所在分区,导入过程搜索框下方会显示提示,完成后自动消失。
  • 🛠 自带设置页(v1.4.0):左侧导航新增「设置搜索」页——展示当前版本,一键检查 npm 注册表上的最新版本;有更新时直接给出复制就用的 dsh plugin update 命令。
  • 🧭 更新说明查看(v1.7.1):在「设置搜索」页「检查更新」旁新增「查看更新说明」按钮,可拉取 GitHub Release 更新内容并就地展示;拉取失败时自动跳转 Release 页面。
  • 🌐 多语言支持:内置中英文国际化,可跟随 DSH 本地化系统扩展。
  • 🎨 主题适配:完全使用 CSS 变量,自动跟随 DSH 主题(亮/暗)。
  • ⚡ 动态响应:实时订阅设置项的新增/删除/变更,搜索结果自动刷新。

安装(命令行)

本插件是一个标准的 DSH profile bundle:安装后自动写入设置面板, 无需手动修改任何 DSH 配置文件。

前置要求

  • DeepSeek Harness (DSH):DSH 0.2 正式版(桌面版与 dsh web)以及更早的 0.1 版本;本插件会按运行中的版本自动选择对应接口。
  • Node.js >= 18(推荐 LTS)。

通过 npm 安装(推荐)

dsh plugin --profile web add @objectivex666/dsh-settings-search

通过 GitHub 安装

dsh plugin --profile web add github:objectivex666/dsh-settings-search

本地源码安装(开发调试)

dsh plugin --profile web add /path/to/dsh-settings-search

安装完成后重启 DSH(dsh web),打开设置面板即可看到顶部的搜索框。 卸载:dsh plugin --profile web remove @objectivex666/dsh-settings-search。

非 web profile 请把命令中的 --profile web 换成你的 profile 名。


手动接线(不通过命令行安装时)

把本包加入 profile 依赖并声明为 bundle 层即可(dsh plugin add 会自动完成):

# 你的 profile 的 cordis.patch.yml(或通过 --patch 传入)
- insert:
    - id: settings-search
      name: '@objectivex666/dsh-settings-search'

包内自带 cordis.patch.yml(本文件内容),dsh plugin add 会自动应用。


本机 Ollama(v1.11.0)

在「设置搜索」页开启「AI 联想搜索」,将「接口类型」选为「Ollama(本机)」:

  • Base URL:默认 http://127.0.0.1:11434,也可填写自定义端口;支持根地址、/api、/api/chat 和 /v1。
  • 模型名:点「获取模型」从服务返回的模型中选择,或手动输入完整模型名(包括标签),可用 ollama list 查看。
  • API Key:无需填写,Ollama 请求不会携带原有云端密钥。

保存后可用「测试接口」检查连接。本地模型首次加载可能较慢,Ollama 请求的超时时间为 120 秒;取消搜索会中止请求。

插件不会安装或启动 Ollama,也不会下载模型。使用时需自行准备已运行的 Ollama 服务和模型。请求由浏览器发出,因此「本机」指浏览器所在设备,而非远程 DSH 服务器。

连接被拒绝时检查服务地址;跨域访问失败时,将当前 DSH 页面的确切来源(如 http://127.0.0.1:3080)加入 Ollama 的 OLLAMA_ORIGINS,并重启 Ollama。不要使用不必要的通配符来源。非本机地址仍要求 HTTPS。


包结构

lib/index.js        Host half(日志文件 + `/api/settings-search-log` 路由)
lib/client.js       Browser half(搜索框 UI,__ModuleLoader__ 格式)
cordis.patch.yml    组合补丁:插入 settings-search 插件行
scripts/check.mjs   结构自检(npm test)
scripts/ai.test.mjs AI 接口与设置索引回归测试(模拟请求,不运行模型)
scripts/log.test.mjs 宿主日志文件与路由回归测试(临时目录,不写用户目录)

开发

npm test   # 结构检查及 Ollama / OpenAI / Anthropic 模拟接口回归测试

历史说明:v1.1 及之前仓库曾附带 dsh-settings-search.js(会话内 cordis_define 动态插件源)。因与正式包代码长期双份维护漂移,已于 v1.4.1 移除;如需动态用法可从 git 历史(tag v1.4.0)取回参考。

反馈与贡献

欢迎提交 Issue 反馈 Bug、功能建议或使用疑问: GitHub Issues, 也欢迎直接发起 Pull Request—— 动手前请先读一遍 贡献指南(结构、代码约定、测试与发布流程)。

提交 Issue 时,请尽量完整地提供以下信息,便于定位与复现:

  • 问题描述:期望的行为与实际发生的情况。
  • 复现步骤:一步步说明如何复现,包括触发关键词、所在设置页等。
  • 日志:在「设置搜索」页的「日志与导出」中导出最近的搜索/运行日志并粘贴(API Key 不会被记录,可放心提供);控制台报错也请一并附上。
  • 环境信息:DSH 版本、Node.js 版本、插件版本(可在「设置搜索」页查看)、操作系统与浏览器。
  • 截图/录屏:涉及界面表现时,附上截图或录屏更有帮助。

更新日志与发布

每次版本更新需同时更新 GitHub Release 与 git tag,正文为双语,并写明「新功能」与「修复」:

  • 更新 CHANGELOG.md(中文)与 CHANGELOG.en.md(英文),两者各含 ### ✨ 新功能 / Features 与 ### 🐛 修复 / Fixes。
  • 同步 package.json 与 README 的版本号,按 vX.Y.Z 打 tag 并推送;GitHub Actions 会同时发布到 npm(npm-publish.yml)并创建双语 GitHub Release(release.yml)。
  • 本地预览 release 正文:node scripts/release.mjs --version <ver>
  • 实际打 tag 并发布:node scripts/release.mjs --version <ver> --publish(需 gh CLI 且已登录)

未带 --publish 时脚本只校验并打印 release 正文,不会创建 tag、推送或发布。