Skip to main content
N

dsh-archive-fold

nuscior/dsh-archive-fold

Keeps each workspace's archived conversations in an Archived fold at the end of that workspace's section, instead of mixing them into the normal session list.

Install

dsh plugin --profile web add github:nuscior/dsh-archive-fold

README

dsh-archive-fold · 归档对话折叠

DeepSeek Harness 插件:把每个工作区里被归档的会话收进该工作区自己的折叠行,不再混进正常会话列表,也不再跨工作区堆到别处。

默认形态里,归档会话仍然内联在各自的工作区分组里。这个插件给每个工作区分组末尾加一行 已归档 N,把内联的归档行收进去,同一段会话在侧边栏只出现一次。

行为

  • 位置:每个工作区分组最下方一行 已归档 N,只列这个工作区的归档会话;未分组的归档会话也归在自己的分组下。
  • 展开 / 收起:点这一行展开或收起,每个工作区各记各的状态,存在本机浏览器(localStorage),刷新后保持。
  • 不重复:视图切到「全部对话(显示归档)」时,原生的灰色归档行会被隐藏,归档会话只在折叠行里出现一次。
  • 取消归档:展开后每行右侧常驻一个「取消归档」按钮,点击后该行消失、计数减一,会话回到工作区的正常列表。
  • 仅归档视图:视图切到「仅归档」时折叠行自动让位,交给原生列表,避免两边重复。

限制

  • 侧边栏的会话列表没有可插入分组的插槽,所以折叠行是追加到每个工作区分组元素末尾、并用 MutationObserver 跟着列表重渲染保持位置的。只创建、移动、移除自己的节点,宿主渲染的行不动。
  • 只在「按工作区分组」「工作区树」这两种视图下有效;「单列表」视图没有工作区分组,不显示折叠行。
  • 工作区收起、或该工作区一条可见会话都没有时,折叠行不出现。
  • 不支持在侧边栏直接点开归档会话(DSH 自身会立刻清掉归档主视图,这条链路不可靠)。
  • 依赖宿主侧边栏的 data-row-key / data-sidebar-scrollport 标记,DSH 大版本改这层结构后可能需要跟进。

安装

需要 DSH 0.2.2-rc.1 及以上。

  • 插件市场:在 插件 → 插件市场 里搜索 dsh-archive-fold。

  • 手动:

    dsh plugin --profile <profile> add github:nuscior/dsh-archive-fold
    

装完在 插件 → 已安装 里确认出现「归档对话折叠」,开新会话生效。移除插件时注入的样式、折叠行和观察器会一并清理,侧边栏恢复原样。

实现

index.js 是空的宿主半边;全部逻辑在 client.js。注入 localStorage 记住的展开状态,向侧边栏追加自己的分组行,并对每个工作区分组建立观察。

License

MIT,见 LICENSE。


English

Keeps each workspace's archived conversations in an Archived N fold row at the end of that workspace's section, so they stop mixing into the normal session list and stop piling up across workspaces.

  • Fold rows are appended to each workspace section and kept in place with a MutationObserver; only the plugin's own nodes are created, moved or removed.
  • Works in the "group by workspace" and "workspace tree" sidebar views; the flat list view has no workspace sections, so nothing is added there.
  • Expansion state is per workspace and stored in localStorage. Unarchiving from a row calls uiWorkspace.unarchiveSession.
  • Client-only bundle: no Node dependencies, no build step, no network access.
  • Verified on DSH 0.2.2-rc.5; engines.dsh is >=0.2.2-rc.1.

Install from the plugin market or with dsh plugin --profile <profile> add github:nuscior/dsh-archive-fold.

Related plugins