dsh-purge
YuJunZhiXue/dsh-purge在设置页编辑 prompt-inject.md、管理 AGENTS.md 或 CLAUDE.md 规则集、检查插件更新,并对本机包做可回滚的应用或还原。
在侧边栏账号行右侧添加一个齿轮按钮,点击一次即打开设置面板。它调用宿主自带的 settings.open 命令直达 shell 状态,不经过账号菜单;桌面端与手机局域网访问行为一致,后者没有键盘快捷键可用。
一个齿轮按钮,直接打开 DeepSeek Harness(DSH) 的设置面板 —— 桌面端、手机端、局域网访问都一次点击直达。
A gear button that opens the DeepSeek Harness (DSH) Settings dialog in one click — on desktop, on a phone, and over the LAN.
DSH 默认没有独立的设置按钮。桌面端可以按快捷键,但在手机上通过局域网访问 Web GUI 时没有键盘,想进设置只能:点开左下角的账号菜单 → 再点菜单里的「设置」。每次两步。
DSH ships no standalone Settings button. On desktop you can press a shortcut, but when you open the Web GUI from a phone over the LAN there is no keyboard, so reaching Settings means opening the account menu first and picking “Settings” from it. Two steps, every time.
This plugin puts a gear right next to the phone number and opens Settings directly.
从 GitHub 直接安装(本包尚未发布到 npm / not on npm yet):
dsh plugin add github:REALOIYO/dsh-settings-button或在 DSH profile 目录(通常是 ~/.dsh/profiles/desktop)中:
pnpm add github:REALOIYO/dsh-settings-button然后确认它出现在 package.json 的 dsh.profile.bundles 数组里 —— 不在该数组中宿主不会加载它。重启 DSH 生效。
Install straight from GitHub (this package is not on npm yet):
dsh plugin add github:REALOIYO/dsh-settings-buttonThen make sure it is listed in dsh.profile.bundles in your profile's package.json — the host does not load bundles that are absent from that array. Restart DSH to take effect.
发布到 npm 之后,上面的命令可以简写为 dsh plugin add dsh-settings-button。Once published to npm, that shortens to dsh plugin add dsh-settings-button.pnpm remove dsh-settings-button并从 dsh.profile.bundles 中移除对应条目,重启 DSH。
设置面板的状态由一个私有 store 持有,插件无法直接访问。可用的入口有两个:
shortcuts 服务上注册的 settings.open 命令settings.launcher slot 传给组件的 openSettings prop —— 但该 slot 是 single,已被账号菜单占用本插件走第 1 条:ShortcutsService 没有转发 invoke,但它的 registry 字段在运行时只是一个普通属性,因此 ctx.shortcuts.registry.invoke('settings.open', { modal }) 可以直达 actions.open()。若宿主将来收紧该字段,会自动回退到驱动账号菜单的方式,按钮不会彻底失效。
The settings shell keeps its open state in a private store. Two entry points exist: the host's settings.open command, and the openSettings prop passed to settings.launcher — but that slot is single and already claimed by the account menu. This plugin uses the command: ShortcutsService does not forward invoke, yet its registry field is an ordinary property at runtime, so ctx.shortcuts.registry.invoke('settings.open', { modal }) reaches actions.open() directly. If the host ever hardens that field, the button falls back to driving the account menu instead of breaking.
0.2.1-rc.3 开发 / Built against DSH 0.2.1-rc.30.2.1-rc.2 及更早版本兼容(定位逻辑带逐级回落)/ Works on 0.2.1-rc.2 and earlier too — the locator falls back step by step
0.2.1-rc.3 给侧边栏新增了一个「更多」按钮,它同样带 aria-label + aria-haspopup="menu",且在文档顺序上排在账号行之前。 旧版用 document.querySelector('button[aria-haspopup="menu"][aria-label]') 取全局首个匹配,于是齿轮被挂到了「更多」旁边。
0.2.1-rc.3 added a sidebar More button that carries the *same* aria-label + aria-haspopup="menu" pair and appears earlier in document order. The old locator took the first global match, so the gear got portalled next to More instead of into the account row.
v1.0.1 起改为三级定位,每级都做了作用域收敛:
Since v1.0.1 the locator is three-tiered, each tier scoped:
顺序 · 选择器 · 唯一性依据 1 · button[data-signed-out] · 账号行无条件渲染该属性(登录时为字符串 "false"),「更多」按钮没有 2 · [class*="settingsArea"] button[aria-haspopup="menu"] · 限定在 sidebar.settings 槽位容器内 3 · 全局 aria-haspopup 匹配,但排除 footerActions 内的元素 · 兼容旧宿主
第 2 级用了 [class*="settingsArea"] 属性子串匹配,因为该 class 由 CSS Module编译带哈希前缀(实际为 wtg9ga_settingsArea)。子串匹配在宿主改变命名时仍有效,但它确实是一个类名依赖 —— 与「完全不依赖类名」的旧表述不同,特此更正。
Tier 2 relies on a [class*="settingsArea"] substring match because the classis CSS-Module-hashed (actually wtg9ga_settingsArea). It survives renames, but it*is* a class-name dependency — correcting the earlier "no class-name dependency"
claim.