rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:lakejason0/dsh-sidebar-collapse
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
2026-11-12 归档。 DSH 0.2.2 起,侧栏的「全局面板按钮条」与工作区列表已放进同一个滚动容器:向下滚动侧栏,按钮条会自然滚出视野,不再需要这个插件。
As of DSH 0.2.2 the panel strip and the workspace list share one scroll container, so scrolling the sidebar moves the buttons out of view natively. This plugin is no longer needed and no longer maintained.
已知限制:本插件在 DSH 0.2.2+ 上不会显示折叠按钮(面板行结构改为 div.panelEntry 包裹,旧的「≥5 个按钮」阈值选择器失效)。需要旧行为请使用 DSH ≤ 0.2.1 与 npm 上的 v0.1.1。
给 DeepSeek Harness 侧边栏的「全局面板按钮条」加一个折叠开关。 A fold switch for the global plugin-button strip in the DeepSeek Harness sidebar.
| 展开(默认)/ Expanded | 按下折叠按钮后 / Folded |
|---|---|
![]() |
![]() |
DSH 的左侧栏从上到下是:品牌行 → 新会话 → 全局面板按钮条(插件、任务看板、技能中心……)→ 工作区/会话列表 → 底部。按钮条里每一行由各个插件注册,占 36px 且不会被压缩——插件装得越多,工作区和会话列表就被挤得越扁,而且按钮条本身不能折叠也不能滚动。
这个插件只做一件事:在「工作区」标题右侧、搜索图标的左边放一个折叠按钮。点一下,整条插件按钮收起,工作区列表拿到整列高度;再点一下恢复。
localStorage(键名 dsh-sidebar-collapse:collapsed),刷新或重启后保持。任选其一:
dsh-sidebar-collapse;也可以让 DSH 代理执行 plugin_manager 的 install_bundle,target 填 dsh-sidebar-collapse。dsh CLI 已在 PATH 中):dsh plugin --profile <你的 profile 名> add dsh-sidebar-collapse。卸载:插件页里禁用/卸载,或用 plugin_manager 的 remove_bundle(target 填 dsh-sidebar-collapse)。
在 DSH 0.2.1-rc.3(Electron 44 / Chromium ~144)上开发并验证。实现依赖宿主的两处内部命名:
| 依赖 | 用途 |
|---|---|
nav 上的 …_panelList 类名子串 |
判断折叠范围与「5 个按钮」阈值 |
工作区标题行搜索槽的 …_searchSlot 类名子串 |
定位锚点(测量回退也用它) |
如果未来 DSH 改了这些名字,最坏表现是「按钮出现在错误位置或不出现」,不会破坏侧栏,也不会影响其他插件。届时改 client.js 顶部的常量即可(FOLD_THRESHOLD、BUTTON_SIZE、GUTTER、ANCHOR_SELECTOR)。
控件注册在宿主的 sidebar.footer.action 座位里,但用 position: absolute 脱离 footer 的行流;接着把标题行的搜索槽命名为锚点(anchor-name: --dsh-ws-search),用 anchor() 把按钮放到它左边 32px。这样控件视觉上属于标题行的按钮组,却不占任何布局。
若所在引擎解析不了锚点,组件会退化为测量定位:用 getBoundingClientRect() 量出锚点位置,改用内联 position: fixed 钉在同一处(此时按钮带 data-dsh-collapse-measured 标记),并在 ResizeObserver、窗口尺寸变化和每次折叠后重新测量。
折叠本身是纯 CSS:html:has([data-dsh-sidebar-collapse][aria-expanded="false"]) … 把按钮条的每个子元素设为 display: none。没有任何 DOM 写在组件之外,样式表也是组件自己的 React 元素,卸载即消失。
The DSH sidebar is one fixed-height column: brand row → New Session → global plugin-button strip → workspace/session list → footer. Every plugin that registers a panel adds a 36px row to that strip, and the strip never shrinks or scrolls — so the more plugins you install, the less room the workspace and session list get.
This plugin does exactly one thing: it puts a fold button in the workspace header, immediately left of the search icon. Press it and the whole plugin-button strip collapses, giving the column to the workspace list; press it again to bring the buttons back.
localStorage (dsh-sidebar-collapse:collapsed) across reloads.Either:
dsh-sidebar-collapse; or let the agent call plugin_manager install_bundle with target: dsh-sidebar-collapse.dsh CLI on PATH): dsh plugin --profile <your profile> add dsh-sidebar-collapse.Uninstall from the Plugins page, or plugin_manager remove_bundle with target: dsh-sidebar-collapse.
Developed and verified against DSH 0.2.1-rc.3 (Electron 44 / Chromium ~144). It relies on two internal host names: the …_panelList class substring on the strip's <nav> (fold scope and the five-button threshold), and the …_searchSlot class substring of the workspace header's search area (positioning anchor, also used by the measured fallback). If a future release renames them, the worst case is a misplaced or missing button — never a broken sidebar; update the constants at the top of client.js.
The control is registered in the host's sidebar.footer.action seat, then taken out of flow with position: absolute; the header's search area is named as a CSS anchor (anchor-name: --dsh-ws-search) and anchor() places the button 32px to its left. When the engine cannot resolve the anchor, the component measures the anchor with getBoundingClientRect() and pins itself with inline position: fixed offsets instead (marked by data-dsh-collapse-measured), re-measuring on ResizeObserver, window resize and each fold.
The fold itself is pure CSS: html:has([data-dsh-sidebar-collapse][aria-expanded="false"]) … sets every child of the strip to display: none. Nothing is written outside the component tree, and the stylesheet is a React element that disappears with it.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。