@kangyishuai/dsh-session-delete 0.4.0 → 0.4.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/README.md +17 -17
- package/README.zh-CN.md +17 -17
- package/lib/client.js +156 -196
- package/lib/operations.js +33 -55
- package/lib/service.js +12 -13
- package/locale/en.json +5 -8
- package/locale/zh.json +5 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Unofficial plugin for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai). Not affiliated with DeepSeek.
|
|
8
8
|
|
|
9
|
-
> **Status: v0.4, early.** Verified on DSH 0.2.1-rc.5 with `pnpm smoke:session-delete` (24 end-to-end assertions) plus a manual pass in the desktop GUI. Treat it as young software and keep backups of anything you cannot lose.
|
|
9
|
+
> **Status: v0.4.2, early.** Verified on DSH 0.2.1-rc.5 with `pnpm smoke:session-delete` (24 end-to-end assertions) plus a manual pass in the desktop GUI. Treat it as young software and keep backups of anything you cannot lose.
|
|
10
10
|
|
|
11
11
|
## What it does
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ DSH's built-in _archive_ only hides a session: the id goes into the workspace's
|
|
|
16
16
|
- **Trash by default.** The first click erases nothing: the session goes to `~/.dsh/session-trash/` and can be restored. Permanent deletion is a separate, explicit action.
|
|
17
17
|
- **Plan before you delete (dry-run).** The confirmation dialog is generated from a plan: on-disk size, whether the session is live, how many sub-sessions it has, and which references will be cleaned. Right before execution the plan is recomputed and compared with what you confirmed; a mismatch aborts the operation instead of deleting something you didn't see.
|
|
18
18
|
- **Audit log.** Every delete / restore / purge appends one JSON line to `~/.dsh/session-trash/audit.log`, readable from the trash panel.
|
|
19
|
-
- **Receipt after delete.** After the move, the plugin checks the places a session can be referenced and reports anything left behind (
|
|
19
|
+
- **Receipt after delete.** After the move, the plugin checks the places a session can be referenced and reports anything left behind (deletion is one session at a time; the trash tab supports batch restore / batch permanent delete).
|
|
20
20
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
@@ -38,6 +38,8 @@ Restart the DSH desktop app afterwards. A fresh install adds a host half, so rel
|
|
|
38
38
|
|
|
39
39
|
## Usage
|
|
40
40
|
|
|
41
|
+
**Batch (in trash)**: the trash tab supports select-all / clear / batch restore / batch permanent delete; each entry is handled independently and failures are reported inline.
|
|
42
|
+
|
|
41
43
|
**Agent tool**: models can call `session_delete`, but only in two steps — `action=plan` returns the impact summary plus a single-use token (2 minutes), and `action=delete` needs that token. It refuses to delete the calling session, and a changed session invalidates the token. Deleting from the UI never requires the tool.
|
|
42
44
|
|
|
43
45
|
**Keyboard**: Tab between controls, Enter/Space to activate, Esc to close a dialog. In the trash panel, ↑/↓/Home/End move focus between rows. `⌘/Ctrl + Alt + T` opens the trash. There is no one-key delete shortcut — deletion always goes through the menu and a confirmation dialog.
|
|
@@ -79,7 +81,7 @@ Files and directories it touches:
|
|
|
79
81
|
- **Restore is not a full undo.** The log and workspace membership come back; the pin and archive flags do not. DSH clears a pin when it archives a session and doesn't restore it when it unarchives.
|
|
80
82
|
- **Uninstalling the plugin does not empty the trash.** `~/.dsh/session-trash/` is your recovery path and stays until you delete it yourself.
|
|
81
83
|
- **Data root.** Resolved as plugin config `dataRoot` → `DSH_HOME` → `~/.dsh`. If your DSH keeps its data somewhere else, point the plugin at it. If the root doesn't look like a DSH data directory, the plugin refuses instead of guessing.
|
|
82
|
-
- **Alpha software operating on your data.**
|
|
84
|
+
- **Alpha software operating on your data.** It has passed GUI acceptance on the version in the table below, but it is still early software: back up anything you cannot lose.
|
|
83
85
|
|
|
84
86
|
## How this differs from the built-in archive
|
|
85
87
|
|
|
@@ -87,19 +89,23 @@ Archive is a bookmark, not a deletion: DSH adds the session id to the workspace'
|
|
|
87
89
|
|
|
88
90
|
## Compatibility & degradation
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
The package declares no `engines.dsh` range. Instead there are three layers of defense:
|
|
93
|
+
|
|
94
|
+
| Layer | When it runs | What it does | What you see |
|
|
95
|
+
| ------------------------ | -------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
96
|
+
| L1 version gate | install / activation | `engines.dsh` version range. **Not declared**, so this layer is inactive. | nothing |
|
|
97
|
+
| L2 startup self-check | plugin activation | Probes every host capability it depends on. | a capability grade: `api` / `internal` / `minimal` / `unknown` |
|
|
98
|
+
| L3 per-operation refusal | every operation | Each operation re-checks its own prerequisites; unknown always refuses. | structured error code + reason, no half-deleted state |
|
|
91
99
|
|
|
92
|
-
|
|
93
|
-
| --------------------- | -------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
94
|
-
| L1 version gate | install / activation | `engines.dsh` version range. **Not declared in v0.1**, so this layer is currently inactive. | nothing |
|
|
95
|
-
| L2 startup self-check | plugin activation | Probes every host capability it depends on and grades them api / internal / unknown. | **Degraded mode**: a host without `workspaceRegistry` (for example the headless composition) still allows deletion — the archive gate and workspace bookkeeping steps are skipped and reported in the receipt. Only a missing persistence seam puts the plugin in read-only mode. |
|
|
100
|
+
Capability grades:
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
- `api` / `internal` — full operation. `internal` means some steps rely on host contracts that are not in the public docs; they run and are reported.
|
|
103
|
+
- `minimal` — the host has no `workspaceRegistry` (for example the headless composition). Deletion works; the archive gate, pin/workspace bookkeeping and projection-cache steps are skipped and listed in the receipt.
|
|
104
|
+
- `unknown` — the persistence seam itself is missing: **read-only mode**. Plan, audit and trash listing keep working; delete/restore/purge are disabled.
|
|
99
105
|
|
|
100
106
|
| Plugin | Verified on DSH | Notes |
|
|
101
107
|
| ------ | ------------------------ | ------------------------------------------------------------------------------------------- |
|
|
102
|
-
| 0.4.
|
|
108
|
+
| 0.4.2 | **0.2.1-rc.5** (desktop) | `pnpm smoke:session-delete`: 24 assertions green; manual GUI pass on the same host version. |
|
|
103
109
|
|
|
104
110
|
After a DSH upgrade: restart, then open the plugin status (settings → plugins). If it reports read-only mode, the host API changed — upgrade the plugin or report the version pair; don't force it.
|
|
105
111
|
|
|
@@ -114,12 +120,6 @@ After a DSH upgrade: restart, then open the plugin status (settings → plugins)
|
|
|
114
120
|
| Purge left something behind | Residue that the post-delete receipt lists | Read the receipt and the audit log, clean the listed path by hand, and open an issue with the receipt |
|
|
115
121
|
| The trash panel is empty after a delete | The plugin resolved a different data root than your DSH (`DSH_HOME` / config) | Look at `~/.dsh/session-trash/` on disk and check the plugin's `dataRoot` config |
|
|
116
122
|
|
|
117
|
-
## Roadmap (later releases)
|
|
118
|
-
|
|
119
|
-
The following are planned and not implemented yet:
|
|
120
|
-
|
|
121
|
-
- batch deletion (multi-select);
|
|
122
|
-
|
|
123
123
|
## License
|
|
124
124
|
|
|
125
125
|
MIT — see [LICENSE](./LICENSE). The repository's [NOTICE](https://github.com/kangyishuai/dsh-plugins/blob/main/NOTICE) credits the community projects whose _design_ informed this plugin; no code was copied from them.
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
非官方 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai) 插件,与 DeepSeek 无关。
|
|
8
8
|
|
|
9
|
-
> **状态:v0.4,早期可用。** 已在 DSH 0.2.1-rc.5 上用 `pnpm smoke:session-delete`(24 项端到端断言)加一轮桌面版人工验收。仍是年轻软件,重要数据请自行备份。
|
|
9
|
+
> **状态:v0.4.2,早期可用。** 已在 DSH 0.2.1-rc.5 上用 `pnpm smoke:session-delete`(24 项端到端断言)加一轮桌面版人工验收。仍是年轻软件,重要数据请自行备份。
|
|
10
10
|
|
|
11
11
|
## 做什么
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ DSH 自带的「归档」只是把会话藏起来:id 记进工作区的归档
|
|
|
16
16
|
- **默认进回收站。** 第一次点删除不会抹掉任何东西:会话进 `~/.dsh/session-trash/`,随时可恢复。「彻底删除」是另一个独立的显式动作。
|
|
17
17
|
- **删前预演(plan / dry-run)。** 确认框由一份计划生成:占用体积、是否 live、有几个子会话、将清理哪些引用。真正执行前会重新算一遍并与你确认时的计划比对,不一致就中止,避免删掉你没看到的东西。
|
|
18
18
|
- **审计日志。** 每次删除 / 恢复 / 彻底删除都往 `~/.dsh/session-trash/audit.log` 追加一行 JSON,回收站面板里能直接看。
|
|
19
|
-
- **删除回执。**
|
|
19
|
+
- **删除回执。** 移走之后核对会话可能被引用的几处,把没清干净的残留列出来(删除仍是一次一条;回收站页签支持批量恢复 / 批量彻底删除)。
|
|
20
20
|
|
|
21
21
|
## 安装
|
|
22
22
|
|
|
@@ -38,6 +38,8 @@ dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-delete-*.tgz
|
|
|
38
38
|
|
|
39
39
|
## 使用
|
|
40
40
|
|
|
41
|
+
**回收站内批量**:回收站页签支持全选/清空/批量恢复/批量彻底删除,逐条执行,失败的条目会在面板里说明。
|
|
42
|
+
|
|
41
43
|
**Agent 工具**:模型可以调用 `session_delete`,但必须两段式——`action=plan` 返回影响面摘要和一次性 token(2 分钟有效),`action=delete` 必须带这个 token。它拒绝删除调用者自己的会话,会话在此期间变化会让 token 失效。通过 UI 删除不需要这个工具。
|
|
42
44
|
|
|
43
45
|
**键盘**:Tab 在各按钮间移动,Enter/Space 触发,Esc 关闭对话框;回收站面板里可用 ↑/↓/Home/End 在条目间移动焦点;`⌘/Ctrl + Alt + T` 直接打开回收站。删除始终需要菜单 + 确认框,没有一键删除的快捷键。
|
|
@@ -79,7 +81,7 @@ dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-delete-*.tgz
|
|
|
79
81
|
- **恢复不等于完整撤销。** 日志和工作区归属会回来,置顶与归档标记不会:DSH 归档时会顺手清掉 pin,取消归档时不会恢复。
|
|
80
82
|
- **卸载插件不会清空回收站。** `~/.dsh/session-trash/` 是你的恢复通道,会一直留着,除非你自己删。
|
|
81
83
|
- **数据根目录。** 按「插件配置 `dataRoot` → 环境变量 `DSH_HOME` → `~/.dsh`」的顺序解析。如果你的 DSH 把数据放在别处,要把插件指过去;根目录不像 DSH 数据目录时,插件会拒绝执行而不是瞎猜。
|
|
82
|
-
- **这是 alpha 软件,而且会动你的数据。**
|
|
84
|
+
- **这是 alpha 软件,而且会动你的数据。** 它已在下方表格的版本上通过 GUI 验收,但仍属早期软件:重要会话请自行备份。
|
|
83
85
|
|
|
84
86
|
## 与官方归档的区别
|
|
85
87
|
|
|
@@ -87,19 +89,23 @@ dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-delete-*.tgz
|
|
|
87
89
|
|
|
88
90
|
## 兼容性与降级
|
|
89
91
|
|
|
90
|
-
|
|
92
|
+
本包没有声明 `engines.dsh` 版本范围,改用三层防线:
|
|
93
|
+
|
|
94
|
+
| 层 | 触发时机 | 做什么 | 你会看到什么 |
|
|
95
|
+
| ------------- | ----------- | ------------------------------------------------------ | --------------------------------------------------------- |
|
|
96
|
+
| L1 版本闸门 | 安装 / 激活 | `engines.dsh` 版本范围。**未声明**,这一层目前不生效。 | 无 |
|
|
97
|
+
| L2 启动自检 | 插件激活时 | 探测所有依赖的宿主能力。 | 能力档位:`api` / `internal` / `minimal` / `unknown` |
|
|
98
|
+
| L3 执行期拒绝 | 每次操作 | 每个操作自己再校验前置能力,unknown 一律拒绝。 | 结构化错误码 + 人类可读原因,磁盘上不会出现删了一半的状态 |
|
|
91
99
|
|
|
92
|
-
|
|
93
|
-
| ----------- | ----------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
94
|
-
| L1 版本闸门 | 安装 / 激活 | `engines.dsh` 版本范围。**v0.1 尚未声明**,这一层目前不生效。 | 无 |
|
|
95
|
-
| L2 启动自检 | 插件激活时 | 探测所有依赖的宿主能力,分成 api / internal / unknown 三档。 | 进入**降级模式**:宿主没有 `workspaceRegistry`(例如 headless 组合)时仍然允许删除——归档闸门与工作区记账步骤会被跳过并写进回执。只有持久化本体缺失时才进入只读模式。 |
|
|
100
|
+
能力档位:
|
|
96
101
|
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
- `api` / `internal` —— 全流程可用。`internal` 表示部分步骤依赖不在公开文档里的宿主契约,会执行并在面板/回执里说明。
|
|
103
|
+
- `minimal` —— 宿主没有 `workspaceRegistry`(例如 headless 组合)。删除照常进行;归档闸门、置顶/工作区记账、投影缓存这些步骤被跳过并写进回执。
|
|
104
|
+
- `unknown` —— 持久化本体缺失:**只读模式**。plan、审计、回收站列表还能用;删除、恢复、彻底删除被禁用。
|
|
99
105
|
|
|
100
106
|
| 插件版本 | 已验证的 DSH 版本 | 说明 |
|
|
101
107
|
| -------- | ------------------------ | -------------------------------------------------------------------------------- |
|
|
102
|
-
| 0.4.
|
|
108
|
+
| 0.4.2 | **0.2.1-rc.5**(桌面版) | `pnpm smoke:session-delete` 24 项断言全绿,并在同一版本桌面版做过人工 GUI 验收。 |
|
|
103
109
|
|
|
104
110
|
目前只在 **macOS** 上验证过。Windows 相关路径(`session.lock` 的 EBUSY/EPERM 重试、宿主在那儿用的命名信号量)代码里有,但**还没实测**。
|
|
105
111
|
|
|
@@ -116,12 +122,6 @@ DSH 升级之后:重启,然后看插件的状态条(设置 → 插件)
|
|
|
116
122
|
| 彻底删除后还残留东西 | 删除回执里列出的残留 | 对回执和审计日志,按回执里的路径手动清理,并把回执附在 issue 里 |
|
|
117
123
|
| 删完之后回收站是空的 | 插件解析到的数据根目录和你的 DSH 不是同一个(`DSH_HOME` / 配置) | 去磁盘上看 `~/.dsh/session-trash/`,再核对插件的 `dataRoot` 配置 |
|
|
118
124
|
|
|
119
|
-
## 计划中(后续版本)
|
|
120
|
-
|
|
121
|
-
下面这些是计划,尚未实现:
|
|
122
|
-
|
|
123
|
-
- 批量删除(多选);
|
|
124
|
-
|
|
125
125
|
## License
|
|
126
126
|
|
|
127
127
|
MIT,见 [LICENSE](./LICENSE)。本插件借鉴了若干社区项目的**设计**(不是代码),来源记在仓库的 [NOTICE](https://github.com/kangyishuai/dsh-plugins/blob/main/NOTICE)。
|
package/lib/client.js
CHANGED
|
@@ -70,15 +70,12 @@ window.__ModuleLoader__.load({
|
|
|
70
70
|
"panel.tabAudit": "审计",
|
|
71
71
|
"panel.tabHealth": "体检",
|
|
72
72
|
"panel.tabReceipts": "回执",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"batch.confirm": "确认删除 {n} 个?各自进回收站",
|
|
79
|
-
"batch.running": "正在删除…",
|
|
73
|
+
"trash.selectAll": "全选",
|
|
74
|
+
"trash.clear": "清空",
|
|
75
|
+
"trash.restoreMany": "批量恢复({n})",
|
|
76
|
+
"trash.purgeMany": "批量彻底删除({n})",
|
|
77
|
+
"trash.purgeManyConfirm": "确认彻底删除 {n} 个?不可恢复",
|
|
80
78
|
"batch.done": "完成:{ok}/{total} 成功",
|
|
81
|
-
"batch.live": "运行中",
|
|
82
79
|
"receipts.empty": "还没有操作回执。",
|
|
83
80
|
"receipts.restored": "已移回原位置",
|
|
84
81
|
"health.loading": "正在检查…",
|
|
@@ -133,15 +130,12 @@ window.__ModuleLoader__.load({
|
|
|
133
130
|
"panel.tabAudit": "Audit",
|
|
134
131
|
"panel.tabHealth": "Health",
|
|
135
132
|
"panel.tabReceipts": "Receipts",
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"batch.confirm": "Delete {n} session(s)? Each goes to trash",
|
|
142
|
-
"batch.running": "Deleting…",
|
|
133
|
+
"trash.selectAll": "Select all",
|
|
134
|
+
"trash.clear": "Clear",
|
|
135
|
+
"trash.restoreMany": "Restore {n}",
|
|
136
|
+
"trash.purgeMany": "Delete {n} permanently",
|
|
137
|
+
"trash.purgeManyConfirm": "Permanently delete {n}? This cannot be undone",
|
|
143
138
|
"batch.done": "Done: {ok}/{total} succeeded",
|
|
144
|
-
"batch.live": "live",
|
|
145
139
|
"receipts.empty": "No operation receipts yet.",
|
|
146
140
|
"receipts.restored": "restored",
|
|
147
141
|
"health.loading": "Checking…",
|
|
@@ -261,7 +255,11 @@ window.__ModuleLoader__.load({
|
|
|
261
255
|
description: props.description,
|
|
262
256
|
footer: props.footer,
|
|
263
257
|
},
|
|
264
|
-
h(
|
|
258
|
+
h(
|
|
259
|
+
Reveal,
|
|
260
|
+
{ style: { maxHeight: "60vh", overflowY: "auto", paddingRight: "4px" } },
|
|
261
|
+
props.children,
|
|
262
|
+
),
|
|
265
263
|
);
|
|
266
264
|
}
|
|
267
265
|
return h(
|
|
@@ -661,6 +659,15 @@ window.__ModuleLoader__.load({
|
|
|
661
659
|
var purgeState = React.useState(null);
|
|
662
660
|
var confirmPurge = purgeState[0];
|
|
663
661
|
var setConfirmPurge = purgeState[1];
|
|
662
|
+
var selectedTrashState = React.useState({});
|
|
663
|
+
var selectedTrash = selectedTrashState[0];
|
|
664
|
+
var setSelectedTrash = selectedTrashState[1];
|
|
665
|
+
var trashBusyState = React.useState(false);
|
|
666
|
+
var trashBusy = trashBusyState[0];
|
|
667
|
+
var setTrashBusy = trashBusyState[1];
|
|
668
|
+
var trashMsgState = React.useState("");
|
|
669
|
+
var trashMsg = trashMsgState[0];
|
|
670
|
+
var setTrashMsg = trashMsgState[1];
|
|
664
671
|
var scanState = React.useState(null);
|
|
665
672
|
var scan = scanState[0];
|
|
666
673
|
var setScan = scanState[1];
|
|
@@ -676,30 +683,6 @@ window.__ModuleLoader__.load({
|
|
|
676
683
|
var receiptsState = React.useState(null);
|
|
677
684
|
var receipts = receiptsState[0];
|
|
678
685
|
var setReceipts = receiptsState[1];
|
|
679
|
-
var batchListState = React.useState(null);
|
|
680
|
-
var batchList = batchListState[0];
|
|
681
|
-
var setBatchList = batchListState[1];
|
|
682
|
-
var batchSelectedState = React.useState({});
|
|
683
|
-
var batchSelected = batchSelectedState[0];
|
|
684
|
-
var setBatchSelected = batchSelectedState[1];
|
|
685
|
-
var batchBusyState = React.useState(false);
|
|
686
|
-
var batchBusy = batchBusyState[0];
|
|
687
|
-
var setBatchBusy = batchBusyState[1];
|
|
688
|
-
var batchMsgState = React.useState("");
|
|
689
|
-
var batchMsg = batchMsgState[0];
|
|
690
|
-
var setBatchMsg = batchMsgState[1];
|
|
691
|
-
|
|
692
|
-
const loadBatch = React.useCallback(() => {
|
|
693
|
-
props
|
|
694
|
-
.call("listSessions")
|
|
695
|
-
.then((/** @type {any} */ value) => {
|
|
696
|
-
setBatchList(value && value.sessions ? value.sessions : []);
|
|
697
|
-
})
|
|
698
|
-
.catch((/** @type {any} */ reason) => {
|
|
699
|
-
setBatchList([]);
|
|
700
|
-
setBatchMsg(errorText(reason));
|
|
701
|
-
});
|
|
702
|
-
}, []);
|
|
703
686
|
|
|
704
687
|
const loadReceipts = React.useCallback(() => {
|
|
705
688
|
props
|
|
@@ -825,6 +808,49 @@ window.__ModuleLoader__.load({
|
|
|
825
808
|
});
|
|
826
809
|
};
|
|
827
810
|
|
|
811
|
+
var selectedEntryIds = Object.keys(selectedTrash).filter(
|
|
812
|
+
(/** @type {string} */ entryId) => /** @type {any} */ (selectedTrash)[entryId],
|
|
813
|
+
);
|
|
814
|
+
var doBatchRestore = () => {
|
|
815
|
+
if (selectedEntryIds.length === 0) return;
|
|
816
|
+
setTrashBusy(true);
|
|
817
|
+
setTrashMsg("");
|
|
818
|
+
props
|
|
819
|
+
.call("restoreMany", { entryIds: selectedEntryIds })
|
|
820
|
+
.then((/** @type {any} */ result) => {
|
|
821
|
+
setTrashBusy(false);
|
|
822
|
+
setTrashMsg(props.t("batch.done", { ok: result.succeeded, total: result.total }));
|
|
823
|
+
setSelectedTrash({});
|
|
824
|
+
refresh();
|
|
825
|
+
props.bump?.();
|
|
826
|
+
for (const item of result.results) if (item.ok) props.onRestored?.(item.sessionId);
|
|
827
|
+
})
|
|
828
|
+
.catch((/** @type {any} */ reason) => {
|
|
829
|
+
setTrashBusy(false);
|
|
830
|
+
setTrashMsg(errorText(reason));
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
var doBatchPurge = () => {
|
|
834
|
+
if (selectedEntryIds.length === 0) return;
|
|
835
|
+
setTrashBusy(true);
|
|
836
|
+
setTrashMsg("");
|
|
837
|
+
props
|
|
838
|
+
.call("purgeMany", { entryIds: selectedEntryIds })
|
|
839
|
+
.then((/** @type {any} */ result) => {
|
|
840
|
+
setTrashBusy(false);
|
|
841
|
+
setConfirmPurge(null);
|
|
842
|
+
setTrashMsg(props.t("batch.done", { ok: result.succeeded, total: result.total }));
|
|
843
|
+
setSelectedTrash({});
|
|
844
|
+
refresh();
|
|
845
|
+
props.bump?.();
|
|
846
|
+
for (const item of result.results) if (item.ok) props.onPurged?.(undefined);
|
|
847
|
+
})
|
|
848
|
+
.catch((/** @type {any} */ reason) => {
|
|
849
|
+
setTrashBusy(false);
|
|
850
|
+
setTrashMsg(errorText(reason));
|
|
851
|
+
});
|
|
852
|
+
};
|
|
853
|
+
|
|
828
854
|
var entries = (data && data.entries) || [];
|
|
829
855
|
var readOnly = !!(health && health.readOnly);
|
|
830
856
|
var rowStyle = { borderTop: "1px solid " + T.border, padding: "10px 0" };
|
|
@@ -885,163 +911,10 @@ window.__ModuleLoader__.load({
|
|
|
885
911
|
},
|
|
886
912
|
props.t("panel.tabReceipts"),
|
|
887
913
|
),
|
|
888
|
-
h(
|
|
889
|
-
Btn,
|
|
890
|
-
{
|
|
891
|
-
onClick: () => {
|
|
892
|
-
setTab("batch");
|
|
893
|
-
loadBatch();
|
|
894
|
-
},
|
|
895
|
-
},
|
|
896
|
-
props.t("panel.tabBatch"),
|
|
897
|
-
),
|
|
898
914
|
),
|
|
899
915
|
);
|
|
900
916
|
|
|
901
|
-
if (tab === "
|
|
902
|
-
if (!batchList) {
|
|
903
|
-
content.push(
|
|
904
|
-
h(
|
|
905
|
-
"div",
|
|
906
|
-
{ key: "batch-loading", style: { color: T.dim, padding: "8px 0" } },
|
|
907
|
-
props.t("health.loading"),
|
|
908
|
-
),
|
|
909
|
-
);
|
|
910
|
-
} else if (batchList.length === 0) {
|
|
911
|
-
content.push(
|
|
912
|
-
h(
|
|
913
|
-
"div",
|
|
914
|
-
{ key: "batch-empty", style: { color: T.dim, padding: "8px 0" } },
|
|
915
|
-
props.t("batch.empty"),
|
|
916
|
-
),
|
|
917
|
-
);
|
|
918
|
-
} else {
|
|
919
|
-
const selectedIds = Object.keys(batchSelected).filter(
|
|
920
|
-
(id) => /** @type {any} */ (batchSelected)[id],
|
|
921
|
-
);
|
|
922
|
-
content.push(
|
|
923
|
-
h(
|
|
924
|
-
"div",
|
|
925
|
-
{
|
|
926
|
-
key: "batch-actions",
|
|
927
|
-
style: { display: "flex", gap: "8px", alignItems: "center", marginBottom: "8px" },
|
|
928
|
-
},
|
|
929
|
-
h(
|
|
930
|
-
Btn,
|
|
931
|
-
{
|
|
932
|
-
onClick: () => {
|
|
933
|
-
/** @type {Record<string, boolean>} */
|
|
934
|
-
const all = {};
|
|
935
|
-
for (const item of /** @type {any[]} */ (batchList)) all[item.id] = true;
|
|
936
|
-
setBatchSelected(all);
|
|
937
|
-
},
|
|
938
|
-
},
|
|
939
|
-
props.t("batch.selectAll"),
|
|
940
|
-
),
|
|
941
|
-
h(Btn, { onClick: () => setBatchSelected({}) }, props.t("batch.clear")),
|
|
942
|
-
confirmPurge === "__batch__"
|
|
943
|
-
? h(
|
|
944
|
-
Btn,
|
|
945
|
-
{
|
|
946
|
-
danger: true,
|
|
947
|
-
disabled: batchBusy || selectedIds.length === 0,
|
|
948
|
-
onClick: () => {
|
|
949
|
-
setBatchBusy(true);
|
|
950
|
-
setBatchMsg("");
|
|
951
|
-
props
|
|
952
|
-
.call("trashMany", { sessionIds: selectedIds })
|
|
953
|
-
.then((/** @type {any} */ result) => {
|
|
954
|
-
setBatchBusy(false);
|
|
955
|
-
setConfirmPurge(null);
|
|
956
|
-
setBatchMsg(
|
|
957
|
-
props.t("batch.done", { ok: result.succeeded, total: result.total }),
|
|
958
|
-
);
|
|
959
|
-
for (const item of result.results) {
|
|
960
|
-
if (item.ok) props.onPurged?.(item.id);
|
|
961
|
-
}
|
|
962
|
-
setBatchSelected({});
|
|
963
|
-
loadBatch();
|
|
964
|
-
refresh();
|
|
965
|
-
props.bump?.();
|
|
966
|
-
})
|
|
967
|
-
.catch((/** @type {any} */ reason) => {
|
|
968
|
-
setBatchBusy(false);
|
|
969
|
-
setBatchMsg(errorText(reason));
|
|
970
|
-
});
|
|
971
|
-
},
|
|
972
|
-
},
|
|
973
|
-
props.t("batch.confirm", { n: selectedIds.length }),
|
|
974
|
-
)
|
|
975
|
-
: h(
|
|
976
|
-
Btn,
|
|
977
|
-
{
|
|
978
|
-
danger: true,
|
|
979
|
-
disabled: batchBusy || selectedIds.length === 0,
|
|
980
|
-
onClick: () => setConfirmPurge("__batch__"),
|
|
981
|
-
},
|
|
982
|
-
batchBusy
|
|
983
|
-
? props.t("batch.running")
|
|
984
|
-
: props.t("batch.delete", { n: selectedIds.length }),
|
|
985
|
-
),
|
|
986
|
-
),
|
|
987
|
-
);
|
|
988
|
-
batchList.forEach((/** @type {any} */ item, /** @type {any} */ index) => {
|
|
989
|
-
const checked = Boolean(/** @type {any} */ (batchSelected)[item.id]);
|
|
990
|
-
content.push(
|
|
991
|
-
h(
|
|
992
|
-
"label",
|
|
993
|
-
{
|
|
994
|
-
key: "batch-" + index,
|
|
995
|
-
style: {
|
|
996
|
-
display: "flex",
|
|
997
|
-
alignItems: "baseline",
|
|
998
|
-
gap: "8px",
|
|
999
|
-
borderTop: "1px solid " + T.border,
|
|
1000
|
-
padding: "6px 0",
|
|
1001
|
-
fontSize: "12px",
|
|
1002
|
-
cursor: "pointer",
|
|
1003
|
-
},
|
|
1004
|
-
},
|
|
1005
|
-
h("input", {
|
|
1006
|
-
type: "checkbox",
|
|
1007
|
-
checked: checked,
|
|
1008
|
-
disabled: batchBusy,
|
|
1009
|
-
onChange: () =>
|
|
1010
|
-
setBatchSelected((/** @type {any} */ current) => ({
|
|
1011
|
-
...current,
|
|
1012
|
-
[item.id]: !checked,
|
|
1013
|
-
})),
|
|
1014
|
-
style: { marginTop: "2px" },
|
|
1015
|
-
}),
|
|
1016
|
-
h(
|
|
1017
|
-
"span",
|
|
1018
|
-
{
|
|
1019
|
-
title: item.id,
|
|
1020
|
-
style: {
|
|
1021
|
-
flex: 1,
|
|
1022
|
-
minWidth: 0,
|
|
1023
|
-
overflow: "hidden",
|
|
1024
|
-
textOverflow: "ellipsis",
|
|
1025
|
-
whiteSpace: "nowrap",
|
|
1026
|
-
},
|
|
1027
|
-
},
|
|
1028
|
-
item.title || item.id,
|
|
1029
|
-
),
|
|
1030
|
-
item.live ? h("span", { style: { color: T.danger } }, props.t("batch.live")) : null,
|
|
1031
|
-
),
|
|
1032
|
-
);
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
if (batchMsg) {
|
|
1036
|
-
content.push(
|
|
1037
|
-
h(
|
|
1038
|
-
"div",
|
|
1039
|
-
{ key: "batch-msg", style: { color: T.dim, marginTop: "8px", fontSize: "12px" } },
|
|
1040
|
-
batchMsg,
|
|
1041
|
-
),
|
|
1042
|
-
);
|
|
1043
|
-
}
|
|
1044
|
-
} else if (tab === "receipts") {
|
|
917
|
+
if (tab === "receipts") {
|
|
1045
918
|
if (!receipts || receipts.length === 0) {
|
|
1046
919
|
content.push(
|
|
1047
920
|
h(
|
|
@@ -1245,12 +1118,99 @@ window.__ModuleLoader__.load({
|
|
|
1245
1118
|
),
|
|
1246
1119
|
);
|
|
1247
1120
|
} else {
|
|
1121
|
+
content.push(
|
|
1122
|
+
h(
|
|
1123
|
+
"div",
|
|
1124
|
+
{
|
|
1125
|
+
key: "trash-tools",
|
|
1126
|
+
style: {
|
|
1127
|
+
display: "flex",
|
|
1128
|
+
gap: "8px",
|
|
1129
|
+
alignItems: "center",
|
|
1130
|
+
marginBottom: "8px",
|
|
1131
|
+
flexWrap: "wrap",
|
|
1132
|
+
},
|
|
1133
|
+
},
|
|
1134
|
+
h(
|
|
1135
|
+
Btn,
|
|
1136
|
+
{
|
|
1137
|
+
onClick: () => {
|
|
1138
|
+
/** @type {Record<string, boolean>} */
|
|
1139
|
+
const all = {};
|
|
1140
|
+
for (const item of entries) all[item.entryId] = true;
|
|
1141
|
+
setSelectedTrash(all);
|
|
1142
|
+
},
|
|
1143
|
+
disabled: trashBusy,
|
|
1144
|
+
},
|
|
1145
|
+
props.t("trash.selectAll"),
|
|
1146
|
+
),
|
|
1147
|
+
h(
|
|
1148
|
+
Btn,
|
|
1149
|
+
{ onClick: () => setSelectedTrash({}), disabled: trashBusy },
|
|
1150
|
+
props.t("trash.clear"),
|
|
1151
|
+
),
|
|
1152
|
+
h(
|
|
1153
|
+
Btn,
|
|
1154
|
+
{
|
|
1155
|
+
disabled: trashBusy || selectedEntryIds.length === 0,
|
|
1156
|
+
onClick: doBatchRestore,
|
|
1157
|
+
},
|
|
1158
|
+
props.t("trash.restoreMany", { n: selectedEntryIds.length }),
|
|
1159
|
+
),
|
|
1160
|
+
confirmPurge === "__trashBatchPurge__"
|
|
1161
|
+
? h(
|
|
1162
|
+
Btn,
|
|
1163
|
+
{
|
|
1164
|
+
danger: true,
|
|
1165
|
+
disabled: trashBusy || selectedEntryIds.length === 0,
|
|
1166
|
+
onClick: doBatchPurge,
|
|
1167
|
+
},
|
|
1168
|
+
props.t("trash.purgeManyConfirm", { n: selectedEntryIds.length }),
|
|
1169
|
+
)
|
|
1170
|
+
: h(
|
|
1171
|
+
Btn,
|
|
1172
|
+
{
|
|
1173
|
+
danger: true,
|
|
1174
|
+
disabled: trashBusy || selectedEntryIds.length === 0,
|
|
1175
|
+
onClick: () => setConfirmPurge("__trashBatchPurge__"),
|
|
1176
|
+
},
|
|
1177
|
+
props.t("trash.purgeMany", { n: selectedEntryIds.length }),
|
|
1178
|
+
),
|
|
1179
|
+
),
|
|
1180
|
+
);
|
|
1181
|
+
if (trashMsg) {
|
|
1182
|
+
content.push(
|
|
1183
|
+
h(
|
|
1184
|
+
"div",
|
|
1185
|
+
{
|
|
1186
|
+
key: "trash-msg",
|
|
1187
|
+
style: { color: T.dim, fontSize: "12px", marginBottom: "6px" },
|
|
1188
|
+
},
|
|
1189
|
+
trashMsg,
|
|
1190
|
+
),
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1248
1193
|
entries.forEach((/** @type {any} */ entry) => {
|
|
1249
1194
|
content.push(
|
|
1250
1195
|
h(
|
|
1251
1196
|
"div",
|
|
1252
1197
|
{ key: entry.entryId, style: rowStyle },
|
|
1253
|
-
h(
|
|
1198
|
+
h(
|
|
1199
|
+
"label",
|
|
1200
|
+
{ style: { display: "flex", alignItems: "baseline", gap: "8px" } },
|
|
1201
|
+
h("input", {
|
|
1202
|
+
type: "checkbox",
|
|
1203
|
+
checked: Boolean(/** @type {any} */ (selectedTrash)[entry.entryId]),
|
|
1204
|
+
disabled: trashBusy,
|
|
1205
|
+
onChange: () =>
|
|
1206
|
+
setSelectedTrash((/** @type {any} */ current) => ({
|
|
1207
|
+
...current,
|
|
1208
|
+
[entry.entryId]: !current[entry.entryId],
|
|
1209
|
+
})),
|
|
1210
|
+
style: { marginTop: "2px" },
|
|
1211
|
+
}),
|
|
1212
|
+
h("span", { style: { fontWeight: 600 } }, entry.title || entry.sessionId),
|
|
1213
|
+
),
|
|
1254
1214
|
h(
|
|
1255
1215
|
"div",
|
|
1256
1216
|
{ style: { color: T.dim, fontSize: "12px" } },
|
package/lib/operations.js
CHANGED
|
@@ -880,70 +880,48 @@ export function createOperations({ ctx, dataRoot, logger }) {
|
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
/**
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
883
|
+
/**
|
|
884
|
+
* 批量恢复回收站条目。
|
|
885
|
+
* @param {{ entryIds?: string[], operator?: string }} request
|
|
886
|
+
*/
|
|
887
|
+
async function restoreMany(request = {}) {
|
|
888
|
+
const ids = Array.isArray(request.entryIds) ? request.entryIds : [];
|
|
889
|
+
if (ids.length === 0) throw failure("session-delete/invalid-request", "没有选择任何条目");
|
|
890
|
+
if (ids.length > 50) throw failure("session-delete/invalid-request", "一次最多 50 条");
|
|
891
|
+
/** @type {{ entryId: string, ok: boolean, sessionId?: string, error?: string }[]} */
|
|
892
|
+
const results = [];
|
|
893
|
+
for (const entryId of ids) {
|
|
894
|
+
try {
|
|
895
|
+
const result = await restore(entryId, { operator: request.operator ?? "ui" });
|
|
896
|
+
results.push({ entryId, ok: true, sessionId: result.sessionId });
|
|
897
|
+
} catch (error) {
|
|
898
|
+
results.push({ entryId, ok: false, error: messageOf(error) });
|
|
899
|
+
}
|
|
887
900
|
}
|
|
888
|
-
const
|
|
889
|
-
|
|
890
|
-
const id = String(entry?.id ?? entry?.header?.id ?? "");
|
|
891
|
-
return {
|
|
892
|
-
id,
|
|
893
|
-
title: typeof entry?.header?.title === "string" ? entry.header.title : null,
|
|
894
|
-
cwd: typeof entry?.header?.cwd === "string" ? entry.header.cwd : null,
|
|
895
|
-
live: caps.services.sessions?.get?.(id) !== undefined,
|
|
896
|
-
};
|
|
897
|
-
});
|
|
898
|
-
out.sort((/** @type {any} */ a, /** @type {any} */ b) =>
|
|
899
|
-
String(b.title ?? b.id).localeCompare(String(a.title ?? a.id)),
|
|
900
|
-
);
|
|
901
|
-
return { sessions: out.filter((/** @type {any} */ item) => item.id.length > 0) };
|
|
901
|
+
const okCount = results.filter((item) => item.ok).length;
|
|
902
|
+
return { ok: okCount === results.length, total: results.length, succeeded: okCount, results };
|
|
902
903
|
}
|
|
903
904
|
|
|
904
905
|
/**
|
|
905
|
-
*
|
|
906
|
-
* @param {{
|
|
906
|
+
* 批量彻底删除回收站条目。
|
|
907
|
+
* @param {{ entryIds?: string[], operator?: string }} request
|
|
907
908
|
*/
|
|
908
|
-
async function
|
|
909
|
-
const ids = Array.isArray(request.
|
|
910
|
-
if (ids.length === 0) throw failure("session-delete/invalid-request", "
|
|
911
|
-
if (ids.length > 50) throw failure("session-delete/invalid-request", "一次最多 50
|
|
912
|
-
/** @type {{
|
|
909
|
+
async function purgeMany(request = {}) {
|
|
910
|
+
const ids = Array.isArray(request.entryIds) ? request.entryIds : [];
|
|
911
|
+
if (ids.length === 0) throw failure("session-delete/invalid-request", "没有选择任何条目");
|
|
912
|
+
if (ids.length > 50) throw failure("session-delete/invalid-request", "一次最多 50 条");
|
|
913
|
+
/** @type {{ entryId: string, ok: boolean, bytes?: number, error?: string }[]} */
|
|
913
914
|
const results = [];
|
|
914
|
-
for (const
|
|
915
|
+
for (const entryId of ids) {
|
|
915
916
|
try {
|
|
916
|
-
const result = await
|
|
917
|
-
|
|
918
|
-
operator: request.operator ?? "ui",
|
|
919
|
-
});
|
|
920
|
-
results.push({ id, ok: true, entryId: result.entryId, receiptId: result.receiptId });
|
|
917
|
+
const result = await purge(entryId, { operator: request.operator ?? "ui" });
|
|
918
|
+
results.push({ entryId, ok: true, bytes: result.bytes });
|
|
921
919
|
} catch (error) {
|
|
922
|
-
|
|
923
|
-
results.push({
|
|
924
|
-
id,
|
|
925
|
-
ok: false,
|
|
926
|
-
code: typeof raw?.code === "string" ? raw.code : "error",
|
|
927
|
-
error: messageOf(error),
|
|
928
|
-
});
|
|
920
|
+
results.push({ entryId, ok: false, error: messageOf(error) });
|
|
929
921
|
}
|
|
930
922
|
}
|
|
931
923
|
const okCount = results.filter((item) => item.ok).length;
|
|
932
|
-
|
|
933
|
-
action: "trash-many",
|
|
934
|
-
at: new Date().toISOString(),
|
|
935
|
-
requested: ids.length,
|
|
936
|
-
succeeded: okCount,
|
|
937
|
-
failed: results.length - okCount,
|
|
938
|
-
results,
|
|
939
|
-
});
|
|
940
|
-
return {
|
|
941
|
-
ok: okCount === results.length,
|
|
942
|
-
total: results.length,
|
|
943
|
-
succeeded: okCount,
|
|
944
|
-
results,
|
|
945
|
-
receiptId,
|
|
946
|
-
};
|
|
924
|
+
return { ok: okCount === results.length, total: results.length, succeeded: okCount, results };
|
|
947
925
|
}
|
|
948
926
|
|
|
949
927
|
/** @param {number} [limit] */
|
|
@@ -954,8 +932,8 @@ export function createOperations({ ctx, dataRoot, logger }) {
|
|
|
954
932
|
return {
|
|
955
933
|
caps,
|
|
956
934
|
health,
|
|
957
|
-
|
|
958
|
-
|
|
935
|
+
restoreMany,
|
|
936
|
+
purgeMany,
|
|
959
937
|
receipts,
|
|
960
938
|
scanHealth,
|
|
961
939
|
cleanHealth,
|
package/lib/service.js
CHANGED
|
@@ -255,26 +255,25 @@ export class SessionDeleteService extends TypertRemoteService {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
/**
|
|
259
|
-
|
|
258
|
+
/**
|
|
259
|
+
* 批量恢复回收站条目。
|
|
260
|
+
* @param {{ entryIds?: string[] }} request
|
|
261
|
+
*/
|
|
262
|
+
async restoreMany(request) {
|
|
260
263
|
try {
|
|
261
|
-
return await this.ops.
|
|
264
|
+
return await this.ops.restoreMany({ entryIds: request?.entryIds, operator: "ui" });
|
|
262
265
|
} catch (error) {
|
|
263
266
|
rethrow(error);
|
|
264
267
|
}
|
|
265
268
|
}
|
|
266
269
|
|
|
267
270
|
/**
|
|
268
|
-
*
|
|
269
|
-
* @param {{
|
|
271
|
+
* 批量彻底删除回收站条目。
|
|
272
|
+
* @param {{ entryIds?: string[] }} request
|
|
270
273
|
*/
|
|
271
|
-
async
|
|
274
|
+
async purgeMany(request) {
|
|
272
275
|
try {
|
|
273
|
-
return await this.ops.
|
|
274
|
-
sessionIds: request?.sessionIds,
|
|
275
|
-
cascade: request?.cascade === true,
|
|
276
|
-
operator: "ui",
|
|
277
|
-
});
|
|
276
|
+
return await this.ops.purgeMany({ entryIds: request?.entryIds, operator: "ui" });
|
|
278
277
|
} catch (error) {
|
|
279
278
|
rethrow(error);
|
|
280
279
|
}
|
|
@@ -333,8 +332,8 @@ declareRemote(SessionDeleteService, "list");
|
|
|
333
332
|
declareRemote(SessionDeleteService, "restore");
|
|
334
333
|
declareRemote(SessionDeleteService, "purge");
|
|
335
334
|
declareRemote(SessionDeleteService, "audit");
|
|
336
|
-
declareRemote(SessionDeleteService, "
|
|
337
|
-
declareRemote(SessionDeleteService, "
|
|
335
|
+
declareRemote(SessionDeleteService, "restoreMany");
|
|
336
|
+
declareRemote(SessionDeleteService, "purgeMany");
|
|
338
337
|
declareRemote(SessionDeleteService, "receipts");
|
|
339
338
|
declareRemote(SessionDeleteService, "healthScan");
|
|
340
339
|
declareRemote(SessionDeleteService, "cleanHealth");
|
package/locale/en.json
CHANGED
|
@@ -49,14 +49,11 @@
|
|
|
49
49
|
"health.agentTool": "Agent tool session_delete: {state}",
|
|
50
50
|
"health.agentToolOn": "registered",
|
|
51
51
|
"health.agentToolOff": "not registered (host has no tools runtime)",
|
|
52
|
-
"panel.tabBatch": "Batch",
|
|
53
|
-
"batch.empty": "No sessions to delete.",
|
|
54
|
-
"batch.selectAll": "Select all",
|
|
55
|
-
"batch.clear": "Clear",
|
|
56
|
-
"batch.delete": "Delete {n} selected",
|
|
57
|
-
"batch.confirm": "Delete {n} session(s)? Each goes to trash",
|
|
58
|
-
"batch.running": "Deleting…",
|
|
59
52
|
"batch.done": "Done: {ok}/{total} succeeded",
|
|
60
|
-
"
|
|
53
|
+
"trash.selectAll": "Select all",
|
|
54
|
+
"trash.clear": "Clear",
|
|
55
|
+
"trash.restoreMany": "Restore {n}",
|
|
56
|
+
"trash.purgeMany": "Delete {n} permanently",
|
|
57
|
+
"trash.purgeManyConfirm": "Permanently delete {n}? This cannot be undone"
|
|
61
58
|
}
|
|
62
59
|
}
|
package/locale/zh.json
CHANGED
|
@@ -49,14 +49,11 @@
|
|
|
49
49
|
"health.agentTool": "模型工具 session_delete:{state}",
|
|
50
50
|
"health.agentToolOn": "已注册",
|
|
51
51
|
"health.agentToolOff": "未注册(宿主未提供 tools 运行时)",
|
|
52
|
-
"panel.tabBatch": "批量",
|
|
53
|
-
"batch.empty": "没有可删除的会话。",
|
|
54
|
-
"batch.selectAll": "全选",
|
|
55
|
-
"batch.clear": "清空",
|
|
56
|
-
"batch.delete": "批量删除({n})",
|
|
57
|
-
"batch.confirm": "确认删除 {n} 个?各自进回收站",
|
|
58
|
-
"batch.running": "正在删除…",
|
|
59
52
|
"batch.done": "完成:{ok}/{total} 成功",
|
|
60
|
-
"
|
|
53
|
+
"trash.selectAll": "全选",
|
|
54
|
+
"trash.clear": "清空",
|
|
55
|
+
"trash.restoreMany": "批量恢复({n})",
|
|
56
|
+
"trash.purgeMany": "批量彻底删除({n})",
|
|
57
|
+
"trash.purgeManyConfirm": "确认彻底删除 {n} 个?不可恢复"
|
|
61
58
|
}
|
|
62
59
|
}
|