dsh-archived-chats 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,24 @@
4
4
 
5
5
  Entries describe behavior at each release, not necessarily current behavior. Consult the READMEs and user guides for current usage.
6
6
 
7
+ ## 2.0.2 — 2026-11-12
8
+
9
+ ### 中文
10
+
11
+ - 支持 DeepSeek Harness `0.2.2-rc.2`:宿主兼容声明增加 `0.2.2-rc.2`,开发依赖同步到 `0.2.2-rc.2`;旧宿主仍可直接升级。
12
+ - 菜单与成功提示改走宿主原生组件:操作菜单使用宿主 Menu,成功提示优先使用宿主 Toast;旧版宿主没有 Toast 时自动使用插件原来的提示框。菜单、提示框不再用插件自己的定位样式。
13
+ - 成功提示的外观随宿主走:宿主 Toast 没有手动关闭按钮,悬停不会暂停 4 秒计时,位置为窗口顶部居中;时长仍为 4 秒加 1 秒淡出。
14
+ - 用户指南补充说明:在 DSH ≥ 0.2.2-rc.2 上,归档会话会删除 DSH 为该会话创建的 Git 工作树检出目录(分支与提交保留)。
15
+ - 插件功能与数据处理不变。
16
+
17
+ ### English
18
+
19
+ - Support DeepSeek Harness `0.2.2-rc.2`: the Host compatibility declaration adds `0.2.2-rc.2` and the development dependency moves to `0.2.2-rc.2`; older Hosts can still update directly.
20
+ - Menus and success notices now use the Host's native components: action menus use the Host Menu and success notices prefer the Host Toast, falling back to the plugin's own toast on older Hosts without it. Menus and notices no longer use the plugin's own positioning styles.
21
+ - Success notices follow the Host Toast appearance: no manual dismiss button, hovering does not pause the 4-second timer, and the position is top-center of the window; the duration is still 4 seconds plus a 1-second fade.
22
+ - The user guide now notes that on DSH ≥ 0.2.2-rc.2, archiving a session removes the checkout directory of a Git worktree DSH itself created for that session (the branch and its commits are preserved).
23
+ - Plugin features and data handling are unchanged.
24
+
7
25
  ## 2.0.1 — 2026-11-10
8
26
 
9
27
  ### 中文
package/README.md CHANGED
@@ -35,7 +35,7 @@ Archive Management adds conversation search, organization and backups to DeepSee
35
35
  - **Portable backups:** export and import JSON + Markdown ZIPs; imports preview before writing and skip existing IDs to avoid overwrites.
36
36
  - **Conversation lineage:** read-only Origins & Branches view traces sources, forks and subagent relationships across all workspaces, including archived and unarchived chats.
37
37
 
38
- > This document describes version 2.0.1. Previous recovery features are removed, with explicit retries for permanent-deletion tasks.
38
+ > This document describes version 2.0.2. Previous recovery features are removed, with explicit retries for permanent-deletion tasks.
39
39
 
40
40
  ## Install and open
41
41
 
package/README.zh-CN.md CHANGED
@@ -33,7 +33,7 @@
33
33
  - **可迁移备份:** 导出和导入 JSON + Markdown ZIP;导入前预览,跳过已有 ID,不覆盖现有数据。
34
34
  - **会话溯源:** 只读的「来源与分支」视图查看所有工作区中已归档、未归档会话的来源、分叉和子代理关系。
35
35
 
36
- > 本文描述 2.0.1,旧恢复功能已移除,永久删除支持任务重试。
36
+ > 本文描述 2.0.2,旧恢复功能已移除,永久删除支持任务重试。
37
37
 
38
38
  ## 安装与打开
39
39
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  English · [中文](ARCHITECTURE.md) · [User guide](USER_GUIDE.md)
4
4
 
5
- This document describes the interfaces and behavior of version 2.0.1. Native integration tests cover DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. Runtime code is the authority for interfaces and behavior; user-facing documentation should agree with it.
5
+ This document describes the interfaces and behavior of version 2.0.2. Native integration tests cover DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. Runtime code is the authority for interfaces and behavior; user-facing documentation should agree with it.
6
6
 
7
7
  The client capability-detects public UI primitives. `HostModal` uses the official headless Modal for complex business content. Ordinary `ConfirmDialog` uses its heading, description and footer. `ControlButton` and `ControlInput` forward refs, disabled state and editing events. Older Hosts retain HTML fallbacks. Native controls use separate styling classes so legacy button CSS cannot override their sizing, colors or hover states. Menus retain filter placement and scrolling constraints; preview content stays within the outer modal bounds. Native modals own focus layering, with document-level legacy traps registered only in compatibility mode. Plugin-owned portals belong to the archive interaction so clicks inside a dialog cannot prematurely release settings protection.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](ARCHITECTURE.en.md) · 中文 · [用户指南](USER_GUIDE.zh-CN.md)
4
4
 
5
- 本文描述 2.0.1 的接口与行为;原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
5
+ 本文描述 2.0.2 的接口与行为;原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md)。运行时代码是接口与行为的依据;用户操作说明与本文应保持一致。
6
6
 
7
7
  客户端通过能力探测复用公开 UI primitives。`HostModal` 为复杂业务内容使用官方无头 Modal,普通 `ConfirmDialog` 直接使用 Modal 的标题、说明及 footer;`ControlButton` 与 `ControlInput` 透传 ref、禁用状态和编辑事件。旧 Host 保留 HTML 兼容入口。原生按钮使用独立样式类,避免旧按钮 CSS 覆盖官方尺寸、颜色和悬停。菜单保留筛选定位与滚动约束,预览内容限制在外层弹窗边界内。原生弹窗拥有焦点层,旧文档级焦点陷阱仅在兼容模式注册。带插件归属标记的 portal 计入归档交互范围,避免设置保护被弹窗内点击提前解除。
8
8
 
@@ -4,7 +4,7 @@ Current source removes the previous recovery UI and keeps explicit permanent-del
4
4
 
5
5
  English · [简体中文](USER_GUIDE.zh-CN.md) · [Back to README](../README.md)
6
6
 
7
- Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes version 2.0.1, with native integration coverage for DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
7
+ Archive Management provides a place to browse and manage DSH's archived chats, plus workspace bulk archiving. This document describes version 2.0.2, with native integration coverage for DSH `0.1.7-rc.2`, `0.2.1-rc.2`, `0.2.1-rc.5` and `0.2.2-rc.1`. See the [changelog](../CHANGELOG.md) for release history. For interfaces and data formats, see the [architecture](ARCHITECTURE.en.md).
8
8
 
9
9
  Archive Management prefers the Host’s public Modal, Button, Input, menu, Tooltip, and icon components. Search fields follow the built-in plugin inventory’s 36px height, search icon, and focus styles. Ordinary text fields use the public Input. Confirmations use the official heading, description, and action areas. Complex preview and import content use the official modal frame. Older Hosts without these exports use compatible controls. Page headings, descriptions, secondary list text, and focus states follow the official settings typography and theme variables.
10
10
 
@@ -113,6 +113,8 @@ Deletion requires explicit confirmation and is irreversible after completion. Ar
113
113
  - Transitive subagent descendants are included through recorded parent relationships, even across workspace or archive-state boundaries. Ordinary forks are included only when selected themselves.
114
114
  - Workspace directories, project code, Git repositories and worktrees, global shared attachments and caches outside session directories, exported ZIPs, and other independent backups are retained. Files inside a target session directory are removed with that directory.
115
115
 
116
+ > **Archiving is not deletion:** on DSH ≥ 0.2.2-rc.2, archiving a session removes the checkout directory of a Git worktree that DSH itself created for that session (the branch and its commits are preserved); worktrees you created yourself outside session directories are unaffected. To keep the local directory, configure the Host to retain worktrees on archive.
117
+
116
118
  To keep content, export the target chats and any subagents you need before deletion. Archive unarchived chats first to make them available for export. Plugin ZIPs exclude attachment binaries and do not automatically include descendant chats. Back up attachments separately.
117
119
 
118
120
  Every target must be idle. Execution rechecks identities, archive state, workspace membership, and scope. Changed scope requires fresh confirmation. Retries preserve the stored identities and confirmed scope. Historical selected-only tasks retain their original scope.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](USER_GUIDE.md) · 简体中文 · [返回 README](../README.zh-CN.md)
4
4
 
5
- 归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 2.0.1 的行为(包含未归档正文搜索),原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md),接口和数据格式见[架构说明](ARCHITECTURE.md)。
5
+ 归档管理为 DSH 已归档聊天提供查看和管理页面,并扩展按工作区批量归档。本文描述 2.0.2 的行为(包含未归档正文搜索),原生集成测试覆盖 DSH `0.1.7-rc.2`、`0.2.1-rc.2`、`0.2.1-rc.5` 和 `0.2.2-rc.1`。版本变更见[更新日志](../CHANGELOG.md),接口和数据格式见[架构说明](ARCHITECTURE.md)。
6
6
 
7
7
  归档管理优先复用宿主公开的 Modal、Button、Input、菜单、Tooltip 和图标组件。搜索框采用内置插件页面的 36px 高度、搜索图标和焦点样式,普通文本输入使用公开 Input。确认弹窗的标题、正文和操作区使用官方组件,复杂预览和导入内容使用官方弹窗框架;缺少相应导出的旧 Host 使用兼容样式。页面标题、说明、列表次要文字和焦点状态采用官方设置页的文字层级与主题变量。
8
8
 
@@ -113,6 +113,8 @@ dsh plugin --profile web add -w dsh-archived-chats@latest
113
113
  - 子智能体后代按真实父子关系递归纳入,可能具有不同的工作区或归档状态。普通分叉仅在自身被选中时纳入。
114
114
  - 工作区目录、项目代码、Git 仓库与工作树、会话目录之外的全局共享附件和缓存、另行导出的 ZIP 及其他独立备份均保留。会话目录内的文件随目录一起删除。
115
115
 
116
+ > **归档不是删除:** 在 DSH ≥ 0.2.2-rc.2 上,归档会话会删除 DSH 为该会话创建的 Git 工作树检出目录(分支与提交保留);会话目录之外由你自己创建的工作树不受影响。如需保留本地目录,请在 Host 中配置归档时保留工作树。
117
+
116
118
  删除前如需保留内容,请先导出目标会话及需要保留的子智能体;未归档会话需先归档再导出。插件 ZIP 不包含附件二进制,也不会自动打包后代会话,附件需另行备份。
117
119
 
118
120
  全部目标必须空闲。确认后会重新核对身份、归档状态、工作区及删除范围;范围变化时要求重新确认。失败重试沿用持久保存的会话身份和确认范围,历史仅删选中项的任务保留原范围。
package/lib/client.js CHANGED
@@ -1135,12 +1135,6 @@ window.__ModuleLoader__.load({
1135
1135
  .dac-toolbar-more>summary.dac-iconbtn{width:22px;height:22px;padding:0}
1136
1136
  .dac-action-trigger.dac-danger{color:var(--dsw-alias-state-error-primary)}
1137
1137
  .dac-action-trigger:disabled{opacity:.45;cursor:default}
1138
- .dac-action-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:60;min-width:190px;display:flex;flex-direction:column;gap:2px;padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);box-shadow:var(--dsw-shadow-lv3)}
1139
- .dac-action-menu-item{display:flex;align-items:center;width:100%;border:none;border-radius:var(--dsw-radius-md);background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:20px;text-align:left;padding:7px 10px;white-space:nowrap;cursor:pointer}
1140
- .dac-action-menu-item:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.12))}
1141
- .dac-action-menu-item:disabled{opacity:.45;cursor:default}
1142
- .dac-action-menu-item.dac-danger{color:var(--dsw-alias-state-error-primary)}
1143
- .dac-action-menu-item.dac-danger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger)}
1144
1138
  /* Shared radii follow Host settings cards (xl), inputs/controls (md), and menu surfaces (lg). */
1145
1139
  .dac-search{box-sizing:border-box;position:relative;width:100%;display:flex;align-items:center;color:var(--dsw-alias-label-tertiary)}
1146
1140
  .dac-search>svg{position:absolute;left:12px;pointer-events:none}
@@ -1454,7 +1448,7 @@ window.__ModuleLoader__.load({
1454
1448
  .dac-action-confirm button:not(.dac-native-control):focus-visible,.dac-workspace-actions>button:not(.dac-native-control):focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}
1455
1449
  .dac-workspace-body ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:4px;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
1456
1450
  .dac-workspace-result-group{display:flex;flex-direction:column;gap:5px;border-top:1px solid var(--dsw-alias-border-l2);padding-top:10px}
1457
- @media (max-width:640px){[role="dialog"][data-dac-section-active="1"]>nav{display:none}[role="dialog"][data-dac-section-active="1"]>nav+div{width:100%;min-width:0}.dac-head{align-items:flex-start;flex-wrap:wrap}.dac-action-trigger{padding:5px 9px}.dac-action-menu{left:0;right:auto;max-width:calc(100vw - 32px)}.dac-action-wrap:last-child .dac-action-menu{left:auto;right:0}.dac-row{align-items:flex-start;flex-wrap:wrap}.dac-row-actions{gap:4px;flex-wrap:wrap}.dac-unarchive{padding:4px 10px}.dac-summary{gap:6px}.dac-row-meta{gap:4px}.dac-preview-dialog{width:calc(100vw - 20px);height:calc(100vh - 20px)}.dac-preview-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.dac-preview-feed{padding:10px}.dac-preview-rail{flex-direction:row;overflow-x:auto;border-right:none;border-bottom:1px solid var(--dsw-alias-border-l2);padding:8px 5px}.dac-preview-rail button:not(.dac-native-control){flex:none}}
1451
+ @media (max-width:640px){[role="dialog"][data-dac-section-active="1"]>nav{display:none}[role="dialog"][data-dac-section-active="1"]>nav+div{width:100%;min-width:0}.dac-head{align-items:flex-start;flex-wrap:wrap}.dac-action-trigger{padding:5px 9px}.dac-row{align-items:flex-start;flex-wrap:wrap}.dac-row-actions{gap:4px;flex-wrap:wrap}.dac-unarchive{padding:4px 10px}.dac-summary{gap:6px}.dac-row-meta{gap:4px}.dac-preview-dialog{width:calc(100vw - 20px);height:calc(100vh - 20px)}.dac-preview-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.dac-preview-feed{padding:10px}.dac-preview-rail{flex-direction:row;overflow-x:auto;border-right:none;border-bottom:1px solid var(--dsw-alias-border-l2);padding:8px 5px}.dac-preview-rail button:not(.dac-native-control){flex:none}}
1458
1452
  @media (max-width:640px){.dac-lineage-card-head{gap:8px}.dac-lineage-workspace-toggle small{font-size:11px}}
1459
1453
  .dac-lineage-canvas{position:relative;min-width:0;overflow:hidden;border:1px solid var(--dsw-alias-border-l2,#e4e5e8);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-bg-layer-1,#fff);--dac-lineage-accent:var(--dsw-alias-state-business-primary,#4b78e8)}
1460
1454
  .dac-lineage-list-title{display:flex;align-items:center;gap:8px;min-width:0}
@@ -4713,11 +4707,34 @@ window.__ModuleLoader__.load({
4713
4707
  * nowhere to appear, and the action would look like it did nothing.
4714
4708
  */
4715
4709
  function NoticeBanner({ t, notice, interaction, top, onDismiss, onViewArchived }) {
4710
+ // A new notice object restarts the Host Toast lifetime: the Host
4711
+ // Toast only restarts when remounted, so key it by a per-notice
4712
+ // sequence. (Render-phase ref update, the same pattern
4713
+ // `useSuccessNoticeTimer` uses for its latest values.)
4714
+ const noticeSequenceRef = _react.useRef(0);
4715
+ const lastNoticeRef = _react.useRef(null);
4716
+ if (lastNoticeRef.current !== notice) {
4717
+ lastNoticeRef.current = notice;
4718
+ noticeSequenceRef.current += 1;
4719
+ }
4716
4720
  if (notice === null) return null;
4717
4721
  if (notice.source === "archive") return (0, jsx.jsx)(NativeArchiveNotice, { notice, t, onViewArchived, onDismiss });
4718
4722
  const view = notice.action === "view-archived";
4719
4723
  const dismiss = (0, jsx.jsx)("button", { type: "button", "aria-label": t("notice.dismiss"), onClick: onDismiss, children: (0, jsx.jsx)(IconClose, {}) });
4720
4724
  if (notice.kind === "ok") {
4725
+ // Success feedback follows the Host Toast when the Host
4726
+ // provides it — its body portal keeps the banner clear of
4727
+ // clipping ancestors, and its positioning is the Host's.
4728
+ // Older Hosts keep the plugin's own fixed toast below.
4729
+ const Toast = previewPrimitives.Toast;
4730
+ if (Toast !== null) return (0, jsx.jsx)(Toast, {
4731
+ key: noticeSequenceRef.current,
4732
+ text: notice.text,
4733
+ tone: "success",
4734
+ holdMs: 4000,
4735
+ actions: view ? [{ label: t("archive.viewArchived"), onClick: onViewArchived }] : undefined,
4736
+ onDone: onDismiss,
4737
+ });
4721
4738
  return (0, jsx.jsxs)("div", {
4722
4739
  className: "dac-toast",
4723
4740
  ...interaction,
@@ -4966,7 +4983,7 @@ window.__ModuleLoader__.load({
4966
4983
  return markArchiveDialog(pageRef.current);
4967
4984
  }, [sessions, loadError]);
4968
4985
 
4969
- const noticeInteraction = useSuccessNoticeTimer(notice, notice?.kind === "ok" && notice.source !== "archive", () => setNotice((current) => current === notice ? null : current));
4986
+ const noticeInteraction = useSuccessNoticeTimer(notice, notice?.kind === "ok" && notice.source !== "archive" && previewPrimitives.Toast === null, () => setNotice((current) => current === notice ? null : current));
4970
4987
  const changePageMode = (mode) => {
4971
4988
  if (mode !== pageMode) setNotice(null);
4972
4989
  if (mode !== "archived") { setSelectionMode(false); setSelectedIds(new Set()); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-archived-chats",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "查看、搜索和管理会话归档,支持工作区批量归档、标签备注、ZIP 备份和会话谱系。",
5
5
  "license": "MIT",
6
6
  "author": "Ultronen",
@@ -76,7 +76,7 @@
76
76
  ],
77
77
  "dsh": {
78
78
  "engines": {
79
- "dsh": ">=0.1.0-rc.7 || 0.2.2-rc.1"
79
+ "dsh": ">=0.1.0-rc.7 || 0.2.2-rc.1 || 0.2.2-rc.2"
80
80
  },
81
81
  "bundle": {
82
82
  "patch": "./cordis.patch.yml"
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "peerDependencies": {
93
93
  "@deepseek-ai/cordis": "^4.0.1",
94
- "@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.1-rc.1 <0.1.2-0 || >=0.1.2-alpha.1 <0.2.0-0 || 0.1.5-rc.2 || 0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5 || 0.2.2-rc.1",
94
+ "@deepseek-ai/dsh-session": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.1-rc.1 <0.1.2-0 || >=0.1.2-alpha.1 <0.2.0-0 || 0.1.5-rc.2 || 0.1.7-rc.2 || 0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2",
95
95
  "react": "^18.2.0"
96
96
  },
97
97
  "peerDependenciesMeta": {
@@ -103,7 +103,7 @@
103
103
  "fflate": "^0.8.3"
104
104
  },
105
105
  "devDependencies": {
106
- "@deepseek-ai/dsh-session": "0.2.2-rc.1",
106
+ "@deepseek-ai/dsh-session": "0.2.2-rc.2",
107
107
  "typescript": "^5.9.3"
108
108
  },
109
109
  "overrides": {