nvnoa57-star/dsh-compaction-slider
Project Overview项目介绍
dsh-compaction-slider is a purpose-built plugin for DeepSeek Harness (DSH) that adds a user-friendly UI control for adjusting per-session context compaction thresholds. It adds a small “Compression XX%” indicator chip next to the existing context usage meter ring on DSH’s web input bar, located just to the left of the send button. Clicking this chip opens a popup with a sliding control that lets users set a threshold between 0.4 and 1.0, and the plugin also supports setting the value via the /threshold chat command. The default value of the threshold is 0.8, matching DSH’s official default behavior.
After installation, any new DSH session will load the plugin automatically, and old sessions created before installation will not use the new preset required by this plugin. To adjust the threshold, users just click the chip, drag the slider to their desired value, and release to save the setting. Changes take effect at the next step boundary for the active session, so users do not need to restart DSH or refresh the page to see the change take effect. This plugin is designed for DSH users who want granular control over when context compression triggers across different sessions.
The plugin requires Node.js 22.19 LTS or newer, and DSH version 0.1.1-rc.2, and it is recommended for Windows systems with PowerShell 5.1 or newer. Users must have launched dsh web at least once before installation to complete DSH initialization. Users can install it automatically via a provided PowerShell script that handles all setup steps including backup of existing configuration, and users on other platforms can install it manually by following the step-by-step guide in the README. The plugin is provided under the MIT license, and it does not modify any core DSH node_modules files, making it easy to remove or update later.
这是一款专为 DeepSeek Harness (DSH) 开发的原生插件,用于在当前会话中实时调整上下文自动压缩的触发阈值。它在 DSH 网页端输入栏的上下文占用圆环旁新增了一个「压缩 XX%」标签,点击即可弹出范围为 0.4~1.0 的滑动条,拖动即可设置阈值,同时也支持在聊天中输入 /threshold 命令完成同等设置。插件默认阈值为 80%,符合 DSH 官方默认配置水平。
它的核心特性是按会话独立存储阈值,每个会话可以设置不同的压缩触发比例,切换会话、重启 DSH 都会保留当前设置。调整后阈值会在下一个步骤边界立即生效,不需要修改全局配置也不需要重启 DSH 服务,整体运行稳定对原有功能无影响。插件不修改任何 node_modules 内部文件,属于零侵入扩展,复用了 DSH 官方压缩逻辑的完整链路。
本插件支持一键安装卸载,提供 PowerShell 脚本自动完成安装、注册和预设设置流程,安装前会自动备份原有配置,支持幂等重复执行,脚本还支持一键卸载,操作非常简单方便。依赖要求 Node.js ≥ 22.19 LTS,对应 DSH 版本为 0.1.1-rc.2,推荐 Windows 系统使用,其他平台也可手动完成安装。使用前需要至少启动过一次 dsh web 完成初始化,安装完成后需要重启 dsh web 才能生效。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-compaction-slider(nvnoa57-star/dsh-compaction-slider)
仓库:https://github.com/nvnoa57-star/dsh-compaction-slider
本站详情页:https://www.yhbd.top/plugins/nvnoa57-star-dsh-compaction-slider/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-08-27 · 主语言 PowerShell · 未检测到 DSH 插件清单
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
- No DSH plugin manifest detected - it may only carry the dsh-plugin topic, so the install method must be confirmed on the spot未检测到 DSH 插件清单:可能只是打了 dsh-plugin 话题,安装方式要现场确认
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:nvnoa57-star/dsh-compaction-slider
把 nvnoa57-star/dsh-compaction-slider 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-compaction-slider
DSH(DeepSeek Harness)上下文压缩阈值滑块插件 —— 在 web 输入栏的上下文使用量圆环旁提供实时滑块,拖动即可调整当前会话的自动压缩触发比例(thresholdRatio,范围 0.4 ~ 1.0,默认 80%)。
- 按会话独立:每个会话有自己独立的阈值,切换会话、重启 dsh 均保留
- 即时生效:调整后下一个 step 边界生效,无需改配置、无需重启
- 零侵入:不修改任何 node_modules 内部文件
功能特性
- 实时滑块:消息输入栏 ContextMeter 圆环(发送键左侧)旁新增「压缩 XX%」chip,点击弹出 0.4~1.0 滑动条
- 按会话持久化:阈值随会话日志保存,切换会话/重启都不丢;每个会话默认 80%,互不影响
- 也支持命令行:聊天里直接输入
/threshold 0.65等效设置 - 完整压缩链路:复用官方
compaction-basic的总结/保留尾部/工具结果裁剪/溢出恢复逻辑,只替换触发比例来源 - 上下文占用同步显示:弹窗内同时展示当前
~已用 / 容量 - 一键安装/卸载:
install.ps1自动完成全部接线,带备份与幂等保护
前置要求
| 项目 | 要求 |
|---|---|
| Node.js | ≥ 22.19(LTS) |
| dsh | @deepseek-ai/dsh 0.1.1-rc.2(同版本安装:npm install -g @deepseek-ai/dsh) |
| 系统 | Windows PowerShell 5.1+(其他平台可手动安装,见下文) |
| 已运行过 | 至少启动过一次 dsh web(自动初始化 profile) |
快速开始(推荐)
git clone https://github.com/nvnoa57-star/dsh-compaction-slider.git
cd dsh-compaction-slider
./install.ps1
脚本自动完成:安装插件包 → 注册 profile 插件行 → 安装 auto-compact 预设 → 设为默认预设。每次修改前自动备份到 $DSH_HOME/install-backups/<时间戳>/。
安装完成后重启 dsh web,新开会话即可看到滑块。
若提示执行策略限制,先执行:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
常用参数:
./install.ps1 # 安装(幂等,可重复执行)
./install.ps1 -Force # 预设已存在时覆盖
./install.ps1 -NoDefault # 不修改默认预设(需自己在 UI 选择 auto-compact)
./install.ps1 -Uninstall # 卸载(-Force 同时删除预设)
手动安装(不用脚本时)
- 安装插件包:把
dsh-compaction-ui、dsh-compaction-live两个目录放入$DSH_HOME\profiles\node_modules\@my-scope\(可拷贝或建 junction) - 注册插件行:在
$DSH_HOME\profiles\web\cordis.patch.yml追加:- insert: - id: compaction-settings name: '@my-scope/dsh-compaction-ui' - 安装预设:把
presets\auto-compact复制到$DSH_HOME\.agent-presets\auto-compact - 设为默认:在
$DSH_HOME\settings.yaml添加:agent-presets: default: auto-compact - 重启
dsh web
无需修改任何 node_modules 内部文件。
使用说明
滑块在哪
打开 web 页面进入任意会话,消息输入栏 发送按钮左侧、ContextMeter 圆环(上下文占用环形指示器)旁边,有一个「压缩 XX%」的小 chip:
- 点击 chip → 弹出面板
- 面板内含 0.4 ~ 1.0 的滑动条(步长 0.05)、当前触发比例、上下文占用
~已用/容量 - 拖动松手即保存(拖动中有 250ms 防抖,保存时显示「保存中…」;失败会显示红色错误)
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ZSeven-W/dsh-openpencil
joeseesun/qiaomu-rss-dsh
LAU-MARS/dsh-cad
penguin-oo/dsh-bookmarks
tylina/dsh-tylina
SherUnlocked-4869/dsh-plugin-msg-nav