dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Just Pin a model to Favorites, so you dont need to choose it from menu. (Dsh plugin)
PinMe 是为 DeepSeek Harness (dsh) 打造的快捷模型与思考强度收藏插件。
一键收藏常用的「模型 + 思考强度」组合(如 Gemini 3.8 Flash High、Claude Sonnet Thinking Medium),并将它们直接展示在输入栏下方作为快捷药丸标签(Pills),实现单次点击瞬间直达,彻底告别繁琐的多级菜单操作!
Default 档位,依然可收藏。ModelDirectoryResolver 和 Session 控制器,多会话切换状态无缝保持。localStorage,跨窗口及多会话随时可用。在模型选择器旁水平排布收藏胶囊标签(无收藏时整栏隐藏):
┌────────────────────────────────────────────────────────────────────────┐
│ [输入框 Prompt Input ...] │
├────────────────────────────────────────────────────────────────────────┤
│ [⭐ 3.8 Flash High] [Sonnet 4.6 Med] [Gemini 3.8 Flash High ▾] │
└────────────────────────────────────────────────────────────────────────┘
↑ 点击快捷标签直接切换模型+思考强度(× 删除)
收藏只出现在「思考强度」二级菜单,与档位设置并存(✓ 为当前选中档位):
┌─────────────────────────┐
│ ← Back │
│ Thinking Intensity │
├─────────────────────────┤
│ ✓ Low [ ♡ ] │
│ Medium [ ♥ ] │ ← 已收藏(模型 + Medium)
│ High [ ♡ ] │
└─────────────────────────┘
没有思考档位的模型(如部分第三方供应商)会提供单一 Default 档位,收藏项形如 模型名 · Default。
PinMe 是一个标准 DSH 组合包(bundle),用 dsh plugin 装进 profile 即可,无需改 DSH 源码。
下面的 <profile> 取 web(浏览器版)或 desktop(桌面版)。
dsh plugin --profile <profile> add dsh-plugin-pinme
包内已带编译好的 lib/,安装即可用。
dsh plugin --profile <profile> add github:bruceyork00-a11y/PinMe#v0.1.5
pnpm ≥10 默认拒绝运行 git 依赖的构建脚本,首次会失败并在输出里给出授权键。把该键写进 profile 的 pnpm-workspace.yaml 后重试:
# ~/.dsh/profiles/<profile>/pnpm-workspace.yaml
allowBuilds:
dsh-plugin-pinme: true
授权构建 = 允许该包代码在安装时于本机执行;请固定 commit/tag,只对可信源码授权。
dsh plugin --profile <profile> add ./dsh-plugin-pinme-0.1.5.tgz
tarball 已含 lib/,同样不需要构建授权。
安装后重启 DSH 即可,插件会自动出现(无需 --patch)。卸载:dsh plugin --profile <profile> remove dsh-plugin-pinme。
桌面版使用独立的 desktop profile,而这个名字保留给 Electron 持有的 profile:npm 版 dsh plugin --profile desktop ... 会被直接拒绝。请改用下面任一种:
# 桌面内置 CLI(带 manageDesktopProfile 权限,可接管 desktop profile)
& "…\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-plugin-pinme
或直接用应用内 侧栏「插件」→ 添加插件,填包名 / Git 地址 / 压缩包 / 本地绝对路径,装完点「立即启用」。
想让插件卡片显示图标与本地化标题,请按包名安装(上面两种方式都可以)。用
--patch E:/PinMe/cordis.yml这类路径挂载做本地调试时,DSH 不会读取展示元数据。
npm install
npm run build
用 --patch 直接挂载本地 cordis.yml(不写 profile):
pnpm dsh web --patch E:/PinMe/cordis.yml
随后打开 http://127.0.0.1:3080 即可体验。
npm run build # 产出 lib/(prepare 也会在 npm pack/publish 时自动执行)
npm pack # 生成 dsh-plugin-pinme-<version>.tgz,可挂到 GitHub Release
npm publish # 发布到 npm(需已登录,且 registry 必须是官方源)
git tag v0.1.5 && git push origin v0.1.5 # 打 tag,供 github:owner/repo#v0.1.5 安装
PinMe/
├── package.json # 声明 dsh.bundle(组合包层)、dsh.client(浏览器半边)与展示元数据
├── cordis.patch.yml # 组合包层:向 profile 插入 PinMe 插件行
├── cordis.yml # 本地 --patch 调试覆盖层
├── icon.svg # 插件管理器卡片图标(≤256 KiB,仅按包名安装时读取)
├── locale/ # 卡片本地化标题与简介(meta.title / meta.description)
│ ├── zh.json
│ └── en.json
├── build.js # tsc + esbuild 打包为 DSH ModuleLoader 格式
├── tsconfig.json # TypeScript 编译配置
├── src/
│ ├── index.ts # Host 进程(Cordis 模块声明)
│ └── client/
│ ├── index.ts # Client 入口:注入 conversation.input.model 插槽
│ ├── PinMeSelect.tsx # 增强版模型选择器(整合心形收藏与快捷药丸)
│ ├── FavoriteTags.tsx # 快捷标签栏组件(空态隐藏)
│ ├── HeartButton.tsx # 心形收藏交互按钮
│ ├── storage.ts # LocalStorage 读写与响应式监听
│ ├── locales.ts # PinMe 自有 i18n 命名空间(zh / en)
│ ├── types.ts # 数据契约定义
│ ├── clsx.ts # 零依赖 classNames 组合器
│ └── styles.ts # 内联样式注入
└── README.md