DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

homes-mark /

homes-mark/dsh-fold-workspace-sessions

Verified

DSH plugin: one sidebar button folds or unfolds every workspace's conversations in a single click. 一键折叠工作区对话的 DeepSeek Harness 插件

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@9f6b9ab1

折叠工作区对话 / Fold workspace conversations

English summary · 适用 DeepSeek Harness (DSH) 0.2.2-rc.2 核验

在 DSH 侧栏底部新增一个按钮:一键折叠所有工作区分组下的对话,让侧栏只剩工作区标题行;全部折叠后按钮自动切换为「展开全部分组」,再点一次即可恢复。折叠的是原生会话列表的分组视图,不改动、不归档任何会话数据。

折叠前                        折叠后(一键)
├ 工作区 A                    ├ 工作区 A
│  ├ 对话 1                   ├ 工作区 B
│  └ 对话 2                   └ 工作区 C
├ 工作区 B
│  ├ 对话 3
│  └ 对话 4
└ 工作区 C

安装(导入到 DSH 插件)

方式一:在 DSH 界面输入仓库地址(推荐)

  1. 打开 DeepSeek Harness 的 Plugins(插件) 页面,选择 Add plugin(添加插件)。

  2. 输入本仓库地址后安装:

    https://github.com/homes-mark/dsh-fold-workspace-sessions
    
  3. 安装完成后启用行 “折叠工作区对话 / Fold workspace conversations”。

  4. 刷新或重启 DSH 后生效。

不需要预先下载或 clone。本插件为纯 JavaScript,无构建脚本、无第三方依赖、无配置项,从 git 地址安装时不会有任何构建行为被触发或请求授权。

方式二:使用本地目录

先克隆仓库:

git clone https://github.com/homes-mark/dsh-fold-workspace-sessions.git

然后同样在 Plugins → Add plugin 中输入本地仓库目录路径;或在命令行安装到指定 profile:

dsh plugin --profile <你的profile> add ./dsh-fold-workspace-sessions

方式三:锁定提交(谨慎用户可选)

想固定到某个已审核的版本时,在地址后加 commit SHA:

dsh plugin --profile <你的profile> add github:homes-mark/dsh-fold-workspace-sessions#<commit-sha>

兼容范围:engines.dsh = >=0.2.0-rc.2 <0.3.0(在 Desktop 0.2.2-rc.2 上实测)。不在该范围的 DSH 版本会在安装时被拒绝,避免装出静默失效的版本。

使用

  1. 侧栏保持展开状态,滚到底部;按钮位于 「设置」行上方,与 Cordis 徽章同一行。
  2. 只要任一工作区展开着对话,按钮显示 双上箭头,提示「折叠全部对话」:点击一次,所有工作区分组(含工作区树形视图的嵌套分组)全部折叠,每组同时重置“展开其余 N 个会话”状态,与手动逐组折叠完全一致。
  3. 全部折叠后,按钮自动变为 双下箭头,提示「展开全部分组」:点击一次,每个工作区恢复到基础会话行数。
  4. 折叠状态由 DSH 原生持久化,重启后保留;也可以随时继续用原生方式单独展开/折叠某个分组,按钮状态自适应。

自动隐藏规则(不会出现死按钮):

  • 会话列表为平铺模式、或正在搜索时——没有分组可折叠,按钮隐藏;
  • 侧栏收起(56px 窄栏)时列表不可见,按钮隐藏。

实现原理与边界

DSH 未把“工作区分组展开状态”暴露为任何服务、Hook 或插槽;该状态在浏览器分组列表插件的私有 store 中。本插件因此不直接改状态,而是通过无障碍语义锚点(data-row-key="workspace:…" 行与 aria-expanded 属性)点击原生分组标题行,复用其官方 onClick 处理器。收益:

  • 持久化、动画、Show more 水位重置全部走原生行为;
  • 不修改 DSH 安装文件、不触碰任何业务数据;
  • 禁用或卸载插件即彻底消失,无残留样式与状态。

防抖与安全:每趟点击按 data-row-key 去重(同一行绝不会反转两次)、逐级多趟驱动(树形嵌套展开后新出现的子分组也能到达)、驱动期间忽略重复点击、任何 DOM 异常都被捕获并降级为无操作。升级边界:若未来 DSH 版本更名或移除这些语义属性,按钮会安全退化为“点了没反应”,插件本身不会造成任何错误折叠。

FAQ

点了没反应? 先确认会话列表处于“按工作区/工作区树”分组模式(列表标题右侧的调节菜单)。平铺模式与搜索结果中没有分组行,按钮会自动隐藏,不应出现可点状态。

和手动折叠有什么区别? 没有行为区别,等价于把每个分组都手动折叠一次;只是省去逐组点击。

为什么展开后不是我展开前的行数? 展开操作只恢复每个工作区的基础行数(与 DSH 原生水位机制一致);折叠时重置的“展开其余 N 个会话”不会自动复原,需要时在需要的分组里点“展开其余 N 个”即可。

禁用后需要做什么? 无需清理,按钮与全部行为立即消失;折叠状态保留为 DSH 原生分组状态。

卸载

在 Plugins 页面卸载本插件(或 dsh plugin --profile <name> remove dsh-fold-workspace-sessions),再刷新页面即可。

License

MIT © homes-mark


English summary

A DeepSeek Harness plugin: one button in the sidebar foot (above Settings) that folds every workspace group's conversations in a single click so only group headers remain; when everything is folded it flips to expand all groups back to their base rows. Fold state persists natively across restarts. Pure-JavaScript client plugin — no build, no dependencies, no configuration.

Install: in DSH open Plugins → Add plugin and enter this repository URL, then enable it; or dsh plugin --profile <name> add github:homes-mark/dsh-fold-workspace-sessions. Compatible with DSH >=0.2.0-rc.2 <0.3.0. It drives the shipped list controls through their accessibility anchors (data-row-key / aria-expanded), so persistence and animations stay native, and it degrades to a no-op (never mis-folds) if a future DSH renames those anchors. See the Chinese sections above for details, FAQ, and uninstall.

—/ 5

No ratings yet

Verified DSH bundle

Commit 9f6b9ab15b8e

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout