dsh-archived-chats 1.5.3 → 1.6.0
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 +30 -0
- package/README.md +66 -88
- package/README.zh-CN.md +66 -88
- package/assets/screenshots/preview-01.png +0 -0
- package/assets/screenshots/preview-02.png +0 -0
- package/assets/screenshots/preview-03.png +0 -0
- package/assets/screenshots/preview-04.png +0 -0
- package/assets/screenshots/preview-05.png +0 -0
- package/assets/screenshots/preview-06.png +0 -0
- package/assets/screenshots/preview-07.png +0 -0
- package/assets/screenshots/preview-08.png +0 -0
- package/docs/ARCHITECTURE.en.md +36 -31
- package/docs/ARCHITECTURE.md +38 -33
- package/docs/USER_GUIDE.md +95 -59
- package/docs/USER_GUIDE.zh-CN.md +93 -59
- package/lib/about.js +135 -3
- package/lib/client.js +1242 -873
- package/lib/index.js +221 -160
- package/lib/lineage.js +20 -2
- package/lib/recycle.js +85 -3
- package/lib/search.js +35 -6
- package/lib/session-filters.js +22 -0
- package/lib/snapshot.js +1 -1
- package/lib/types/index.d.ts +16 -2
- package/lib/workspace-bulk-archive.js +69 -24
- package/package.json +3 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,36 @@
|
|
|
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
|
+
## 1.6.0 — 2026-10-22
|
|
8
|
+
|
|
9
|
+
### 中文
|
|
10
|
+
|
|
11
|
+
- 兼容只有旧待删除标记、没有回收记录的会话:读取回收站时补齐待重试入口,不自动删除,也不撤销已提交的永久删除意图。
|
|
12
|
+
- 修复旧回收记录恢复时将同一工作区的路径别名误判为 ID 冲突的问题;只有真实路径相同才允许恢复,不同或无法验证的路径仍拒绝。
|
|
13
|
+
- 收拢归档管理入口:停止新增移入回收站,移除「空间与策略」。停止自动到期清理与启动快照清扫,保留旧回收记录、快照和策略文件;旧客户端的新增回收及策略请求返回 410。
|
|
14
|
+
- 有旧回收记录时保留恢复、导出保护快照及确认永久删除;空回收站隐藏,读取异常时保留错误入口。未完成删除必须明确重试。保护快照 ZIP 包含会话与图片,单条上限 64 MiB,不能通过普通会话备份导入器导入。
|
|
15
|
+
- 统一已归档、未归档和来源与分支的搜索、筛选、工作区折叠及操作布局;未归档只提供归档操作。已归档和未归档默认按官方首页的「最近更新」逻辑排序,支持未分组和定时任务筛选。
|
|
16
|
+
- 全文搜索按筛选后的候选分批执行,展示进度并支持停止、重试;不再只展示前 100 个匹配。点击摘要定位命中消息,自动展开包含工具或推理内容的折叠轮次。
|
|
17
|
+
- 修复永久删除归档时官方侧栏短暂重新显示会话的问题:确认文件删除后通知客户端移除,在归档状态下清理工作区成员关系,失败保留可重试任务。单条预览只读取所选聊天,待删除会话不再参与预览或标题读取。
|
|
18
|
+
- 关于页提供手动残留会话检查、失败重试、预览、备份及确认删除;进入页面不自动扫描。新增定时、页面恢复和联网后的更新检查,失败 15 分钟后重试。
|
|
19
|
+
- 更新弹窗提供当前宿主对应的命令、安装信息复制和本地开发版保护;宿主允许时安装已展示的精确版本,完成后明确提示重启,不自动重启 DSH。
|
|
20
|
+
- 同步中英文 README、用户指南、架构文档及八张界面截图。
|
|
21
|
+
- 已知宿主限制:DSH 0.2.1-rc.2 在首次配置未完成时,归档当前会话可能触发引导并关闭设置弹窗。已向官方反馈 [#10596](https://github.com/deepseek-ai/deepseek-harness/discussions/10596),本版不包含宿主修复。
|
|
22
|
+
|
|
23
|
+
### English
|
|
24
|
+
|
|
25
|
+
- Keep legacy pending-only deletions visible for explicit retry by recording them when the Recycle Bin is read, without automatically deleting data or reversing committed deletion intent.
|
|
26
|
+
- Fix legacy recovery rejecting aliases of the same workspace directory as ID conflicts. Allow differing path strings only when both resolve to the same directory; retain rejection for different or unverifiable paths.
|
|
27
|
+
- Simplify archive management: retire new Recycle Bin moves and Storage & Policy navigation. Disable automatic expiry and startup snapshot sweeping while retaining legacy records, snapshots and saved policies. Stale recycle/policy mutation requests return 410.
|
|
28
|
+
- Keep recovery, protection-snapshot export and confirmed permanent deletion for legacy records. Hide an empty bin and retain its error view when the catalog cannot be read. Incomplete deletions require explicit retry. Protection-snapshot ZIPs include session data and images, are limited to 64 MiB per record, and cannot be imported by the ordinary conversation-backup importer.
|
|
29
|
+
- Align search, filters, workspace folding and actions across Archived, Unarchived and Origin & Branches. Unarchived offers archive actions only. The two chat lists default to the official home page's Recently updated ordering and support Ungrouped and Scheduled tasks filters.
|
|
30
|
+
- Search all filtered candidates in batches with progress, stop and retry controls instead of showing only the first 100 matches. Open matching messages from result snippets and expand folded turns containing tool or reasoning matches.
|
|
31
|
+
- Prevent permanently deleted archived chats from briefly reappearing in the official sidebar: notify clients after file removal, detach workspace membership while still archived, and retain retryable tasks on cleanup failure. Preview only the selected chat and exclude pending deletions before preview or title reads.
|
|
32
|
+
- Add manual residual-chat checks, retry, preview, backup and confirmed deletion to About; opening the page never starts a scan. Check for updates periodically, after visibility/network recovery, and retry failures after 15 minutes.
|
|
33
|
+
- Provide host-specific update commands, copyable installation information and local-checkout protection. Where supported by the official plugin manager, install the exact reviewed version and report restart requirements without restarting DSH automatically.
|
|
34
|
+
- Update both READMEs, user guides, architecture documents and all eight interface screenshots.
|
|
35
|
+
- Known Host limitation: in DSH 0.2.1-rc.2, archiving the current chat while initial setup is incomplete can trigger onboarding and close Settings. Reported upstream in [#10596](https://github.com/deepseek-ai/deepseek-harness/discussions/10596); this release does not include a Host fix.
|
|
36
|
+
|
|
7
37
|
## 1.5.3 — 2026-10-21
|
|
8
38
|
|
|
9
39
|
### 中文
|
package/README.md
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
<h1>Archive Management</h1>
|
|
10
10
|
|
|
11
|
-
<p><strong>
|
|
11
|
+
<p><strong>Find past DSH chats, manage archives, and keep ZIP backups.</strong></p>
|
|
12
12
|
<p><code>dsh-archived-chats</code></p>
|
|
13
13
|
|
|
14
14
|
<p>
|
|
15
15
|
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-archived-chats?style=flat-square"></a>
|
|
16
|
-
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm downloads" src="https://img.shields.io/npm/
|
|
16
|
+
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm total downloads" src="https://img.shields.io/npm/dt/dsh-archived-chats?style=flat-square&label=total%20downloads"></a>
|
|
17
17
|
<a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Ultronen/dsh-archived-chats/ci.yml?branch=main&style=flat-square&label=CI"></a>
|
|
18
18
|
<a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="Node.js 18 and 24" src="https://img.shields.io/badge/Node.js-18%20%7C%2024-339933?style=flat-square&logo=nodedotjs&logoColor=white"></a>
|
|
19
19
|
</p>
|
|
@@ -28,130 +28,110 @@
|
|
|
28
28
|
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
|
-
Archive Management
|
|
31
|
+
Archive Management adds conversation search, organization and backups to DeepSeek Harness. Find a past solution, preview its context, archive by workspace, or save a ZIP before deleting a chat.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
- **Find past work:** search titles, messages, tool results, tags and notes; open a match with surrounding context.
|
|
34
|
+
- **Organize chats:** manage Archived and Unarchived, including workspace groups, ungrouped chats, bulk actions, tags and notes.
|
|
35
|
+
- **Keep a backup:** export JSON + Markdown ZIPs; preview imports and skip existing IDs instead of overwriting them.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
> This document describes 1.6.0. New recycle operations and automatic cleanup are retired; see [upgrading](#upgrading-from-older-releases) for existing data.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
## Install and open
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Find `dsh-archived-chats` in the DSH plugin market, verify author **Ultronen**, and install. Follow the host's restart prompt, then open **Settings → Archive Management** (Chinese: **设置 → 归档管理**).
|
|
42
|
+
|
|
43
|
+
Alternatively, use the CLI. `web` is an example profile; replace it with your running DSH profile and use the same profile for updates and removal:
|
|
42
44
|
|
|
43
45
|
```sh
|
|
44
46
|
dsh plugin --profile web add dsh-archived-chats@latest
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Before updating an older installation, read “Upgrading from older releases” below. To update:
|
|
49
|
+
If installation reports `ERR_PNPM_ADDING_TO_ROOT`, add `-w` after `add`. To update:
|
|
50
50
|
|
|
51
51
|
```sh
|
|
52
52
|
dsh plugin --profile web update dsh-archived-chats
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
##
|
|
56
|
-
|
|
57
|
-
| Area | Current behavior |
|
|
58
|
-
| --- | --- |
|
|
59
|
-
| Browse and search | Workspace-grouped archived chats, full-text search, filters, sorting, tags, and notes. |
|
|
60
|
-
| Workspace archiving | Unarchived offers individual, workspace-wide, and global archiving with aggregate confirmation; blank, active, or unreadable chats are skipped. |
|
|
61
|
-
| Read-only preview | Conversations, reasoning, tool activity, Markdown, JSON, code, and readable stored images without unarchiving. |
|
|
62
|
-
| Backup | Export one workspace or the entire archive as JSON + Markdown ZIP; preview imports and skip conflicting IDs. |
|
|
63
|
-
| Recycle Bin | Move archived chats by workspace or selection; restore one chat, a workspace, or the entire Recycle Bin back to Archived. |
|
|
64
|
-
| Permanent deletion | Delete one archived chat, a workspace's archive, or all archived chats after confirmation. Recycle Bin deletion is separate. |
|
|
65
|
-
| Residual chat check | Entering Storage & Retention automatically checks for subagents whose parent no longer exists; search, select, preview, back up and confirm permanent deletion of selected records only. Empty chats are excluded. |
|
|
66
|
-
| Storage and relationships | Storage accounting, optional automatic Recycle Bin cleanup, and read-only Origins & Branches. |
|
|
67
|
-
|
|
68
|
-
The six views are **Archived**, **Unarchived**, **Recycle Bin**, **Storage & Retention**, **Origins & Branches**, and **About**. Unarchived shares Archived’s search, filters, and workspace-group layout, offering read-only chat previews and individual, workspace-wide, and global archiving. Archiving does not create historical versions; Recycle Bin protection snapshots support recovery, not a browsable version-history library.
|
|
69
|
-
|
|
70
|
-
## Screenshots
|
|
55
|
+
## First task
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
3. [Unarchived and workspace archiving](assets/screenshots/preview-03.png)
|
|
77
|
-
4. [Read-only preview](assets/screenshots/preview-04.png)
|
|
78
|
-
5. [Recycle Bin](assets/screenshots/preview-05.png)
|
|
79
|
-
6. [Restore confirmation](assets/screenshots/preview-06.png)
|
|
80
|
-
7. [Storage & Retention](assets/screenshots/preview-07.png)
|
|
81
|
-
8. [Origins & Branches](assets/screenshots/preview-08.png)
|
|
57
|
+
1. Open **Unarchived**, click a chat title to preview it, then archive the chat you want to keep. Blank new chats are excluded; running chats require explicit **Stop and archive** confirmation.
|
|
58
|
+
2. Search **Archived**, open a title or matching snippet, and edit tags and notes from the preview.
|
|
59
|
+
3. Choose **Select**, check chats, and choose **Export selected**; narrow layouts place this action in the three-dot menu. Verify the ZIP in browser downloads.
|
|
60
|
+
4. **Unarchive** to continue chatting. Before deleting, decide whether to keep a backup: deletion is permanent and cannot be undone.
|
|
82
61
|
|
|
83
|
-
|
|
62
|
+
## Pages and capabilities
|
|
84
63
|
|
|
85
|
-
|
|
64
|
+
| Page | Purpose |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| Archived | Search, filter, preview, tags and notes, import/export, unarchive and confirmed permanent deletion. |
|
|
67
|
+
| Unarchived | Ordinary workspace and ungrouped chats, preview, individual/workspace/global archiving. |
|
|
68
|
+
| Origins & Branches | Read-only sources, forks and subagents related to archived chats. |
|
|
69
|
+
| About | Automatic update checks, host and local-checkout detection, copyable installation details, host-supported updates, and manual residual-chat checks. |
|
|
70
|
+
| Recycle Bin, when records exist | Recover legacy records to Archived, export protection snapshots, or confirm permanent deletion; hidden when empty. |
|
|
86
71
|
|
|
87
|
-
|
|
72
|
+
Content search starts at two characters and scans the selected scope in batches, showing progress, matches and failures; it supports Stop and Retry. Unarchived searches titles or session IDs. See the [user guide](docs/USER_GUIDE.md) for scope, long-log limits and detailed operations.
|
|
88
73
|
|
|
89
|
-
## Archive,
|
|
74
|
+
## Archive, delete and maintain
|
|
90
75
|
|
|
91
|
-
|
|
92
|
-
- **Move to Recycle Bin:** available through workspace menus, header More → Move all to Recycle Bin, or More in selection mode. Recovery returns the chat to Archived; Unarchive then returns it to the main chat area.
|
|
93
|
-
- **Delete all on Archived:** permanently delete archived chats across all workspaces, not existing Recycle Bin entries.
|
|
94
|
-
- **Empty Recycle Bin:** permanently delete recycled chats and their associated protection data.
|
|
76
|
+
**Archive organizes; Delete permanently removes.** Archive and unarchive use official Host operations. Row deletion, selected deletion, workspace Delete all and global Delete all require confirmation. Workspace deletion never deletes project directories. Search and filters do not narrow workspace or global bulk actions.
|
|
95
77
|
|
|
96
|
-
|
|
78
|
+
**Residual checks are manual maintenance.** Open **About → Maintenance → Check residual chats** to inspect subagents with an explicit parent reference whose parent no longer exists. Preview or export first, then select and confirm permanent deletion; eligibility is rechecked at execution. Ungrouped chats, independent forks, ordinary unarchived chats and blank chats are excluded. Opening the page never scans or cleans automatically.
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
## Backups and data boundaries
|
|
99
81
|
|
|
100
|
-
|
|
82
|
+
| Format | Contents | Use |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| Conversation backup ZIP | JSON, Markdown, tags, notes and attachment references; no attachment bytes or automatic descendant bundling. | Preview with Import backup, then restore; existing IDs are skipped. |
|
|
85
|
+
| Legacy protection-snapshot ZIP | Legacy record, validated session payload and image attachments; 64 MiB per record. | Preserve legacy data; not accepted by the ordinary conversation importer. |
|
|
101
86
|
|
|
102
|
-
|
|
103
|
-
- **Recovery before purge:** workspace Recycle Bin moves require a healthy protection snapshot. Direct permanent deletion does not create a recoverable copy.
|
|
104
|
-
- **No overwrite:** imports skip existing IDs. Recycle recovery prefers the original; snapshot fallback recreates an ordinary session ID only through an explicitly exclusive Host writer and otherwise retains the recovery record.
|
|
105
|
-
- **Durable deletion:** confirmed deletion tasks clean related snapshots before the original. Partial failures retain non-restorable tasks for retries while running or after restart.
|
|
106
|
-
- **Automatic Recycle Bin cleanup is off by default:** enabling or shortening retention requires confirmation. It applies to expired recycled chats, not ordinary archived chats.
|
|
107
|
-
- **ZIP is not an attachment-complete backup:** attachment references remain, but attachment bytes and automatic descendant-session bundling are excluded.
|
|
87
|
+
Successful exports are validated against the same format and budgets as import before the download starts. This applies to ordinary conversation backups; protection snapshots use a separate format. A download-started notice does not confirm the file was saved; check browser downloads.
|
|
108
88
|
|
|
109
|
-
|
|
89
|
+
- Data stays on the DSH host under `$DSH_HOME/plugin-data/archived-chats/`, defaulting to `~/.dsh/`. The plugin does not upload or cloud-sync chats.
|
|
90
|
+
- Permanent deletion removes session and related plugin data, not all global Host attachments, caches or external backups. Failures retain retryable tasks.
|
|
91
|
+
- A chat without a working directory remains in Archived; a missing workspace alone allows an ungrouped chat.
|
|
92
|
+
- Empty Recycle Bin uses the exact recycle-record incarnations shown at confirmation; changed targets do not expand the deletion scope.
|
|
110
93
|
|
|
111
94
|
## Upgrading from older releases
|
|
112
95
|
|
|
113
|
-
|
|
96
|
+
Version 1.6.0 disables new Move to Recycle Bin actions, removes Storage & Retention navigation, and stops automatic expiry and startup snapshot sweeping.
|
|
114
97
|
|
|
115
|
-
|
|
98
|
+
**Removing navigation does not migrate or delete existing data.** Legacy recycle records, snapshots and saved policies remain. Records keep the Recycle Bin visible; catalog read errors retain a retry view instead of being mistaken for an empty bin. Saved cleanup policies do not run, and incomplete permanent deletions require explicit retry.
|
|
116
99
|
|
|
117
|
-
|
|
100
|
+
Recovery prefers an intact original and returns it to Archived. Missing-original snapshot recovery depends on Host capabilities; unsupported or invalid recovery keeps the record and reports failure. Export a protection snapshot to preserve data first. Never treat manually deleting plugin data as emptying the Recycle Bin.
|
|
118
101
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
If old snapshot content is still needed, recover/export it using a supporting older version before updating, preserve required attachments separately, or make an offline backup of the full plugin-data directory. Before downgrading, finish pending deletion tasks and back up data; older releases may not understand snapshotless pending-deletion records.
|
|
102
|
+
Installing an older release can restore its earlier cleanup rules. Before downgrading, keep a full data backup and check pending tasks and format compatibility.
|
|
122
103
|
|
|
123
104
|
## Compatibility
|
|
124
105
|
|
|
125
|
-
The
|
|
106
|
+
The declared range is DSH `>=0.1.0-rc.7`; features still depend on Host capabilities. Native tests use pinned `0.1.7-rc.2` and `0.2.1-rc.2` backends; release CI covers macOS, Windows and Linux.
|
|
126
107
|
|
|
127
|
-
|
|
128
|
-
| --- | --- |
|
|
129
|
-
| Public archive API | Required for workspace bulk archiving; unsupported requests make no changes. |
|
|
130
|
-
| Session and attachment reads | Used by preview/search; unavailable attachment reads degrade images only. |
|
|
131
|
-
| Session-scoped physical location | Required for session-directory accounting and permanent deletion; shared directories are never used as purge targets. |
|
|
132
|
-
| Public writer | Required for ZIP import and snapshot fallback; restoring an intact original does not rewrite its log. Plain legacy create/append is not enough for safe ZIP restore unless the provider explicitly guarantees exclusive creation. |
|
|
133
|
-
| Modern handles | Fork titles, preview/search, and Recycle Bin moves are supported. ZIP v2 preserves inherited boundaries; import uses create/append/flush/close and a safe session-scoped rollback location. Ordinary v1 ZIPs remain readable, but ambiguous seeded v1 sources are refused rather than flattened. |
|
|
134
|
-
| Host module resolution | DSH `0.1.6-alpha.2` added a resolution layer that fails on any dependency requesting a builtin name with a trailing slash. Before 1.4.2 this package reached `readable-stream@4` through `zip-stream`, so the plugin aborted Host startup as soon as it loaded. 1.4.2 uses `fflate` for export and no longer carries that chain; update before running on those Host versions. |
|
|
108
|
+
Archive, unarchive and inventory use official capabilities. Permanent deletion coordinates Host session lifecycle and storage locations rather than calling one unified public deletion API. ZIP import and legacy snapshot recovery also have different writer requirements. See [compatibility and limits](docs/USER_GUIDE.md#compatibility-and-limits).
|
|
135
109
|
|
|
136
|
-
|
|
110
|
+
## Screenshots
|
|
137
111
|
|
|
138
|
-
|
|
112
|
+
These 1.6.0 screenshots use synthetic example chats. The legacy Recycle Bin appears only when records exist; [screenshots.json](screenshots.json) owns the order.
|
|
139
113
|
|
|
140
|
-
|
|
114
|
+
<details>
|
|
115
|
+
<summary>View screenshots</summary>
|
|
141
116
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
117
|
+
1. [Archived chats](assets/screenshots/preview-01.png)
|
|
118
|
+
2. [Full-text search and selected actions](assets/screenshots/preview-02.png)
|
|
119
|
+
3. [Unarchived and workspace archiving](assets/screenshots/preview-03.png)
|
|
120
|
+
4. [Conversation preview](assets/screenshots/preview-04.png)
|
|
121
|
+
5. [Legacy Recycle Bin](assets/screenshots/preview-05.png)
|
|
122
|
+
6. [Restore confirmation](assets/screenshots/preview-06.png)
|
|
123
|
+
7. [About and manual maintenance](assets/screenshots/preview-07.png)
|
|
124
|
+
8. [Origins & Branches](assets/screenshots/preview-08.png)
|
|
125
|
+
|
|
126
|
+
</details>
|
|
147
127
|
|
|
148
|
-
|
|
128
|
+
## Documentation and feedback
|
|
149
129
|
|
|
150
|
-
|
|
130
|
+
[User guide](docs/USER_GUIDE.md) · [Architecture](docs/ARCHITECTURE.en.md) · [Changelog](CHANGELOG.md) · [Support](SUPPORT.md) · [Contributing](CONTRIBUTING.md)
|
|
151
131
|
|
|
152
|
-
|
|
132
|
+
Use [Discussions](https://github.com/Ultronen/dsh-archived-chats/discussions) for questions and suggestions. Bug reports should include plugin and DSH versions, minimal reproduction steps and redacted errors. Report security issues [privately](SECURITY.md). If this helped you find past work, consider [giving the project a Star](https://github.com/Ultronen/dsh-archived-chats).
|
|
153
133
|
|
|
154
|
-
## Development
|
|
134
|
+
## Development and validation
|
|
155
135
|
|
|
156
136
|
```sh
|
|
157
137
|
npm test
|
|
@@ -162,7 +142,7 @@ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host
|
|
|
162
142
|
npm pack --dry-run --json
|
|
163
143
|
```
|
|
164
144
|
|
|
165
|
-
|
|
145
|
+
Native checks use isolated temporary data; all eight tests in each fixture must run without skips. Read the [contribution guide](CONTRIBUTING.md) in full before contributing.
|
|
166
146
|
|
|
167
147
|
## Uninstall
|
|
168
148
|
|
|
@@ -170,8 +150,6 @@ The suite covers Host and browser behavior, export/import, snapshot fallback rec
|
|
|
170
150
|
dsh plugin --profile web remove dsh-archived-chats
|
|
171
151
|
```
|
|
172
152
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
## License
|
|
153
|
+
Removing the package preserves plugin data and does not permanently purge chats. See [local data and uninstall](docs/USER_GUIDE.md#local-data-and-uninstall).
|
|
176
154
|
|
|
177
|
-
[MIT](LICENSE)
|
|
155
|
+
[MIT License](LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
<h1>归档管理</h1>
|
|
8
8
|
|
|
9
|
-
<p><strong
|
|
9
|
+
<p><strong>找回 DSH 历史对话,搜索、管理归档并保存 ZIP 备份。</strong></p>
|
|
10
10
|
<p><code>dsh-archived-chats</code></p>
|
|
11
11
|
|
|
12
12
|
<p>
|
|
13
13
|
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-archived-chats?style=flat-square"></a>
|
|
14
|
-
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm
|
|
14
|
+
<a href="https://www.npmjs.com/package/dsh-archived-chats"><img alt="npm 累计下载量" src="https://img.shields.io/npm/dt/dsh-archived-chats?style=flat-square&label=total%20downloads"></a>
|
|
15
15
|
<a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/Ultronen/dsh-archived-chats/ci.yml?branch=main&style=flat-square&label=CI"></a>
|
|
16
16
|
<a href="https://github.com/Ultronen/dsh-archived-chats/actions/workflows/ci.yml"><img alt="Node.js 18 and 24" src="https://img.shields.io/badge/Node.js-18%20%7C%2024-339933?style=flat-square&logo=nodedotjs&logoColor=white"></a>
|
|
17
17
|
</p>
|
|
@@ -26,130 +26,110 @@
|
|
|
26
26
|
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
归档管理为 DeepSeek Harness
|
|
29
|
+
归档管理为 DeepSeek Harness 补充会话查找、整理和备份能力。搜索过去的解决方案,直接预览内容,按工作区归档,或在删除前保存一份 ZIP 备份。
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
- **找回内容:** 搜索标题、正文、工具结果、标签和备注,点击命中片段查看上下文。
|
|
32
|
+
- **整理会话:** 管理已归档和未归档聊天,支持工作区分组、未分组、批量操作及标签备注。
|
|
33
|
+
- **保存备份:** 导出 JSON + Markdown ZIP,导入前预览并跳过已有会话,避免覆盖。
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
> 本文对应 1.6.0。此版本停止新增回收和自动清理,旧数据的处理方式见[从旧版升级](#从旧版升级)。
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## 安装与打开
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
在 DSH 插件市场搜索 `dsh-archived-chats`,核对作者 **Ultronen** 后安装。按宿主提示重启,打开 **设置 → 归档管理**(英文为 Archive Management)。
|
|
40
|
+
|
|
41
|
+
也可使用命令行。`web` 是示例 profile,请替换为实际运行 DSH 的 profile,更新和卸载也使用同一个:
|
|
40
42
|
|
|
41
43
|
```sh
|
|
42
44
|
dsh plugin --profile web add dsh-archived-chats@latest
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
旧版用户请先阅读下方「从旧版升级」,再执行更新:
|
|
47
|
+
若提示 `ERR_PNPM_ADDING_TO_ROOT`,在 `add` 后加 `-w`。更新命令:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
50
|
dsh plugin --profile web update dsh-archived-chats
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
| 范围 | 当前行为 |
|
|
56
|
-
| --- | --- |
|
|
57
|
-
| 浏览与搜索 | 按工作区浏览归档聊天,支持全文搜索、筛选、排序、标签与备注。 |
|
|
58
|
-
| 工作区批量归档 | 未归档视图支持单条、工作区和全局归档,汇总确认后执行;跳过空白、正在使用或无法确认内容的聊天。 |
|
|
59
|
-
| 只读预览 | 无需取消归档即可查看对话、思考、工具活动、Markdown、JSON、代码及可读取的已存储图片。 |
|
|
60
|
-
| 备份 | 支持按工作区或全部归档导出 JSON + Markdown ZIP;导入先预览,跳过冲突 ID。 |
|
|
61
|
-
| 回收站 | 按工作区或勾选聊天移入回收站;支持单条、工作区和整个回收站恢复到已归档。 |
|
|
62
|
-
| 永久删除 | 确认后删除单条归档、工作区归档或全部归档;回收站删除独立操作。 |
|
|
63
|
-
| 残留会话检查 | 进入空间与策略时自动检查父会话已不存在的子代理,支持明细搜索、多选、预览、备份及确认后永久删除;只删除选中项,不清理空会话。 |
|
|
64
|
-
| 空间与关系 | 空间分账、可选的回收站自动清理,以及只读「来源与分支」。 |
|
|
65
|
-
|
|
66
|
-
六个视图为 **已归档**、**未归档**、**回收站**、**空间与策略**、**来源与分支** 和 **关于**。未归档复用已归档的搜索、筛选和工作区分组排版,提供只读预览、单条归档、工作区全部归档和全局全部归档。归档不会创建历史版本;回收站保护快照仅用于恢复,不是可浏览的历史版本库。
|
|
53
|
+
## 第一次使用
|
|
67
54
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
1. [已归档聊天](assets/screenshots/preview-01.png)
|
|
73
|
-
2. [全文搜索与选择操作](assets/screenshots/preview-02.png)
|
|
74
|
-
3. [未归档与工作区归档](assets/screenshots/preview-03.png)
|
|
75
|
-
4. [只读预览](assets/screenshots/preview-04.png)
|
|
76
|
-
5. [回收站](assets/screenshots/preview-05.png)
|
|
77
|
-
6. [恢复确认](assets/screenshots/preview-06.png)
|
|
78
|
-
7. [空间与策略](assets/screenshots/preview-07.png)
|
|
79
|
-
8. [来源与分支](assets/screenshots/preview-08.png)
|
|
55
|
+
1. 打开 **未归档**,点击聊天标题预览,选择需要保留的聊天并归档。空白新聊天不列入可归档范围;正在执行的聊天需要先确认「停止并归档」。
|
|
56
|
+
2. 在 **已归档** 搜索关键词,点击标题或命中片段查看内容;在预览中编辑标签和备注。
|
|
57
|
+
3. 点击 **选择**,勾选聊天后 **导出选中**;窄屏下该操作位于三点菜单。到浏览器下载中确认 ZIP 已保存。
|
|
58
|
+
4. 需要继续聊天时 **取消归档**。删除会话前先确认备份是否需要保留;删除为不可撤销的永久删除。
|
|
80
59
|
|
|
81
|
-
|
|
60
|
+
## 页面与能力
|
|
82
61
|
|
|
83
|
-
|
|
62
|
+
| 页面 | 用途 |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| 已归档 | 搜索、筛选、预览、标签备注、导入导出、取消归档和确认永久删除。 |
|
|
65
|
+
| 未归档 | 获取工作区及未分组中的普通聊天,预览并按单条、工作区或全局归档。 |
|
|
66
|
+
| 来源与分支 | 查看与已归档聊天相关的来源、分叉和子代理关系;只读,不改变会话。 |
|
|
67
|
+
| 关于 | 自动检查更新、运行环境与本地开发版识别、复制安装信息、宿主支持时一键更新,以及手动「检查残留会话」。 |
|
|
68
|
+
| 回收站(有旧记录时) | 处理旧记录:恢复到已归档、导出保护快照或确认永久删除;空目录隐藏。 |
|
|
84
69
|
|
|
85
|
-
|
|
70
|
+
正文搜索从两个字符开始,分批扫描当前筛选范围,展示进度、命中和失败数量;支持停止和重试。未归档搜索标题或会话 ID。完整范围、长日志限制及操作说明见[用户指南](docs/USER_GUIDE.zh-CN.md)。
|
|
86
71
|
|
|
87
|
-
##
|
|
72
|
+
## 归档、删除与维护
|
|
88
73
|
|
|
89
|
-
|
|
90
|
-
- **移入回收站:** 通过工作区菜单、顶部「更多 → 全部移入回收站」或选择模式的「更多」操作。恢复先回到已归档,再取消归档返回主页面。
|
|
91
|
-
- **归档页「全部删除」:** 永久删除所有工作区的已归档聊天,不影响已经在回收站中的聊天。
|
|
92
|
-
- **「清空回收站」:** 永久删除回收聊天及其关联保护数据。
|
|
74
|
+
**归档用于整理,删除用于永久移除。** 归档和取消归档使用 Host 的官方操作。行内垃圾桶、选中删除、工作区全部删除和全局全部删除均需确认;工作区删除不会删除项目目录。搜索和筛选不会缩小工作区或全局操作范围。
|
|
93
75
|
|
|
94
|
-
|
|
76
|
+
**残留检查是手动维护工具。** 从 **关于 → 维护工具 → 检查残留会话** 打开,仅检查有明确父来源且父会话已不存在的子代理会话。可先预览或导出,再勾选确认永久删除;执行时重新核对范围。未分组、独立分叉、普通未归档和空白聊天不作为该工具的清理目标。进入页面不会自动扫描或清理。
|
|
95
77
|
|
|
96
|
-
|
|
78
|
+
## 备份与数据边界
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
| 格式 | 内容 | 使用方式 |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| 会话备份 ZIP | JSON、Markdown、标签备注及附件引用;不包含附件文件,不自动打包后代会话。 | 通过「导入备份」预览后导入;已有 ID 跳过。 |
|
|
83
|
+
| 旧回收保护快照 ZIP | 旧记录、已验证的会话载荷及图片附件;单条上限 64 MiB。 | 用于保存旧数据,不能通过普通会话导入器导入。 |
|
|
99
84
|
|
|
100
|
-
|
|
101
|
-
- **回收有保护,永久删除不可恢复:** 工作区移入回收站需要健康保护快照;直接永久删除不创建可恢复副本。
|
|
102
|
-
- **不覆盖已有聊天:** 导入跳过已有 ID;回收恢复优先使用原会话,原件缺失时只能通过 Host 明确的独占写入器重建普通会话 ID,否则保留回收记录。
|
|
103
|
-
- **删除可以续作:** 确认后的任务先清理关联快照,再删除原会话;失败保留不可恢复的任务,在运行期间或重启后重试。
|
|
104
|
-
- **回收站自动清理默认关闭:** 开启或缩短期限需确认,只处理到期回收聊天,不自动删除普通归档聊天。
|
|
105
|
-
- **ZIP 不等于完整附件备份:** 保留附件引用,但不包含附件字节,也不自动打包后代会话。
|
|
85
|
+
导出成功前会按导入使用的同一格式和预算完成验证。此保证针对普通会话备份;保护快照是独立格式。浏览器提示开始下载不代表文件已保存,需自行核对下载结果。
|
|
106
86
|
|
|
107
|
-
|
|
87
|
+
- 数据保存在运行 DSH 的主机 `$DSH_HOME/plugin-data/archived-chats/`,默认位于 `~/.dsh/`;插件不上传或云同步聊天。
|
|
88
|
+
- 永久删除清理会话及插件关联数据,不承诺擦除 Host 全局附件、缓存或外部备份。失败保留可重试任务。
|
|
89
|
+
- 没有工作目录的聊天会留在已归档;仅缺少工作区时可显示为未分组。
|
|
90
|
+
- 旧回收站清空仅处理确认时展示的精确回收记录实例;目标变化时拒绝扩大删除范围。
|
|
108
91
|
|
|
109
92
|
## 从旧版升级
|
|
110
93
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
独立「历史版本」和「预览清理」界面已移除,不应再按旧版截图寻找这些入口。
|
|
94
|
+
1.6.0 不再提供新增「移入回收站」,移除「空间与策略」入口,并停用自动到期清理和启动快照清扫。
|
|
114
95
|
|
|
115
|
-
|
|
96
|
+
**已有数据不会因为移除入口而自动迁移或删除。** 旧回收记录、快照和策略文件保留。只要存在回收记录,仍显示回收站;目录读取失败时保留错误与重试入口,不能当作空目录隐藏。旧策略不执行,未完成的永久删除需明确重试。
|
|
116
97
|
|
|
117
|
-
|
|
98
|
+
恢复优先使用仍完好的原会话,成功后回到已归档。原会话丢失时,快照回退依赖 Host 能力;不支持或校验失败会保留记录并报错,不伪报成功。可先导出保护快照保存数据。不要通过手动删除插件数据目录来清空回收站。
|
|
118
99
|
|
|
119
|
-
|
|
100
|
+
重新安装旧版本可能重新启用其原有清理规则;降级前应保留完整数据备份,并确认待删除任务和数据格式兼容。
|
|
120
101
|
|
|
121
102
|
## 兼容性
|
|
122
103
|
|
|
123
|
-
|
|
104
|
+
声明范围为 DSH `>=0.1.0-rc.7`,具体能力仍取决于 Host。原生测试使用锁定的 `0.1.7-rc.2` 与 `0.2.1-rc.2` 后端,发布 CI 覆盖 macOS、Windows 和 Linux。
|
|
124
105
|
|
|
125
|
-
|
|
126
|
-
| --- | --- |
|
|
127
|
-
| 公开归档 API | 工作区批量归档必需;不支持时拒绝执行,不作修改。 |
|
|
128
|
-
| 会话与附件读取 | 用于预览/搜索;缺少附件读取时只降级图片。 |
|
|
129
|
-
| 会话独占物理位置 | 会话目录统计和永久删除必需;不把共享目录当作删除目标。 |
|
|
130
|
-
| 公开 writer | ZIP 导入和快照回退恢复必需;恢复完好的原会话不重写日志。仅有旧 create/append 不足以安全恢复 ZIP,除非提供者明确保证独占创建。 |
|
|
131
|
-
| 新版句柄接口 | 分叉支持标题、预览/搜索及移入回收站。ZIP v2 保存继承边界;导入通过 create/append/flush/close 写入,并要求安全的会话独占回滚位置。普通 v1 ZIP 仍可读取,但边界不明的 seeded v1 来源会被拒绝,不会展平。 |
|
|
132
|
-
| Host 模块解析 | DSH `0.1.6-alpha.2` 新增的解析层会在任何依赖请求带斜杠的内置模块名时失败。1.4.2 之前,本插件经 `zip-stream` 引入 `readable-stream@4`,因此插件一被加载就会中止 Host 启动。1.4.2 的导出改用 `fflate`,不再携带该依赖链;请在这些 Host 版本上先升级。 |
|
|
106
|
+
归档、取消归档、列表读取以官方能力为基础。永久删除由插件协调会话生命周期和存储位置完成,并非调用一个官方统一删除接口;ZIP 导入和旧快照恢复的写入能力要求也不同。详见[兼容性与限制](docs/USER_GUIDE.zh-CN.md#兼容性与限制)。
|
|
133
107
|
|
|
134
|
-
|
|
108
|
+
## 界面截图
|
|
135
109
|
|
|
136
|
-
|
|
110
|
+
以下截图来自 1.6.0,使用虚构示例会话。旧回收站仅在存在旧记录时显示;[截图清单](screenshots.json)保持以下顺序。
|
|
137
111
|
|
|
138
|
-
|
|
112
|
+
<details>
|
|
113
|
+
<summary>查看界面截图</summary>
|
|
139
114
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
115
|
+
1. [已归档](assets/screenshots/preview-01.png)
|
|
116
|
+
2. [全文搜索与选中操作](assets/screenshots/preview-02.png)
|
|
117
|
+
3. [未归档与工作区归档](assets/screenshots/preview-03.png)
|
|
118
|
+
4. [会话预览](assets/screenshots/preview-04.png)
|
|
119
|
+
5. [旧回收站](assets/screenshots/preview-05.png)
|
|
120
|
+
6. [恢复确认](assets/screenshots/preview-06.png)
|
|
121
|
+
7. [关于与手动维护](assets/screenshots/preview-07.png)
|
|
122
|
+
8. [来源与分支](assets/screenshots/preview-08.png)
|
|
145
123
|
|
|
146
|
-
|
|
124
|
+
</details>
|
|
147
125
|
|
|
148
|
-
##
|
|
126
|
+
## 文档与反馈
|
|
149
127
|
|
|
150
|
-
|
|
128
|
+
[用户指南](docs/USER_GUIDE.zh-CN.md) · [架构说明](docs/ARCHITECTURE.md) · [更新日志](CHANGELOG.md) · [支持](SUPPORT.md) · [贡献指南](CONTRIBUTING.md)
|
|
151
129
|
|
|
152
|
-
|
|
130
|
+
使用问题和建议欢迎前往 [Discussions](https://github.com/Ultronen/dsh-archived-chats/discussions);缺陷请附插件与 DSH 版本、最小复现步骤和脱敏错误。安全问题请[私密报告](SECURITY.md)。若帮助你找回了旧方案,欢迎[给项目一个 Star](https://github.com/Ultronen/dsh-archived-chats)。
|
|
131
|
+
|
|
132
|
+
## 开发与验证
|
|
153
133
|
|
|
154
134
|
```sh
|
|
155
135
|
npm test
|
|
@@ -160,7 +140,7 @@ node scripts/run-native-integration.mjs --fixture-root test/fixtures/native-host
|
|
|
160
140
|
npm pack --dry-run --json
|
|
161
141
|
```
|
|
162
142
|
|
|
163
|
-
|
|
143
|
+
原生测试使用隔离临时数据,每套 8 项均要求执行且不能跳过。提交贡献前请完整阅读[贡献指南](CONTRIBUTING.md)。
|
|
164
144
|
|
|
165
145
|
## 卸载
|
|
166
146
|
|
|
@@ -168,8 +148,6 @@ npm pack --dry-run --json
|
|
|
168
148
|
dsh plugin --profile web remove dsh-archived-chats
|
|
169
149
|
```
|
|
170
150
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
## 许可证
|
|
151
|
+
卸载插件包保留插件数据,不执行永久删除。详见[本地数据与卸载](docs/USER_GUIDE.zh-CN.md#本地数据与卸载)。
|
|
174
152
|
|
|
175
|
-
[MIT](LICENSE)
|
|
153
|
+
[MIT License](LICENSE)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|