dsh-mop 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +41 -2
- package/client.js +1859 -0
- package/cordis.patch.yml +3 -0
- package/icon.svg +5 -0
- package/index.js +40 -0
- package/lib/artifacts.mjs +47 -0
- package/lib/clean.mjs +316 -0
- package/lib/errors.mjs +6 -0
- package/lib/guard.mjs +20 -0
- package/lib/home.mjs +12 -0
- package/lib/routes.mjs +151 -0
- package/lib/session-shell.mjs +45 -0
- package/lib/store.mjs +386 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +43 -4
package/client.js
ADDED
|
@@ -0,0 +1,1859 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-mop 浏览器半边:设置 → 归档会话。
|
|
3
|
+
* 查看会话和 DSH 官方归档,支持清理与还原。
|
|
4
|
+
*
|
|
5
|
+
* 官方标准对齐(0.2.0):
|
|
6
|
+
* - 不再读取其他插件的 slot 注册或组件(schedule 任务视图改为自绘行);
|
|
7
|
+
* - 不再手搓 connection RPC wire 帧;blank/updatedAt 等会话事实全部来自
|
|
8
|
+
* 本插件 Host 路由(官方 sessionProjections / sessionProjectionCache 投影);
|
|
9
|
+
* - 全部可见文案走本插件自己的 `dsh-mop` 词典命名空间(通用词经 locale
|
|
10
|
+
* 服务的 common 命名空间回退),不再绑定其他功能的词典键;
|
|
11
|
+
* - hover 卡与对话框只用官方基元的默认定位,不再操纵宿主 DOM/portal。
|
|
12
|
+
* - 词典按官方惯例内联本模块(8 语言一次性注册),不再使用按语言分块文件;
|
|
13
|
+
*/
|
|
14
|
+
window.__ModuleLoader__.load({
|
|
15
|
+
id: 'dsh-mop',
|
|
16
|
+
factory(require) {
|
|
17
|
+
const React = require('react');
|
|
18
|
+
const { HoverCard, HoverCardGroup, StateDot, Button, Input, SegmentedTabs, Toast, Modal } = require('@deepseek-ai/dsh-client-ui-primitives');
|
|
19
|
+
const { useState, useEffect, useCallback } = React;
|
|
20
|
+
const h = React.createElement;
|
|
21
|
+
|
|
22
|
+
const NS = 'dsh-mop';
|
|
23
|
+
|
|
24
|
+
// 官方惯例:全部语言的词典内联本模块(对照官方包的 locales.ts;
|
|
25
|
+
// dsh-mop 无构建,直接以字面量内联),apply 时一次性注册进 locale 服务。
|
|
26
|
+
const dictionaries = {
|
|
27
|
+
zh: {
|
|
28
|
+
'tabs.residue': '残留',
|
|
29
|
+
'selection.summary': '已选 {n} 个 · {size}',
|
|
30
|
+
'selection.summaryCount': '已选 {n} 个',
|
|
31
|
+
'search.placeholder': '搜索{section}',
|
|
32
|
+
'confirm.purge.description': '删除后无法恢复',
|
|
33
|
+
'archive.scheduleDeletion': '发往此会话的活动自动化任务及其已保存的运行记录将被删除。',
|
|
34
|
+
'error.notArchived': '只能删除已归档的会话',
|
|
35
|
+
'error.workspaceProtected': '工作区受保护',
|
|
36
|
+
'protection.label': '受保护',
|
|
37
|
+
'reference.schedule': '关联了计划任务',
|
|
38
|
+
'residue.orphanTask': '关联会话当前不可用',
|
|
39
|
+
'residue.registeredCache': '还有工作区注册',
|
|
40
|
+
'residue.orphanCache': '无对应会话的缓存',
|
|
41
|
+
'residue.ghostRegistry': '无对应会话的注册',
|
|
42
|
+
'residue.sessionDirectory': '未识别会话目录',
|
|
43
|
+
'residue.emptyProject': '空会话目录',
|
|
44
|
+
'confirm.tasks.description': '所选任务及其保存的运行记录将被删除',
|
|
45
|
+
'error.schedule_changed': '任务已变化,请刷新后重试',
|
|
46
|
+
'error.session_resident': '会话仍加载在本 DSH 实例中;重启 DSH 后可删除',
|
|
47
|
+
'error.purge_busy': '会话正在清理,请稍后重试',
|
|
48
|
+
'error.workspace_unavailable': '无法检查工作区注册',
|
|
49
|
+
'error.workspace_filtered': '工作区含其他隐藏注册,无法单独移除',
|
|
50
|
+
'error.unsupported_storage': '无法确认会话日志位置',
|
|
51
|
+
'error.historical_format': '会话日志需要迁移后才能删除',
|
|
52
|
+
'error.historical_parent': '请先打开父会话完成迁移',
|
|
53
|
+
'error.unsafe_path': '无法确认文件路径',
|
|
54
|
+
'error.unknown_artifact': '会话目录包含未识别文件',
|
|
55
|
+
'error.session_changed': '会话状态已变化,请重试',
|
|
56
|
+
'error.cache_unavailable': '投影缓存服务不可用',
|
|
57
|
+
'error.residue_changed': '残留已变化,请刷新后重试',
|
|
58
|
+
'error.internal': '内部错误,请重试',
|
|
59
|
+
'error.bad_request': '请求无效',
|
|
60
|
+
'tabs.archived': '已归档',
|
|
61
|
+
'notice.archived': '已归档',
|
|
62
|
+
'error.sessionNotFound': '会话不可用',
|
|
63
|
+
'error.referenceCheck': '无法加载任务',
|
|
64
|
+
'error.residue_unavailable': '操作失败,请重试',
|
|
65
|
+
'error.purge_failed': '操作失败,请重试',
|
|
66
|
+
'error.residue_failed': '操作失败,请重试',
|
|
67
|
+
'empty.residue': '暂无结果',
|
|
68
|
+
'notice.failed': '失败 {count}',
|
|
69
|
+
'selection.selectAll': '全选',
|
|
70
|
+
'selection.deselectAll': '取消全选',
|
|
71
|
+
'confirm.purge.title': '删除 {provider}?',
|
|
72
|
+
'confirm.residue.title': '删除 {provider}?',
|
|
73
|
+
'hover.more': '还有 {count} 个',
|
|
74
|
+
'host.updateRequired': '请重启 DSH 使更改生效。',
|
|
75
|
+
'row.archived': '已归档',
|
|
76
|
+
'toast.archived': '会话已归档,可',
|
|
77
|
+
'toast.stoppedAndArchived': '已停止并归档,可',
|
|
78
|
+
'toast.archivedUndo': '撤销',
|
|
79
|
+
'toast.archivedOr': '或',
|
|
80
|
+
'session.new': '新会话',
|
|
81
|
+
'group.ungrouped': '未分组',
|
|
82
|
+
'actions.archive': '归档会话',
|
|
83
|
+
'actions.unarchive': '取消归档',
|
|
84
|
+
'section.sessions': '会话',
|
|
85
|
+
'empty.noMatches': '无匹配结果',
|
|
86
|
+
'empty.none': '暂无会话',
|
|
87
|
+
'empty.noneArchived': '暂无已归档会话',
|
|
88
|
+
'archive.confirm.title': '停止并归档此会话?',
|
|
89
|
+
'archive.confirm.desc': '“{title}”仍有正在进行的工作。归档会先停止这些工作;之后可在侧栏筛选“全部对话(显示已归档)”中恢复会话,被停止的工作不会自动继续。',
|
|
90
|
+
'archive.confirm.pending': '正在停止并归档…',
|
|
91
|
+
'archive.confirm.action': '停止并归档',
|
|
92
|
+
'archive.confirm.activity': '将被停止的工作',
|
|
93
|
+
'archive.confirm.turn': '进行中的回合',
|
|
94
|
+
'archive.confirm.subagents.one': '{n} 个运行中的子智能体:{names}',
|
|
95
|
+
'archive.confirm.subagents.other': '{n} 个运行中的子智能体:{names}',
|
|
96
|
+
'archive.confirm.jobs.one': '{n} 个后台任务:{names}',
|
|
97
|
+
'archive.confirm.jobs.other': '{n} 个后台任务:{names}',
|
|
98
|
+
'archive.confirm.schedules.one': '{n} 条定时提醒:{names}',
|
|
99
|
+
'archive.confirm.schedules.other': '{n} 条定时提醒:{names}',
|
|
100
|
+
'archive.confirm.other.one': '{n} 项其他工作({kind})',
|
|
101
|
+
'archive.confirm.other.other': '{n} 项其他工作({kind})',
|
|
102
|
+
'archive.confirm.listSeparator': '、',
|
|
103
|
+
'time.now': '刚刚',
|
|
104
|
+
'time.minutes': '{n}分钟',
|
|
105
|
+
'time.hours': '{n}小时',
|
|
106
|
+
'time.days': '{n}天',
|
|
107
|
+
'time.months': '{n}个月',
|
|
108
|
+
'time.years': '{n}年',
|
|
109
|
+
'time.ago': '{t}前',
|
|
110
|
+
'date.ymd': '{y}年{m}月{d}日',
|
|
111
|
+
'hover.created': '创建于 {time}',
|
|
112
|
+
'hover.copied': '已复制',
|
|
113
|
+
'status.running': '进行中',
|
|
114
|
+
'status.idle': '空闲',
|
|
115
|
+
'detail.close': '关闭详情',
|
|
116
|
+
'detail.label': '任务详情',
|
|
117
|
+
'detail.name': '自动化任务名称',
|
|
118
|
+
'detail.instruction': '自动化任务内容',
|
|
119
|
+
'detail.missing': '任务已不可用,可能已被删除',
|
|
120
|
+
'detail.nextRun': '下次运行',
|
|
121
|
+
'statusFilter.label': '任务状态',
|
|
122
|
+
'rule.repeat': '重复',
|
|
123
|
+
'host.target': '执行位置',
|
|
124
|
+
'host.currentConversation': '当前关联会话',
|
|
125
|
+
'host.targetNewOnce': '新建会话并复用',
|
|
126
|
+
'host.targetNew': '每次新建会话',
|
|
127
|
+
'delete.confirm': '确认删除',
|
|
128
|
+
'clear.confirm': '确认清除',
|
|
129
|
+
'error.schedule_delete_failed': '无法删除任务',
|
|
130
|
+
'list.error': '无法加载任务',
|
|
131
|
+
'status.active': '已开启',
|
|
132
|
+
'status.paused': '已暂停',
|
|
133
|
+
'status.ended': '已结束',
|
|
134
|
+
'frequency.once': '仅一次',
|
|
135
|
+
'frequency.every': '每 {value} {unit}',
|
|
136
|
+
'frequency.daily': '每天 {time}({timeZone})',
|
|
137
|
+
'frequency.weekly': '每周{weekdays} {time}({timeZone})',
|
|
138
|
+
'frequency.hostCustom': '自定义',
|
|
139
|
+
'frequency.weekday.join': '、',
|
|
140
|
+
'frequency.weekday.1': '一',
|
|
141
|
+
'frequency.weekday.2': '二',
|
|
142
|
+
'frequency.weekday.3': '三',
|
|
143
|
+
'frequency.weekday.4': '四',
|
|
144
|
+
'frequency.weekday.5': '五',
|
|
145
|
+
'frequency.weekday.6': '六',
|
|
146
|
+
'frequency.weekday.7': '日',
|
|
147
|
+
'unit.day.one': '天',
|
|
148
|
+
'unit.day.other': '天',
|
|
149
|
+
'unit.hour.one': '小时',
|
|
150
|
+
'unit.hour.other': '小时',
|
|
151
|
+
'unit.minute.one': '分钟',
|
|
152
|
+
'unit.minute.other': '分钟',
|
|
153
|
+
'unit.second.one': '秒',
|
|
154
|
+
'unit.second.other': '秒',
|
|
155
|
+
},
|
|
156
|
+
en: {
|
|
157
|
+
'tabs.residue': 'Residue',
|
|
158
|
+
'selection.summary': '{n} selected · {size}',
|
|
159
|
+
'selection.summaryCount': '{n} selected',
|
|
160
|
+
'search.placeholder': 'Search {section}',
|
|
161
|
+
'confirm.purge.description': 'This cannot be undone',
|
|
162
|
+
'archive.scheduleDeletion': 'Active scheduled tasks targeting this session and their saved run history will be deleted.',
|
|
163
|
+
'error.notArchived': 'Only archived sessions can be deleted.',
|
|
164
|
+
'error.workspaceProtected': 'Protected workspace.',
|
|
165
|
+
'protection.label': 'protected',
|
|
166
|
+
'reference.schedule': 'Linked to a scheduled task.',
|
|
167
|
+
'residue.orphanTask': 'The linked session is unavailable.',
|
|
168
|
+
'residue.registeredCache': 'A workspace also retains a registration for this session ID.',
|
|
169
|
+
'residue.orphanCache': 'orphan cache',
|
|
170
|
+
'residue.ghostRegistry': 'ghost registration',
|
|
171
|
+
'residue.sessionDirectory': 'shell dir',
|
|
172
|
+
'residue.emptyProject': 'empty project dir',
|
|
173
|
+
'confirm.tasks.description': 'Selected tasks and their saved run history will be deleted',
|
|
174
|
+
'error.schedule_changed': 'Task changed; refresh and try again',
|
|
175
|
+
'error.session_resident': 'The session is still loaded in this DSH instance; restart DSH to delete it',
|
|
176
|
+
'error.purge_busy': 'Session cleanup is in progress; try again later',
|
|
177
|
+
'error.workspace_unavailable': 'Cannot check workspace registrations',
|
|
178
|
+
'error.workspace_filtered': 'Workspace has other hidden registrations; cannot remove this one separately',
|
|
179
|
+
'error.unsupported_storage': 'Cannot identify the session log location',
|
|
180
|
+
'error.historical_format': 'Migrate the session log before deleting',
|
|
181
|
+
'error.historical_parent': 'Open the parent session to complete migration first',
|
|
182
|
+
'error.unsafe_path': 'Cannot verify the file path',
|
|
183
|
+
'error.unknown_artifact': 'Session directory contains unrecognized files',
|
|
184
|
+
'error.session_changed': 'Session state changed; try again',
|
|
185
|
+
'error.cache_unavailable': 'Projection cache service is unavailable',
|
|
186
|
+
'error.residue_changed': 'Residue changed; refresh and try again',
|
|
187
|
+
'error.internal': 'Internal error. Try again.',
|
|
188
|
+
'error.bad_request': 'Invalid request.',
|
|
189
|
+
'tabs.archived': 'Archived',
|
|
190
|
+
'notice.archived': 'Archived',
|
|
191
|
+
'error.sessionNotFound': 'Session unavailable',
|
|
192
|
+
'error.referenceCheck': 'Could not load tasks.',
|
|
193
|
+
'error.residue_unavailable': 'Could not complete the action. Try again.',
|
|
194
|
+
'error.purge_failed': 'Could not complete the action. Try again.',
|
|
195
|
+
'error.residue_failed': 'Could not complete the action. Try again.',
|
|
196
|
+
'empty.residue': 'No results',
|
|
197
|
+
'notice.failed': 'Failed {count}',
|
|
198
|
+
'selection.selectAll': 'Select all',
|
|
199
|
+
'selection.deselectAll': 'Deselect all',
|
|
200
|
+
'confirm.purge.title': 'Delete {provider}?',
|
|
201
|
+
'confirm.residue.title': 'Delete {provider}?',
|
|
202
|
+
'hover.more': '{count} more',
|
|
203
|
+
'host.updateRequired': 'Restart DSH to apply the change.',
|
|
204
|
+
'row.archived': 'Archived',
|
|
205
|
+
'toast.archived': 'Session archived. You can ',
|
|
206
|
+
'toast.stoppedAndArchived': 'Session stopped and archived. You can ',
|
|
207
|
+
'toast.archivedUndo': 'undo',
|
|
208
|
+
'toast.archivedOr': ' or ',
|
|
209
|
+
'session.new': 'New Session',
|
|
210
|
+
'group.ungrouped': 'Ungrouped',
|
|
211
|
+
'actions.archive': 'Archive',
|
|
212
|
+
'actions.unarchive': 'Unarchive',
|
|
213
|
+
'section.sessions': 'Sessions',
|
|
214
|
+
'empty.noMatches': 'No matches',
|
|
215
|
+
'empty.none': 'No sessions yet',
|
|
216
|
+
'empty.noneArchived': 'No archived sessions yet',
|
|
217
|
+
'archive.confirm.title': 'Stop and archive this session?',
|
|
218
|
+
'archive.confirm.desc': '“{title}” still has work in progress. Archiving stops it first; you can restore the session later from the “All conversations (show archived)” filter in the sidebar, and the stopped work will not resume on its own.',
|
|
219
|
+
'archive.confirm.pending': 'Stopping and archiving…',
|
|
220
|
+
'archive.confirm.action': 'Stop and archive',
|
|
221
|
+
'archive.confirm.activity': 'Work that will be stopped',
|
|
222
|
+
'archive.confirm.turn': 'The turn in progress',
|
|
223
|
+
'archive.confirm.subagents.one': '{n} running subagent: {names}',
|
|
224
|
+
'archive.confirm.subagents.other': '{n} running subagents: {names}',
|
|
225
|
+
'archive.confirm.jobs.one': '{n} background job: {names}',
|
|
226
|
+
'archive.confirm.jobs.other': '{n} background jobs: {names}',
|
|
227
|
+
'archive.confirm.schedules.one': '{n} scheduled reminder: {names}',
|
|
228
|
+
'archive.confirm.schedules.other': '{n} scheduled reminders: {names}',
|
|
229
|
+
'archive.confirm.other.one': '{n} other item of work ({kind})',
|
|
230
|
+
'archive.confirm.other.other': '{n} other items of work ({kind})',
|
|
231
|
+
'archive.confirm.listSeparator': ', ',
|
|
232
|
+
'time.now': 'now',
|
|
233
|
+
'time.minutes': '{n}min',
|
|
234
|
+
'time.hours': '{n}h',
|
|
235
|
+
'time.days': '{n}d',
|
|
236
|
+
'time.months': '{n}mo',
|
|
237
|
+
'time.years': '{n}y',
|
|
238
|
+
'time.ago': '{t} ago',
|
|
239
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
240
|
+
'hover.created': 'Created {time}',
|
|
241
|
+
'hover.copied': 'Copied',
|
|
242
|
+
'status.running': 'Running',
|
|
243
|
+
'status.idle': 'Idle',
|
|
244
|
+
'detail.close': 'Close details',
|
|
245
|
+
'detail.label': 'Task details',
|
|
246
|
+
'detail.name': 'Automation task name',
|
|
247
|
+
'detail.instruction': 'Automation task instruction',
|
|
248
|
+
'detail.missing': 'Task unavailable. It may have been deleted.',
|
|
249
|
+
'detail.nextRun': 'Next run',
|
|
250
|
+
'statusFilter.label': 'Task status',
|
|
251
|
+
'rule.repeat': 'Repeat',
|
|
252
|
+
'host.target': 'Run in',
|
|
253
|
+
'host.currentConversation': 'Current linked session',
|
|
254
|
+
'host.targetNewOnce': 'Create a session and reuse it',
|
|
255
|
+
'host.targetNew': 'New session for every run',
|
|
256
|
+
'delete.confirm': 'Confirm deletion',
|
|
257
|
+
'clear.confirm': 'Clear tasks',
|
|
258
|
+
'error.schedule_delete_failed': 'Could not delete the task.',
|
|
259
|
+
'list.error': 'Could not load tasks.',
|
|
260
|
+
'status.active': 'Enabled',
|
|
261
|
+
'status.paused': 'Paused',
|
|
262
|
+
'status.ended': 'Ended',
|
|
263
|
+
'frequency.once': 'Once',
|
|
264
|
+
'frequency.every': 'Every {value} {unit}',
|
|
265
|
+
'frequency.daily': 'Daily at {time} ({timeZone})',
|
|
266
|
+
'frequency.weekly': 'Weekly on {weekdays} at {time} ({timeZone})',
|
|
267
|
+
'frequency.hostCustom': 'Custom',
|
|
268
|
+
'frequency.weekday.join': ', ',
|
|
269
|
+
'frequency.weekday.1': 'Mon',
|
|
270
|
+
'frequency.weekday.2': 'Tue',
|
|
271
|
+
'frequency.weekday.3': 'Wed',
|
|
272
|
+
'frequency.weekday.4': 'Thu',
|
|
273
|
+
'frequency.weekday.5': 'Fri',
|
|
274
|
+
'frequency.weekday.6': 'Sat',
|
|
275
|
+
'frequency.weekday.7': 'Sun',
|
|
276
|
+
'unit.day.one': 'day',
|
|
277
|
+
'unit.day.other': 'days',
|
|
278
|
+
'unit.hour.one': 'hour',
|
|
279
|
+
'unit.hour.other': 'hours',
|
|
280
|
+
'unit.minute.one': 'minute',
|
|
281
|
+
'unit.minute.other': 'minutes',
|
|
282
|
+
'unit.second.one': 'second',
|
|
283
|
+
'unit.second.other': 'seconds',
|
|
284
|
+
},
|
|
285
|
+
ja: {
|
|
286
|
+
'tabs.residue': '残余',
|
|
287
|
+
'selection.summary': '{n} 件選択 · {size}',
|
|
288
|
+
'selection.summaryCount': '{n} 件選択',
|
|
289
|
+
'search.placeholder': '{section}を検索',
|
|
290
|
+
'confirm.purge.description': 'この操作は取り消せません',
|
|
291
|
+
'archive.scheduleDeletion': 'このセッション宛ての有効な自動化タスクと保存された実行履歴が削除されます。',
|
|
292
|
+
'error.notArchived': 'アーカイブ済みのセッションのみ削除できます。',
|
|
293
|
+
'error.workspaceProtected': '保護されたワークスペースです。',
|
|
294
|
+
'protection.label': '保護',
|
|
295
|
+
'reference.schedule': '予定タスクに関連しています。',
|
|
296
|
+
'residue.orphanTask': 'リンクされたセッションは利用できません。',
|
|
297
|
+
'residue.registeredCache': 'このセッション ID にはワークスペースの登録も残っています。',
|
|
298
|
+
'residue.orphanCache': '孤児キャッシュ',
|
|
299
|
+
'residue.ghostRegistry': '幽霊登録',
|
|
300
|
+
'residue.sessionDirectory': '殻ディレクトリ',
|
|
301
|
+
'residue.emptyProject': '空プロジェクト',
|
|
302
|
+
'confirm.tasks.description': '選択したタスクと保存された実行履歴が削除されます',
|
|
303
|
+
'error.schedule_changed': 'タスクが変更されました。更新して再試行してください',
|
|
304
|
+
'error.session_resident': 'このセッションはこの DSH インスタンスに読み込まれたままです。DSH を再起動すると削除できます',
|
|
305
|
+
'error.purge_busy': 'セッションのクリーンアップ中です。後でもう一度お試しください',
|
|
306
|
+
'error.workspace_unavailable': 'ワークスペース登録を確認できません',
|
|
307
|
+
'error.workspace_filtered': '他の非表示の登録があるため個別に削除できません',
|
|
308
|
+
'error.unsupported_storage': 'セッションログの場所を確認できません',
|
|
309
|
+
'error.historical_format': '削除する前にセッションログの移行が必要です',
|
|
310
|
+
'error.historical_parent': '先に親セッションを開いて移行を完了してください',
|
|
311
|
+
'error.unsafe_path': 'ファイルパスを確認できません',
|
|
312
|
+
'error.unknown_artifact': 'セッションディレクトリに不明なファイルがあります',
|
|
313
|
+
'error.session_changed': 'セッションの状態が変わりました。再試行してください',
|
|
314
|
+
'error.cache_unavailable': '投影キャッシュサービスを利用できません',
|
|
315
|
+
'error.residue_changed': '残余が変更されました。更新して再試行してください',
|
|
316
|
+
'error.internal': '内部エラーが発生しました。再試行してください。',
|
|
317
|
+
'error.bad_request': '無効なリクエストです。',
|
|
318
|
+
'tabs.archived': 'アーカイブ済み',
|
|
319
|
+
'notice.archived': 'アーカイブ済み',
|
|
320
|
+
'error.sessionNotFound': 'セッションを利用できません',
|
|
321
|
+
'error.referenceCheck': 'タスクを読み込めませんでした。',
|
|
322
|
+
'error.residue_unavailable': '操作に失敗しました。再試行してください。',
|
|
323
|
+
'error.purge_failed': '操作に失敗しました。再試行してください。',
|
|
324
|
+
'error.residue_failed': '操作に失敗しました。再試行してください。',
|
|
325
|
+
'empty.residue': '結果なし',
|
|
326
|
+
'notice.failed': '失敗 {count}',
|
|
327
|
+
'selection.selectAll': 'すべて選択',
|
|
328
|
+
'selection.deselectAll': 'すべて解除',
|
|
329
|
+
'confirm.purge.title': '{provider}を削除しますか?',
|
|
330
|
+
'confirm.residue.title': '{provider}を削除しますか?',
|
|
331
|
+
'hover.more': '他 {count} 件',
|
|
332
|
+
'host.updateRequired': '変更を適用するには DSH を再起動してください。',
|
|
333
|
+
'row.archived': 'アーカイブ済み',
|
|
334
|
+
'toast.archived': 'セッションをアーカイブしました。',
|
|
335
|
+
'toast.stoppedAndArchived': 'セッションを停止してアーカイブしました。',
|
|
336
|
+
'toast.archivedUndo': '元に戻す',
|
|
337
|
+
'toast.archivedOr': ' または ',
|
|
338
|
+
'session.new': '新しいセッション',
|
|
339
|
+
'group.ungrouped': 'グループなし',
|
|
340
|
+
'actions.archive': 'アーカイブ',
|
|
341
|
+
'actions.unarchive': 'アーカイブを解除',
|
|
342
|
+
'section.sessions': 'セッション',
|
|
343
|
+
'empty.noMatches': '一致なし',
|
|
344
|
+
'empty.none': 'セッションはまだありません',
|
|
345
|
+
'empty.noneArchived': 'アーカイブされたセッションはまだありません',
|
|
346
|
+
'archive.confirm.title': 'このセッションを停止してアーカイブしますか?',
|
|
347
|
+
'archive.confirm.desc': '「{title}」には進行中の作業があります。アーカイブするとまず停止されます。セッションは後からサイドバーの「すべての会話(アーカイブを表示)」フィルターで復元できますが、停止された作業は自動的に再開されません。',
|
|
348
|
+
'archive.confirm.pending': '停止してアーカイブ中…',
|
|
349
|
+
'archive.confirm.action': '停止してアーカイブ',
|
|
350
|
+
'archive.confirm.activity': '停止される作業',
|
|
351
|
+
'archive.confirm.turn': '進行中のターン',
|
|
352
|
+
'archive.confirm.subagents.one': '実行中のサブエージェント {n} 件: {names}',
|
|
353
|
+
'archive.confirm.subagents.other': '実行中のサブエージェント {n} 件: {names}',
|
|
354
|
+
'archive.confirm.jobs.one': 'バックグラウンドジョブ {n} 件: {names}',
|
|
355
|
+
'archive.confirm.jobs.other': 'バックグラウンドジョブ {n} 件: {names}',
|
|
356
|
+
'archive.confirm.schedules.one': 'スケジュールされたリマインダー {n} 件: {names}',
|
|
357
|
+
'archive.confirm.schedules.other': 'スケジュールされたリマインダー {n} 件: {names}',
|
|
358
|
+
'archive.confirm.other.one': 'その他の作業 {n} 件({kind})',
|
|
359
|
+
'archive.confirm.other.other': 'その他の作業 {n} 件({kind})',
|
|
360
|
+
'archive.confirm.listSeparator': '、',
|
|
361
|
+
'time.now': '今',
|
|
362
|
+
'time.minutes': '{n}分',
|
|
363
|
+
'time.hours': '{n}時間',
|
|
364
|
+
'time.days': '{n}日',
|
|
365
|
+
'time.months': '{n}か月',
|
|
366
|
+
'time.years': '{n}年',
|
|
367
|
+
'time.ago': '{t}前',
|
|
368
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
369
|
+
'hover.created': '作成日時 {time}',
|
|
370
|
+
'hover.copied': 'コピーしました',
|
|
371
|
+
'status.running': '実行中',
|
|
372
|
+
'status.idle': '待機中',
|
|
373
|
+
'detail.close': '詳細を閉じる',
|
|
374
|
+
'detail.label': 'タスクの詳細',
|
|
375
|
+
'detail.name': '自動化タスク名',
|
|
376
|
+
'detail.instruction': '自動化タスクの指示',
|
|
377
|
+
'detail.missing': 'タスクを利用できません。削除された可能性があります。',
|
|
378
|
+
'detail.nextRun': '次回実行',
|
|
379
|
+
'statusFilter.label': 'タスクの状態',
|
|
380
|
+
'rule.repeat': '繰り返し',
|
|
381
|
+
'host.target': '実行先',
|
|
382
|
+
'host.currentConversation': '現在リンクされている会話',
|
|
383
|
+
'host.targetNewOnce': '会話を作成して再利用',
|
|
384
|
+
'host.targetNew': '実行ごとに新しい会話',
|
|
385
|
+
'delete.confirm': '削除を確定',
|
|
386
|
+
'clear.confirm': 'クリアする',
|
|
387
|
+
'error.schedule_delete_failed': 'タスクを削除できませんでした。',
|
|
388
|
+
'list.error': 'タスクを読み込めませんでした。',
|
|
389
|
+
'status.active': '有効',
|
|
390
|
+
'status.paused': '一時停止中',
|
|
391
|
+
'status.ended': '終了',
|
|
392
|
+
'frequency.once': '1回のみ',
|
|
393
|
+
'frequency.every': '{value}{unit}ごと',
|
|
394
|
+
'frequency.daily': '毎日 {time} ({timeZone})',
|
|
395
|
+
'frequency.weekly': '毎週 {weekdays} の {time} ({timeZone})',
|
|
396
|
+
'frequency.hostCustom': 'カスタム',
|
|
397
|
+
'frequency.weekday.join': '、',
|
|
398
|
+
'frequency.weekday.1': '月',
|
|
399
|
+
'frequency.weekday.2': '火',
|
|
400
|
+
'frequency.weekday.3': '水',
|
|
401
|
+
'frequency.weekday.4': '木',
|
|
402
|
+
'frequency.weekday.5': '金',
|
|
403
|
+
'frequency.weekday.6': '土',
|
|
404
|
+
'frequency.weekday.7': '日',
|
|
405
|
+
'unit.day.one': '日',
|
|
406
|
+
'unit.day.other': '日',
|
|
407
|
+
'unit.hour.one': '時間',
|
|
408
|
+
'unit.hour.other': '時間',
|
|
409
|
+
'unit.minute.one': '分',
|
|
410
|
+
'unit.minute.other': '分',
|
|
411
|
+
'unit.second.one': '秒',
|
|
412
|
+
'unit.second.other': '秒',
|
|
413
|
+
},
|
|
414
|
+
es: {
|
|
415
|
+
'tabs.residue': 'Residuos',
|
|
416
|
+
'selection.summary': '{n} seleccionadas · {size}',
|
|
417
|
+
'selection.summaryCount': '{n} seleccionadas',
|
|
418
|
+
'search.placeholder': 'Buscar {section}',
|
|
419
|
+
'confirm.purge.description': 'Esta acción no se puede deshacer',
|
|
420
|
+
'archive.scheduleDeletion': 'Se eliminarán las tareas automáticas activas dirigidas a esta sesión y su historial de ejecución guardado.',
|
|
421
|
+
'error.notArchived': 'Solo se pueden eliminar sesiones archivadas.',
|
|
422
|
+
'error.workspaceProtected': 'Espacio de trabajo protegido.',
|
|
423
|
+
'protection.label': 'protegida',
|
|
424
|
+
'reference.schedule': 'Vinculada a una tarea programada.',
|
|
425
|
+
'residue.orphanTask': 'La sesión vinculada no está disponible.',
|
|
426
|
+
'residue.registeredCache': 'También existe un registro de espacio de trabajo para esta sesión.',
|
|
427
|
+
'residue.orphanCache': 'caché huérfana',
|
|
428
|
+
'residue.ghostRegistry': 'registro fantasma',
|
|
429
|
+
'residue.sessionDirectory': 'directorio casca',
|
|
430
|
+
'residue.emptyProject': 'directorio de proyecto vacío',
|
|
431
|
+
'confirm.tasks.description': 'Se eliminarán las tareas seleccionadas y su historial guardado',
|
|
432
|
+
'error.schedule_changed': 'La tarea cambió; actualiza e inténtalo de nuevo',
|
|
433
|
+
'error.session_resident': 'La sesión sigue cargada en esta instancia de DSH; reinicia DSH para eliminarla',
|
|
434
|
+
'error.purge_busy': 'Se está limpiando la sesión; inténtalo más tarde',
|
|
435
|
+
'error.workspace_unavailable': 'No se pueden comprobar los registros del espacio de trabajo',
|
|
436
|
+
'error.workspace_filtered': 'Otros registros ocultos impiden eliminar este por separado',
|
|
437
|
+
'error.unsupported_storage': 'No se puede identificar la ubicación del registro',
|
|
438
|
+
'error.historical_format': 'Migra el registro de la sesión antes de eliminarlo',
|
|
439
|
+
'error.historical_parent': 'Abre primero la sesión principal para completar la migración',
|
|
440
|
+
'error.unsafe_path': 'No se puede verificar la ruta del archivo',
|
|
441
|
+
'error.unknown_artifact': 'El directorio de sesión contiene archivos desconocidos',
|
|
442
|
+
'error.session_changed': 'El estado de la sesión cambió; inténtalo de nuevo',
|
|
443
|
+
'error.cache_unavailable': 'El servicio de caché de proyección no está disponible',
|
|
444
|
+
'error.residue_changed': 'El residuo cambió; actualiza e inténtalo de nuevo',
|
|
445
|
+
'error.internal': 'Error interno. Inténtalo de nuevo.',
|
|
446
|
+
'error.bad_request': 'Solicitud no válida.',
|
|
447
|
+
'tabs.archived': 'Archivado',
|
|
448
|
+
'notice.archived': 'Archivado',
|
|
449
|
+
'error.sessionNotFound': 'Sesión no disponible',
|
|
450
|
+
'error.referenceCheck': 'No se pudieron cargar las tareas.',
|
|
451
|
+
'error.residue_unavailable': 'No se pudo completar la acción. Inténtelo de nuevo.',
|
|
452
|
+
'error.purge_failed': 'No se pudo completar la acción. Inténtelo de nuevo.',
|
|
453
|
+
'error.residue_failed': 'No se pudo completar la acción. Inténtelo de nuevo.',
|
|
454
|
+
'empty.residue': 'Sin resultados',
|
|
455
|
+
'notice.failed': 'Error {count}',
|
|
456
|
+
'selection.selectAll': 'Seleccionar todo',
|
|
457
|
+
'selection.deselectAll': 'Deseleccionar todo',
|
|
458
|
+
'confirm.purge.title': '¿Eliminar {provider}?',
|
|
459
|
+
'confirm.residue.title': '¿Eliminar {provider}?',
|
|
460
|
+
'hover.more': '{count} más',
|
|
461
|
+
'host.updateRequired': 'Reinicia DSH para aplicar el cambio.',
|
|
462
|
+
'row.archived': 'Archivado',
|
|
463
|
+
'toast.archived': 'Sesión archivada. tu puedes ',
|
|
464
|
+
'toast.stoppedAndArchived': 'Sesión detenida y archivada. tu puedes ',
|
|
465
|
+
'toast.archivedUndo': 'deshacer',
|
|
466
|
+
'toast.archivedOr': ' o ',
|
|
467
|
+
'session.new': 'Nueva sesión',
|
|
468
|
+
'group.ungrouped': 'Desagrupados',
|
|
469
|
+
'actions.archive': 'Archivo',
|
|
470
|
+
'actions.unarchive': 'Desarchivar',
|
|
471
|
+
'section.sessions': 'Sesiones',
|
|
472
|
+
'empty.noMatches': 'No hay coincidencias',
|
|
473
|
+
'empty.none': 'Aún no hay sesiones',
|
|
474
|
+
'empty.noneArchived': 'Aún no hay sesiones archivadas',
|
|
475
|
+
'archive.confirm.title': '¿Detener y archivar esta sesión?',
|
|
476
|
+
'archive.confirm.desc': '“{title}” todavía tiene trabajo en progreso. Archivarlo lo detiene primero; puedes restaurar la sesión más tarde desde el filtro “Todas las conversaciones (mostrar archivadas)” en la barra lateral, y el trabajo detenido no se reanudará por sí solo.',
|
|
477
|
+
'archive.confirm.pending': 'Deteniendo y archivando…',
|
|
478
|
+
'archive.confirm.action': 'Detener y archivar',
|
|
479
|
+
'archive.confirm.activity': 'Trabajo que será detenido',
|
|
480
|
+
'archive.confirm.turn': 'El turno en curso',
|
|
481
|
+
'archive.confirm.subagents.one': '{n} ejecutando subagente: {names}',
|
|
482
|
+
'archive.confirm.subagents.other': '{n} ejecutando subagentes: {names}',
|
|
483
|
+
'archive.confirm.jobs.one': 'Trabajo en segundo plano {n}: {names}',
|
|
484
|
+
'archive.confirm.jobs.other': 'Trabajos en segundo plano {n}: {names}',
|
|
485
|
+
'archive.confirm.schedules.one': 'Recordatorio programado {n}: {names}',
|
|
486
|
+
'archive.confirm.schedules.other': '{n} recordatorios programados: {names}',
|
|
487
|
+
'archive.confirm.other.one': '{n} otro elemento de trabajo ({kind})',
|
|
488
|
+
'archive.confirm.other.other': '{n} otros elementos de trabajo ({kind})',
|
|
489
|
+
'archive.confirm.listSeparator': ', ',
|
|
490
|
+
'time.now': 'ahora',
|
|
491
|
+
'time.minutes': '{n}min',
|
|
492
|
+
'time.hours': '{n}h',
|
|
493
|
+
'time.days': '{n}d',
|
|
494
|
+
'time.months': '{n}mo',
|
|
495
|
+
'time.years': '{n}y',
|
|
496
|
+
'time.ago': 'Hace {t}',
|
|
497
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
498
|
+
'hover.created': 'Creado {time}',
|
|
499
|
+
'hover.copied': 'Copiado',
|
|
500
|
+
'status.running': 'corriendo',
|
|
501
|
+
'status.idle': 'inactivo',
|
|
502
|
+
'detail.close': 'Cerrar detalles',
|
|
503
|
+
'detail.label': 'Detalles de la tarea',
|
|
504
|
+
'detail.name': 'Nombre de la tarea de automatización',
|
|
505
|
+
'detail.instruction': 'Instrucción de tarea de automatización',
|
|
506
|
+
'detail.missing': 'Tarea no disponible. Es posible que haya sido eliminado.',
|
|
507
|
+
'detail.nextRun': 'Próxima ejecución',
|
|
508
|
+
'statusFilter.label': 'Estado de la tarea',
|
|
509
|
+
'rule.repeat': 'repetir',
|
|
510
|
+
'host.target': 'Ejecutar en',
|
|
511
|
+
'host.currentConversation': 'Conversación vinculada actual',
|
|
512
|
+
'host.targetNewOnce': 'Crear una conversación y reutilizarla',
|
|
513
|
+
'host.targetNew': 'Nueva conversación en cada ejecución',
|
|
514
|
+
'delete.confirm': 'Confirmar eliminación',
|
|
515
|
+
'clear.confirm': 'Borrar tareas',
|
|
516
|
+
'error.schedule_delete_failed': 'No se pudo eliminar la tarea.',
|
|
517
|
+
'list.error': 'No se pudieron cargar las tareas.',
|
|
518
|
+
'status.active': 'Habilitado',
|
|
519
|
+
'status.paused': 'Pausada',
|
|
520
|
+
'status.ended': 'Finalizada',
|
|
521
|
+
'frequency.once': 'una vez',
|
|
522
|
+
'frequency.every': 'Cada {value} {unit}',
|
|
523
|
+
'frequency.daily': 'Diariamente en {time} ({timeZone})',
|
|
524
|
+
'frequency.weekly': 'Semanalmente en {weekdays} en {time} ({timeZone})',
|
|
525
|
+
'frequency.hostCustom': 'Personalizado',
|
|
526
|
+
'frequency.weekday.join': ', ',
|
|
527
|
+
'frequency.weekday.1': 'lun',
|
|
528
|
+
'frequency.weekday.2': 'mar',
|
|
529
|
+
'frequency.weekday.3': 'mié',
|
|
530
|
+
'frequency.weekday.4': 'jueves',
|
|
531
|
+
'frequency.weekday.5': 'viernes',
|
|
532
|
+
'frequency.weekday.6': 'sábado',
|
|
533
|
+
'frequency.weekday.7': 'sol',
|
|
534
|
+
'unit.day.one': 'dia',
|
|
535
|
+
'unit.day.other': 'dias',
|
|
536
|
+
'unit.hour.one': 'hora',
|
|
537
|
+
'unit.hour.other': 'horas',
|
|
538
|
+
'unit.minute.one': 'minuto',
|
|
539
|
+
'unit.minute.other': 'minutos',
|
|
540
|
+
'unit.second.one': 'segundo',
|
|
541
|
+
'unit.second.other': 'segundos',
|
|
542
|
+
},
|
|
543
|
+
fr: {
|
|
544
|
+
'tabs.residue': 'Résidus',
|
|
545
|
+
'selection.summary': '{n} sélectionnées · {size}',
|
|
546
|
+
'selection.summaryCount': '{n} sélectionnées',
|
|
547
|
+
'search.placeholder': 'Rechercher {section}',
|
|
548
|
+
'confirm.purge.description': 'Cette action est irréversible',
|
|
549
|
+
'archive.scheduleDeletion': 'Les tâches automatiques actives destinées à cette session et leur historique enregistré seront supprimés.',
|
|
550
|
+
'error.notArchived': 'Seules les sessions archivées peuvent être supprimées.',
|
|
551
|
+
'error.workspaceProtected': 'Espace de travail protégé.',
|
|
552
|
+
'protection.label': 'protégée',
|
|
553
|
+
'reference.schedule': 'Liée à une tâche planifiée.',
|
|
554
|
+
'residue.orphanTask': 'La session liée n\'est pas disponible.',
|
|
555
|
+
'residue.registeredCache': 'Une entrée d’espace de travail existe aussi pour cette session.',
|
|
556
|
+
'residue.orphanCache': 'cache orpheline',
|
|
557
|
+
'residue.ghostRegistry': 'entrée fantôme',
|
|
558
|
+
'residue.sessionDirectory': 'répertoire coquille',
|
|
559
|
+
'residue.emptyProject': 'répertoire de projet vide',
|
|
560
|
+
'confirm.tasks.description': 'Les tâches sélectionnées et leur historique enregistré seront supprimés',
|
|
561
|
+
'error.schedule_changed': 'La tâche a changé ; actualisez et réessayez',
|
|
562
|
+
'error.session_resident': 'La session est toujours chargée dans cette instance de DSH ; redémarrez DSH pour la supprimer',
|
|
563
|
+
'error.purge_busy': 'Nettoyage de la session en cours ; réessayez plus tard',
|
|
564
|
+
'error.workspace_unavailable': 'Impossible de vérifier les inscriptions de l’espace de travail',
|
|
565
|
+
'error.workspace_filtered': 'D’autres inscriptions masquées empêchent la suppression individuelle',
|
|
566
|
+
'error.unsupported_storage': 'Impossible de localiser le journal de session',
|
|
567
|
+
'error.historical_format': 'Migrez le journal avant de le supprimer',
|
|
568
|
+
'error.historical_parent': 'Ouvrez d’abord la session parente pour terminer la migration',
|
|
569
|
+
'error.unsafe_path': 'Impossible de vérifier le chemin du fichier',
|
|
570
|
+
'error.unknown_artifact': 'Le dossier de session contient des fichiers inconnus',
|
|
571
|
+
'error.session_changed': 'La session a changé ; réessayez',
|
|
572
|
+
'error.cache_unavailable': 'Le service de cache de projection est indisponible',
|
|
573
|
+
'error.residue_changed': 'Le résidu a changé ; actualisez et réessayez',
|
|
574
|
+
'error.internal': 'Erreur interne. Réessayez.',
|
|
575
|
+
'error.bad_request': 'Requête non valide.',
|
|
576
|
+
'tabs.archived': 'Archivé',
|
|
577
|
+
'notice.archived': 'Archivé',
|
|
578
|
+
'error.sessionNotFound': 'Séance indisponible',
|
|
579
|
+
'error.referenceCheck': 'Impossible de charger les tâches.',
|
|
580
|
+
'error.residue_unavailable': 'Impossible de terminer l’action. Réessayez.',
|
|
581
|
+
'error.purge_failed': 'Impossible de terminer l’action. Réessayez.',
|
|
582
|
+
'error.residue_failed': 'Impossible de terminer l’action. Réessayez.',
|
|
583
|
+
'empty.residue': 'Aucun résultat',
|
|
584
|
+
'notice.failed': 'Échec du {count}',
|
|
585
|
+
'selection.selectAll': 'Tout sélectionner',
|
|
586
|
+
'selection.deselectAll': 'Tout désélectionner',
|
|
587
|
+
'confirm.purge.title': 'Supprimer {provider} ?',
|
|
588
|
+
'confirm.residue.title': 'Supprimer {provider} ?',
|
|
589
|
+
'hover.more': '{count} de plus',
|
|
590
|
+
'host.updateRequired': 'Redémarrez DSH pour appliquer le changement.',
|
|
591
|
+
'row.archived': 'Archivé',
|
|
592
|
+
'toast.archived': 'Séance archivée. Vous pouvez ',
|
|
593
|
+
'toast.stoppedAndArchived': 'Session arrêtée et archivée. Vous pouvez ',
|
|
594
|
+
'toast.archivedUndo': 'annuler',
|
|
595
|
+
'toast.archivedOr': ' ou ',
|
|
596
|
+
'session.new': 'Nouvelle séance',
|
|
597
|
+
'group.ungrouped': 'Non groupé',
|
|
598
|
+
'actions.archive': 'Archiver',
|
|
599
|
+
'actions.unarchive': 'Désarchiver',
|
|
600
|
+
'section.sessions': 'Séances',
|
|
601
|
+
'empty.noMatches': 'Aucune correspondance',
|
|
602
|
+
'empty.none': 'Aucune séance pour l\'instant',
|
|
603
|
+
'empty.noneArchived': 'Aucune session archivée pour l\'instant',
|
|
604
|
+
'archive.confirm.title': 'Arrêter et archiver cette session ?',
|
|
605
|
+
'archive.confirm.desc': '« {title} » a encore des travaux en cours. L\'archivage l\'arrête en premier ; vous pouvez restaurer la session plus tard à partir du filtre « Toutes les conversations (afficher les archives) » dans la barre latérale, et le travail arrêté ne reprendra pas de lui-même.',
|
|
606
|
+
'archive.confirm.pending': 'Arrêt et archivage…',
|
|
607
|
+
'archive.confirm.action': 'Arrêter et archiver',
|
|
608
|
+
'archive.confirm.activity': 'Travaux qui seront arrêtés',
|
|
609
|
+
'archive.confirm.turn': 'Le tour en cours',
|
|
610
|
+
'archive.confirm.subagents.one': 'Sous-agent en cours d\'exécution {n} : {names}',
|
|
611
|
+
'archive.confirm.subagents.other': '{n} exécutant des sous-agents : {names}',
|
|
612
|
+
'archive.confirm.jobs.one': 'Travail en arrière-plan {n} : {names}',
|
|
613
|
+
'archive.confirm.jobs.other': 'Travaux en arrière-plan {n} : {names}',
|
|
614
|
+
'archive.confirm.schedules.one': 'Rappel programmé {n} : {names}',
|
|
615
|
+
'archive.confirm.schedules.other': 'Rappels programmés {n} : {names}',
|
|
616
|
+
'archive.confirm.other.one': '{n} autre élément de travail ({kind})',
|
|
617
|
+
'archive.confirm.other.other': '{n} autres éléments de travail ({kind})',
|
|
618
|
+
'archive.confirm.listSeparator': ', ',
|
|
619
|
+
'time.now': 'maintenant',
|
|
620
|
+
'time.minutes': '{n}min',
|
|
621
|
+
'time.hours': '{n}h',
|
|
622
|
+
'time.days': '{n}d',
|
|
623
|
+
'time.months': '{n}mo',
|
|
624
|
+
'time.years': '{n}y',
|
|
625
|
+
'time.ago': 'Il y a {t}',
|
|
626
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
627
|
+
'hover.created': 'Créé {time}',
|
|
628
|
+
'hover.copied': 'Copié',
|
|
629
|
+
'status.running': 'Courir',
|
|
630
|
+
'status.idle': 'Inactif',
|
|
631
|
+
'detail.close': 'Fermer les détails',
|
|
632
|
+
'detail.label': 'Détails de la tâche',
|
|
633
|
+
'detail.name': 'Nom de la tâche d\'automatisation',
|
|
634
|
+
'detail.instruction': 'Instruction de tâche d\'automatisation',
|
|
635
|
+
'detail.missing': 'Tâche indisponible. Il a peut-être été supprimé.',
|
|
636
|
+
'detail.nextRun': 'Prochaine exécution',
|
|
637
|
+
'statusFilter.label': 'Statut de la tâche',
|
|
638
|
+
'rule.repeat': 'Répéter',
|
|
639
|
+
'host.target': 'Exécuter dans',
|
|
640
|
+
'host.currentConversation': 'Conversation liée actuelle',
|
|
641
|
+
'host.targetNewOnce': 'Créer une conversation et la réutiliser',
|
|
642
|
+
'host.targetNew': 'Nouvelle conversation à chaque exécution',
|
|
643
|
+
'delete.confirm': 'Confirmer la suppression',
|
|
644
|
+
'clear.confirm': 'Effacer les tâches',
|
|
645
|
+
'error.schedule_delete_failed': 'Impossible de supprimer la tâche.',
|
|
646
|
+
'list.error': 'Impossible de charger les tâches.',
|
|
647
|
+
'status.active': 'Activé',
|
|
648
|
+
'status.paused': 'Suspendue',
|
|
649
|
+
'status.ended': 'Terminée',
|
|
650
|
+
'frequency.once': 'Une fois',
|
|
651
|
+
'frequency.every': 'Chaque {value} {unit}',
|
|
652
|
+
'frequency.daily': 'Tous les jours à {time} ({timeZone})',
|
|
653
|
+
'frequency.weekly': 'Hebdomadaire sur {weekdays} à {time} ({timeZone})',
|
|
654
|
+
'frequency.hostCustom': 'Personnalisé',
|
|
655
|
+
'frequency.weekday.join': ', ',
|
|
656
|
+
'frequency.weekday.1': 'lundi',
|
|
657
|
+
'frequency.weekday.2': 'mar.',
|
|
658
|
+
'frequency.weekday.3': 'mer',
|
|
659
|
+
'frequency.weekday.4': 'jeu.',
|
|
660
|
+
'frequency.weekday.5': 'vendredi',
|
|
661
|
+
'frequency.weekday.6': 'Samedi',
|
|
662
|
+
'frequency.weekday.7': 'Soleil',
|
|
663
|
+
'unit.day.one': 'jour',
|
|
664
|
+
'unit.day.other': 'jours',
|
|
665
|
+
'unit.hour.one': 'heure',
|
|
666
|
+
'unit.hour.other': 'heures',
|
|
667
|
+
'unit.minute.one': 'minute',
|
|
668
|
+
'unit.minute.other': 'minutes',
|
|
669
|
+
'unit.second.one': 'seconde',
|
|
670
|
+
'unit.second.other': 'secondes',
|
|
671
|
+
},
|
|
672
|
+
de: {
|
|
673
|
+
'tabs.residue': 'Rückstände',
|
|
674
|
+
'selection.summary': '{n} ausgewählt · {size}',
|
|
675
|
+
'selection.summaryCount': '{n} ausgewählt',
|
|
676
|
+
'search.placeholder': '{section} suchen',
|
|
677
|
+
'confirm.purge.description': 'Dies kann nicht rückgängig gemacht werden',
|
|
678
|
+
'archive.scheduleDeletion': 'Aktive automatisierte Aufgaben für diese Sitzung und ihre gespeicherten Ausführungsprotokolle werden gelöscht.',
|
|
679
|
+
'error.notArchived': 'Nur archivierte Sitzungen können gelöscht werden.',
|
|
680
|
+
'error.workspaceProtected': 'Geschützter Arbeitsbereich.',
|
|
681
|
+
'protection.label': 'geschützt',
|
|
682
|
+
'reference.schedule': 'Mit einer geplanten Aufgabe verknüpft.',
|
|
683
|
+
'residue.orphanTask': 'Die verknüpfte Sitzung ist nicht verfügbar.',
|
|
684
|
+
'residue.registeredCache': 'Für diese Sitzungs-ID besteht auch ein Arbeitsbereichseintrag.',
|
|
685
|
+
'residue.orphanCache': 'verwaister Cache',
|
|
686
|
+
'residue.ghostRegistry': 'Geister-Eintrag',
|
|
687
|
+
'residue.sessionDirectory': 'Hüllen-Verzeichnis',
|
|
688
|
+
'residue.emptyProject': 'leeres Projektverzeichnis',
|
|
689
|
+
'confirm.tasks.description': 'Ausgewählte Aufgaben und gespeicherte Ausführungen werden gelöscht',
|
|
690
|
+
'error.schedule_changed': 'Aufgabe geändert; aktualisieren und erneut versuchen',
|
|
691
|
+
'error.session_resident': 'Die Sitzung ist noch in dieser DSH-Instanz geladen; starten Sie DSH neu, um sie zu löschen',
|
|
692
|
+
'error.purge_busy': 'Sitzung wird bereinigt; später erneut versuchen',
|
|
693
|
+
'error.workspace_unavailable': 'Arbeitsbereichseinträge können nicht geprüft werden',
|
|
694
|
+
'error.workspace_filtered': 'Andere verborgene Einträge verhindern das einzelne Entfernen',
|
|
695
|
+
'error.unsupported_storage': 'Speicherort des Sitzungsprotokolls nicht ermittelbar',
|
|
696
|
+
'error.historical_format': 'Sitzungsprotokoll vor dem Löschen migrieren',
|
|
697
|
+
'error.historical_parent': 'Zuerst die übergeordnete Sitzung zur Migration öffnen',
|
|
698
|
+
'error.unsafe_path': 'Dateipfad kann nicht überprüft werden',
|
|
699
|
+
'error.unknown_artifact': 'Sitzungsverzeichnis enthält unbekannte Dateien',
|
|
700
|
+
'error.session_changed': 'Sitzungsstatus geändert; erneut versuchen',
|
|
701
|
+
'error.cache_unavailable': 'Projektions-Cache-Dienst nicht verfügbar',
|
|
702
|
+
'error.residue_changed': 'Rückstand geändert; aktualisieren und erneut versuchen',
|
|
703
|
+
'error.internal': 'Interner Fehler. Versuchen Sie es erneut.',
|
|
704
|
+
'error.bad_request': 'Ungültige Anfrage.',
|
|
705
|
+
'tabs.archived': 'Archiviert',
|
|
706
|
+
'notice.archived': 'Archiviert',
|
|
707
|
+
'error.sessionNotFound': 'Sitzung nicht verfügbar',
|
|
708
|
+
'error.referenceCheck': 'Aufgaben konnten nicht geladen werden.',
|
|
709
|
+
'error.residue_unavailable': 'Die Aktion konnte nicht abgeschlossen werden. Versuchen Sie es erneut.',
|
|
710
|
+
'error.purge_failed': 'Die Aktion konnte nicht abgeschlossen werden. Versuchen Sie es erneut.',
|
|
711
|
+
'error.residue_failed': 'Die Aktion konnte nicht abgeschlossen werden. Versuchen Sie es erneut.',
|
|
712
|
+
'empty.residue': 'Keine Ergebnisse',
|
|
713
|
+
'notice.failed': 'Fehlgeschlagen {count}',
|
|
714
|
+
'selection.selectAll': 'Alles auswählen',
|
|
715
|
+
'selection.deselectAll': 'Alle abwählen',
|
|
716
|
+
'confirm.purge.title': '{provider} löschen?',
|
|
717
|
+
'confirm.residue.title': '{provider} löschen?',
|
|
718
|
+
'hover.more': '{count} weitere',
|
|
719
|
+
'host.updateRequired': 'Starten Sie DSH neu, um die Änderung anzuwenden.',
|
|
720
|
+
'row.archived': 'Archiviert',
|
|
721
|
+
'toast.archived': 'Sitzung archiviert. Du kannst ',
|
|
722
|
+
'toast.stoppedAndArchived': 'Sitzung gestoppt und archiviert. Du kannst ',
|
|
723
|
+
'toast.archivedUndo': 'rückgängig machen',
|
|
724
|
+
'toast.archivedOr': ' oder ',
|
|
725
|
+
'session.new': 'Neue Sitzung',
|
|
726
|
+
'group.ungrouped': 'Nicht gruppiert',
|
|
727
|
+
'actions.archive': 'Archiv',
|
|
728
|
+
'actions.unarchive': 'Dearchivieren',
|
|
729
|
+
'section.sessions': 'Sitzungen',
|
|
730
|
+
'empty.noMatches': 'Keine Übereinstimmungen',
|
|
731
|
+
'empty.none': 'Noch keine Sitzungen',
|
|
732
|
+
'empty.noneArchived': 'Noch keine archivierten Sitzungen',
|
|
733
|
+
'archive.confirm.title': 'Diese Sitzung stoppen und archivieren?',
|
|
734
|
+
'archive.confirm.desc': '„{title}“ ist noch in Arbeit. Die Archivierung stoppt es zunächst; Sie können die Sitzung später über den Filter „Alle Konversationen (archivierte anzeigen)“ in der Seitenleiste wiederherstellen, und die angehaltene Arbeit wird nicht von alleine fortgesetzt.',
|
|
735
|
+
'archive.confirm.pending': 'Stoppen und archivieren…',
|
|
736
|
+
'archive.confirm.action': 'Stoppen und archivieren',
|
|
737
|
+
'archive.confirm.activity': 'Arbeiten, die gestoppt werden',
|
|
738
|
+
'archive.confirm.turn': 'Die laufende Runde',
|
|
739
|
+
'archive.confirm.subagents.one': '{n}, laufender Subagent: {names}',
|
|
740
|
+
'archive.confirm.subagents.other': '{n}, auf dem Subagenten ausgeführt werden: {names}',
|
|
741
|
+
'archive.confirm.jobs.one': '{n} Hintergrundjob: {names}',
|
|
742
|
+
'archive.confirm.jobs.other': '{n} Hintergrundjobs: {names}',
|
|
743
|
+
'archive.confirm.schedules.one': '{n} geplante Erinnerung: {names}',
|
|
744
|
+
'archive.confirm.schedules.other': '{n} geplante Erinnerungen: {names}',
|
|
745
|
+
'archive.confirm.other.one': '{n} sonstiger Arbeitsgegenstand ({kind})',
|
|
746
|
+
'archive.confirm.other.other': '{n} sonstige Arbeiten ({kind})',
|
|
747
|
+
'archive.confirm.listSeparator': ', ',
|
|
748
|
+
'time.now': 'jetzt',
|
|
749
|
+
'time.minutes': '{n}min',
|
|
750
|
+
'time.hours': '{n}h',
|
|
751
|
+
'time.days': '{n}d',
|
|
752
|
+
'time.months': '{n}mo',
|
|
753
|
+
'time.years': '{n}y',
|
|
754
|
+
'time.ago': 'Vor {t}',
|
|
755
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
756
|
+
'hover.created': 'Erstellt {time}',
|
|
757
|
+
'hover.copied': 'Kopiert',
|
|
758
|
+
'status.running': 'Laufen',
|
|
759
|
+
'status.idle': 'Leerlauf',
|
|
760
|
+
'detail.close': 'Details schließen',
|
|
761
|
+
'detail.label': 'Aufgabendetails',
|
|
762
|
+
'detail.name': 'Name der Automatisierungsaufgabe',
|
|
763
|
+
'detail.instruction': 'Anleitung zur Automatisierungsaufgabe',
|
|
764
|
+
'detail.missing': 'Aufgabe nicht verfügbar. Möglicherweise wurde es gelöscht.',
|
|
765
|
+
'detail.nextRun': 'Nächster Lauf',
|
|
766
|
+
'statusFilter.label': 'Aufgabenstatus',
|
|
767
|
+
'rule.repeat': 'Wiederholen',
|
|
768
|
+
'host.target': 'Ausführen in',
|
|
769
|
+
'host.currentConversation': 'Aktuell verknüpfte Unterhaltung',
|
|
770
|
+
'host.targetNewOnce': 'Eine Unterhaltung erstellen und wiederverwenden',
|
|
771
|
+
'host.targetNew': 'Neue Unterhaltung bei jeder Ausführung',
|
|
772
|
+
'delete.confirm': 'Bestätigen Sie den Löschvorgang',
|
|
773
|
+
'clear.confirm': 'Aufgaben löschen',
|
|
774
|
+
'error.schedule_delete_failed': 'Die Aufgabe konnte nicht gelöscht werden.',
|
|
775
|
+
'list.error': 'Aufgaben konnten nicht geladen werden.',
|
|
776
|
+
'status.active': 'Aktiviert',
|
|
777
|
+
'status.paused': 'Pausiert',
|
|
778
|
+
'status.ended': 'Beendet',
|
|
779
|
+
'frequency.once': 'Einmal',
|
|
780
|
+
'frequency.every': 'Jeder {value} {unit}',
|
|
781
|
+
'frequency.daily': 'Täglich um {time} ({timeZone})',
|
|
782
|
+
'frequency.weekly': 'Wöchentlich auf {weekdays} um {time} ({timeZone})',
|
|
783
|
+
'frequency.hostCustom': 'Benutzerdefiniert',
|
|
784
|
+
'frequency.weekday.join': ', ',
|
|
785
|
+
'frequency.weekday.1': 'Mo',
|
|
786
|
+
'frequency.weekday.2': 'Di',
|
|
787
|
+
'frequency.weekday.3': 'Mi',
|
|
788
|
+
'frequency.weekday.4': 'Do',
|
|
789
|
+
'frequency.weekday.5': 'Fr',
|
|
790
|
+
'frequency.weekday.6': 'Sa',
|
|
791
|
+
'frequency.weekday.7': 'Sonne',
|
|
792
|
+
'unit.day.one': 'Tag',
|
|
793
|
+
'unit.day.other': 'Tage',
|
|
794
|
+
'unit.hour.one': 'Stunde',
|
|
795
|
+
'unit.hour.other': 'Stunden',
|
|
796
|
+
'unit.minute.one': 'Minute',
|
|
797
|
+
'unit.minute.other': 'Minuten',
|
|
798
|
+
'unit.second.one': 'zweitens',
|
|
799
|
+
'unit.second.other': 'Sekunden',
|
|
800
|
+
},
|
|
801
|
+
ru: {
|
|
802
|
+
'tabs.residue': 'Остатки',
|
|
803
|
+
'selection.summary': 'выбрано {n} · {size}',
|
|
804
|
+
'selection.summaryCount': 'выбрано {n}',
|
|
805
|
+
'search.placeholder': 'Поиск: {section}',
|
|
806
|
+
'confirm.purge.description': 'Это действие нельзя отменить',
|
|
807
|
+
'archive.scheduleDeletion': 'Активные автоматические задачи для этой сессии и их сохранённая история будут удалены.',
|
|
808
|
+
'error.notArchived': 'Удалять можно только архивированные сессии.',
|
|
809
|
+
'error.workspaceProtected': 'Рабочее пространство защищено.',
|
|
810
|
+
'protection.label': 'защищена',
|
|
811
|
+
'reference.schedule': 'Связана с запланированной задачей.',
|
|
812
|
+
'residue.orphanTask': 'Связанный сеанс недоступен.',
|
|
813
|
+
'residue.registeredCache': 'Для этого сеанса также существует запись рабочего пространства.',
|
|
814
|
+
'residue.orphanCache': 'осиротевший кэш',
|
|
815
|
+
'residue.ghostRegistry': 'запись-призрак',
|
|
816
|
+
'residue.sessionDirectory': 'каталог-оболочка',
|
|
817
|
+
'residue.emptyProject': 'пустой каталог проекта',
|
|
818
|
+
'confirm.tasks.description': 'Выбранные задачи и сохранённая история будут удалены',
|
|
819
|
+
'error.schedule_changed': 'Задача изменилась; обновите данные и повторите попытку',
|
|
820
|
+
'error.session_resident': 'Сеанс всё ещё загружен в этом экземпляре DSH; перезапустите DSH, чтобы удалить его',
|
|
821
|
+
'error.purge_busy': 'Идёт очистка сеанса; повторите попытку позже',
|
|
822
|
+
'error.workspace_unavailable': 'Не удалось проверить записи рабочего пространства',
|
|
823
|
+
'error.workspace_filtered': 'Другие скрытые записи мешают удалить эту запись отдельно',
|
|
824
|
+
'error.unsupported_storage': 'Не удалось определить расположение журнала сеанса',
|
|
825
|
+
'error.historical_format': 'Перед удалением необходимо перенести журнал сеанса',
|
|
826
|
+
'error.historical_parent': 'Сначала откройте родительский сеанс для переноса',
|
|
827
|
+
'error.unsafe_path': 'Не удалось проверить путь к файлу',
|
|
828
|
+
'error.unknown_artifact': 'Каталог сеанса содержит неизвестные файлы',
|
|
829
|
+
'error.session_changed': 'Состояние сеанса изменилось; повторите попытку',
|
|
830
|
+
'error.cache_unavailable': 'Служба кэша проекций недоступна',
|
|
831
|
+
'error.residue_changed': 'Остаточные данные изменились; обновите и повторите попытку',
|
|
832
|
+
'error.internal': 'Внутренняя ошибка. Повторите попытку.',
|
|
833
|
+
'error.bad_request': 'Недопустимый запрос.',
|
|
834
|
+
'tabs.archived': 'В архиве',
|
|
835
|
+
'notice.archived': 'В архиве',
|
|
836
|
+
'error.sessionNotFound': 'Сеанс недоступен',
|
|
837
|
+
'error.referenceCheck': 'Не удалось загрузить задачи.',
|
|
838
|
+
'error.residue_unavailable': 'Не удалось выполнить действие. Повторите попытку.',
|
|
839
|
+
'error.purge_failed': 'Не удалось выполнить действие. Повторите попытку.',
|
|
840
|
+
'error.residue_failed': 'Не удалось выполнить действие. Повторите попытку.',
|
|
841
|
+
'empty.residue': 'Нет результатов',
|
|
842
|
+
'notice.failed': 'Ошибка {count}',
|
|
843
|
+
'selection.selectAll': 'Выбрать все',
|
|
844
|
+
'selection.deselectAll': 'Отменить выбор всех',
|
|
845
|
+
'confirm.purge.title': 'Удалить {provider}?',
|
|
846
|
+
'confirm.residue.title': 'Удалить {provider}?',
|
|
847
|
+
'hover.more': 'Ещё {count}',
|
|
848
|
+
'host.updateRequired': 'Перезапустите DSH, чтобы применить изменение.',
|
|
849
|
+
'row.archived': 'В архиве',
|
|
850
|
+
'toast.archived': 'Сессия заархивирована. Вы можете ',
|
|
851
|
+
'toast.stoppedAndArchived': 'Сеанс остановлен и заархивирован. Вы можете ',
|
|
852
|
+
'toast.archivedUndo': 'отменить',
|
|
853
|
+
'toast.archivedOr': ' или ',
|
|
854
|
+
'session.new': 'Новая сессия',
|
|
855
|
+
'group.ungrouped': 'Разгруппировано',
|
|
856
|
+
'actions.archive': 'Архив',
|
|
857
|
+
'actions.unarchive': 'Разархивировать',
|
|
858
|
+
'section.sessions': 'Сессии',
|
|
859
|
+
'empty.noMatches': 'Нет совпадений',
|
|
860
|
+
'empty.none': 'Сеансов пока нет',
|
|
861
|
+
'empty.noneArchived': 'Архивированных сессий пока нет',
|
|
862
|
+
'archive.confirm.title': 'Остановить и заархивировать этот сеанс?',
|
|
863
|
+
'archive.confirm.desc': 'Над «{title}» все еще ведется работа. Архивирование останавливает его первым; восстановить сессию можно позже из фильтра «Все разговоры (показать в архиве)» в боковой панели, при этом остановленная работа не возобновится сама по себе.',
|
|
864
|
+
'archive.confirm.pending': 'Остановка и архивирование…',
|
|
865
|
+
'archive.confirm.action': 'Остановить и заархивировать',
|
|
866
|
+
'archive.confirm.activity': 'Работа, которая будет остановлена',
|
|
867
|
+
'archive.confirm.turn': 'Текущий ход',
|
|
868
|
+
'archive.confirm.subagents.one': '{n} работающий субагент: {names}',
|
|
869
|
+
'archive.confirm.subagents.other': '{n} работающие субагенты: {names}',
|
|
870
|
+
'archive.confirm.jobs.one': '{n} фоновое задание: {names}',
|
|
871
|
+
'archive.confirm.jobs.other': '{n} фоновые задания: {names}',
|
|
872
|
+
'archive.confirm.schedules.one': 'Запланированное напоминание {n}: {names}',
|
|
873
|
+
'archive.confirm.schedules.other': 'Запланированные напоминания {n}: {names}',
|
|
874
|
+
'archive.confirm.other.one': '{n} другой элемент работы ({kind})',
|
|
875
|
+
'archive.confirm.other.other': '{n} прочие работы ({kind})',
|
|
876
|
+
'archive.confirm.listSeparator': ', ',
|
|
877
|
+
'time.now': 'сейчас',
|
|
878
|
+
'time.minutes': '{n}мин',
|
|
879
|
+
'time.hours': '{n}h',
|
|
880
|
+
'time.days': '{n}d',
|
|
881
|
+
'time.months': '{n}mo',
|
|
882
|
+
'time.years': '{n}y',
|
|
883
|
+
'time.ago': '{t} назад',
|
|
884
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
885
|
+
'hover.created': 'Создано {time}',
|
|
886
|
+
'hover.copied': 'Скопировано',
|
|
887
|
+
'status.running': 'Бег',
|
|
888
|
+
'status.idle': 'Простой',
|
|
889
|
+
'detail.close': 'Закрыть детали',
|
|
890
|
+
'detail.label': 'Подробности задачи',
|
|
891
|
+
'detail.name': 'Название задачи автоматизации',
|
|
892
|
+
'detail.instruction': 'Инструкция по задаче автоматизации',
|
|
893
|
+
'detail.missing': 'Задача недоступна. Возможно, оно было удалено.',
|
|
894
|
+
'detail.nextRun': 'Следующий запуск',
|
|
895
|
+
'statusFilter.label': 'Статус задачи',
|
|
896
|
+
'rule.repeat': 'Повторить',
|
|
897
|
+
'host.target': 'Запускать в',
|
|
898
|
+
'host.currentConversation': 'Текущая связанная беседа',
|
|
899
|
+
'host.targetNewOnce': 'Создать беседу и использовать её повторно',
|
|
900
|
+
'host.targetNew': 'Новой беседе при каждом запуске',
|
|
901
|
+
'delete.confirm': 'Подтвердить удаление',
|
|
902
|
+
'clear.confirm': 'Удалить задачи',
|
|
903
|
+
'error.schedule_delete_failed': 'Не удалось удалить задачу.',
|
|
904
|
+
'list.error': 'Не удалось загрузить задачи.',
|
|
905
|
+
'status.active': 'Включено',
|
|
906
|
+
'status.paused': 'Приостановлена',
|
|
907
|
+
'status.ended': 'Завершена',
|
|
908
|
+
'frequency.once': 'Однажды',
|
|
909
|
+
'frequency.every': 'Каждый {value} {unit}',
|
|
910
|
+
'frequency.daily': 'Ежедневно по адресу {time} ({timeZone})',
|
|
911
|
+
'frequency.weekly': 'Еженедельно на {weekdays} по адресу {time} ({timeZone})',
|
|
912
|
+
'frequency.hostCustom': 'Произвольно',
|
|
913
|
+
'frequency.weekday.join': ', ',
|
|
914
|
+
'frequency.weekday.1': 'Пн.',
|
|
915
|
+
'frequency.weekday.2': 'Вт',
|
|
916
|
+
'frequency.weekday.3': 'ср.',
|
|
917
|
+
'frequency.weekday.4': 'Чт',
|
|
918
|
+
'frequency.weekday.5': 'Пт',
|
|
919
|
+
'frequency.weekday.6': 'Суббота',
|
|
920
|
+
'frequency.weekday.7': 'Солнце',
|
|
921
|
+
'unit.day.one': 'день',
|
|
922
|
+
'unit.day.other': 'дни',
|
|
923
|
+
'unit.hour.one': 'час',
|
|
924
|
+
'unit.hour.other': 'часы',
|
|
925
|
+
'unit.minute.one': 'минута',
|
|
926
|
+
'unit.minute.other': 'минуты',
|
|
927
|
+
'unit.second.one': 'второй',
|
|
928
|
+
'unit.second.other': 'секунды',
|
|
929
|
+
},
|
|
930
|
+
pt: {
|
|
931
|
+
'tabs.residue': 'Resíduos',
|
|
932
|
+
'selection.summary': '{n} selecionadas · {size}',
|
|
933
|
+
'selection.summaryCount': '{n} selecionadas',
|
|
934
|
+
'search.placeholder': 'Buscar {section}',
|
|
935
|
+
'confirm.purge.description': 'Esta ação não pode ser desfeita',
|
|
936
|
+
'archive.scheduleDeletion': 'As tarefas automáticas ativas destinadas a esta sessão e seu histórico de execução serão excluídos.',
|
|
937
|
+
'error.notArchived': 'Somente sessões arquivadas podem ser excluídas.',
|
|
938
|
+
'error.workspaceProtected': 'Espaço de trabalho protegido.',
|
|
939
|
+
'protection.label': 'protegida',
|
|
940
|
+
'reference.schedule': 'Associada a uma tarefa agendada.',
|
|
941
|
+
'residue.orphanTask': 'A sessão vinculada não está disponível.',
|
|
942
|
+
'residue.registeredCache': 'Também há um registro de espaço de trabalho para esta sessão.',
|
|
943
|
+
'residue.orphanCache': 'cache órfã',
|
|
944
|
+
'residue.ghostRegistry': 'registro fantasma',
|
|
945
|
+
'residue.sessionDirectory': 'diretório casca',
|
|
946
|
+
'residue.emptyProject': 'diretório de projeto vazio',
|
|
947
|
+
'confirm.tasks.description': 'As tarefas selecionadas e seu histórico salvo serão excluídos',
|
|
948
|
+
'error.schedule_changed': 'A tarefa mudou; atualize e tente novamente',
|
|
949
|
+
'error.session_resident': 'A sessão ainda está carregada nesta instância do DSH; reinicie o DSH para excluí-la',
|
|
950
|
+
'error.purge_busy': 'Limpeza da sessão em andamento; tente novamente mais tarde',
|
|
951
|
+
'error.workspace_unavailable': 'Não foi possível verificar os registros do espaço de trabalho',
|
|
952
|
+
'error.workspace_filtered': 'Outros registros ocultos impedem a remoção individual',
|
|
953
|
+
'error.unsupported_storage': 'Não foi possível identificar a localização do log',
|
|
954
|
+
'error.historical_format': 'Migre o log da sessão antes de excluí-lo',
|
|
955
|
+
'error.historical_parent': 'Abra a sessão principal para concluir a migração',
|
|
956
|
+
'error.unsafe_path': 'Não foi possível verificar o caminho do arquivo',
|
|
957
|
+
'error.unknown_artifact': 'O diretório da sessão contém arquivos desconhecidos',
|
|
958
|
+
'error.session_changed': 'O estado da sessão mudou; tente novamente',
|
|
959
|
+
'error.cache_unavailable': 'O serviço de cache de projeção está indisponível',
|
|
960
|
+
'error.residue_changed': 'O resíduo mudou; atualize e tente novamente',
|
|
961
|
+
'error.internal': 'Erro interno. Tente novamente.',
|
|
962
|
+
'error.bad_request': 'Solicitação inválida.',
|
|
963
|
+
'tabs.archived': 'Arquivado',
|
|
964
|
+
'notice.archived': 'Arquivado',
|
|
965
|
+
'error.sessionNotFound': 'Sessão indisponível',
|
|
966
|
+
'error.referenceCheck': 'Não foi possível carregar tarefas.',
|
|
967
|
+
'error.residue_unavailable': 'Não foi possível concluir a ação. Tente novamente.',
|
|
968
|
+
'error.purge_failed': 'Não foi possível concluir a ação. Tente novamente.',
|
|
969
|
+
'error.residue_failed': 'Não foi possível concluir a ação. Tente novamente.',
|
|
970
|
+
'empty.residue': 'Nenhum resultado',
|
|
971
|
+
'notice.failed': 'Falha {count}',
|
|
972
|
+
'selection.selectAll': 'Selecionar tudo',
|
|
973
|
+
'selection.deselectAll': 'Desmarcar tudo',
|
|
974
|
+
'confirm.purge.title': 'Excluir {provider}?',
|
|
975
|
+
'confirm.residue.title': 'Excluir {provider}?',
|
|
976
|
+
'hover.more': 'mais {count}',
|
|
977
|
+
'host.updateRequired': 'Reinicie o DSH para aplicar a alteração.',
|
|
978
|
+
'row.archived': 'Arquivado',
|
|
979
|
+
'toast.archived': 'Sessão arquivada. Você pode ',
|
|
980
|
+
'toast.stoppedAndArchived': 'Sessão interrompida e arquivada. Você pode ',
|
|
981
|
+
'toast.archivedUndo': 'desfazer',
|
|
982
|
+
'toast.archivedOr': ' ou ',
|
|
983
|
+
'session.new': 'Nova sessão',
|
|
984
|
+
'group.ungrouped': 'Desagrupado',
|
|
985
|
+
'actions.archive': 'Arquivo',
|
|
986
|
+
'actions.unarchive': 'Desarquivar',
|
|
987
|
+
'section.sessions': 'Sessões',
|
|
988
|
+
'empty.noMatches': 'Nenhuma correspondência',
|
|
989
|
+
'empty.none': 'Ainda não há sessões',
|
|
990
|
+
'empty.noneArchived': 'Ainda não há sessões arquivadas',
|
|
991
|
+
'archive.confirm.title': 'Parar e arquivar esta sessão?',
|
|
992
|
+
'archive.confirm.desc': '“{title}” ainda tem trabalho em andamento. O arquivamento interrompe primeiro; você pode restaurar a sessão posteriormente a partir do filtro “Todas as conversas (mostrar arquivadas)” na barra lateral, e o trabalho interrompido não será retomado por conta própria.',
|
|
993
|
+
'archive.confirm.pending': 'Parando e arquivando…',
|
|
994
|
+
'archive.confirm.action': 'Pare e arquive',
|
|
995
|
+
'archive.confirm.activity': 'Obra que será interrompida',
|
|
996
|
+
'archive.confirm.turn': 'O turno em andamento',
|
|
997
|
+
'archive.confirm.subagents.one': '{n} subagente em execução: {names}',
|
|
998
|
+
'archive.confirm.subagents.other': '{n} executando subagentes: {names}',
|
|
999
|
+
'archive.confirm.jobs.one': '{n} trabalho em segundo plano: {names}',
|
|
1000
|
+
'archive.confirm.jobs.other': '{n} trabalhos em segundo plano: {names}',
|
|
1001
|
+
'archive.confirm.schedules.one': '{n} lembrete programado: {names}',
|
|
1002
|
+
'archive.confirm.schedules.other': '{n} lembretes programados: {names}',
|
|
1003
|
+
'archive.confirm.other.one': '{n} outro item de trabalho ({kind})',
|
|
1004
|
+
'archive.confirm.other.other': '{n} outros itens de trabalho ({kind})',
|
|
1005
|
+
'archive.confirm.listSeparator': ', ',
|
|
1006
|
+
'time.now': 'agora',
|
|
1007
|
+
'time.minutes': '{n}min',
|
|
1008
|
+
'time.hours': '{n}h',
|
|
1009
|
+
'time.days': '{n}d',
|
|
1010
|
+
'time.months': '{n} mês',
|
|
1011
|
+
'time.years': '{n}s',
|
|
1012
|
+
'time.ago': '{t} atrás',
|
|
1013
|
+
'date.ymd': '{y}-{m}-{d}',
|
|
1014
|
+
'hover.created': 'Criado {time}',
|
|
1015
|
+
'hover.copied': 'Copiado',
|
|
1016
|
+
'status.running': 'Correndo',
|
|
1017
|
+
'status.idle': 'Inativo',
|
|
1018
|
+
'detail.close': 'Fechar detalhes',
|
|
1019
|
+
'detail.label': 'Detalhes da tarefa',
|
|
1020
|
+
'detail.name': 'Nome da tarefa de automação',
|
|
1021
|
+
'detail.instruction': 'Instrução de tarefa de automação',
|
|
1022
|
+
'detail.missing': 'Tarefa indisponível. Pode ter sido excluído.',
|
|
1023
|
+
'detail.nextRun': 'Próxima execução',
|
|
1024
|
+
'statusFilter.label': 'Status da tarefa',
|
|
1025
|
+
'rule.repeat': 'Repetir',
|
|
1026
|
+
'host.target': 'Executar em',
|
|
1027
|
+
'host.currentConversation': 'Conversa vinculada atual',
|
|
1028
|
+
'host.targetNewOnce': 'Criar uma conversa e reutilizá-la',
|
|
1029
|
+
'host.targetNew': 'Nova conversa a cada execução',
|
|
1030
|
+
'delete.confirm': 'Confirmar exclusão',
|
|
1031
|
+
'clear.confirm': 'Limpar tarefas',
|
|
1032
|
+
'error.schedule_delete_failed': 'Não foi possível excluir a tarefa.',
|
|
1033
|
+
'list.error': 'Não foi possível carregar tarefas.',
|
|
1034
|
+
'status.active': 'Habilitado',
|
|
1035
|
+
'status.paused': 'Pausada',
|
|
1036
|
+
'status.ended': 'Concluída',
|
|
1037
|
+
'frequency.once': 'Uma vez',
|
|
1038
|
+
'frequency.every': 'A cada {value} {unit}',
|
|
1039
|
+
'frequency.daily': 'Diariamente às {time} ({timeZone})',
|
|
1040
|
+
'frequency.weekly': 'Semanalmente em {weekdays} às {time} ({timeZone})',
|
|
1041
|
+
'frequency.hostCustom': 'Personalizado',
|
|
1042
|
+
'frequency.weekday.join': ', ',
|
|
1043
|
+
'frequency.weekday.1': 'segunda-feira',
|
|
1044
|
+
'frequency.weekday.2': 'Terça',
|
|
1045
|
+
'frequency.weekday.3': 'Quarta',
|
|
1046
|
+
'frequency.weekday.4': 'Qui',
|
|
1047
|
+
'frequency.weekday.5': 'Sexta-feira',
|
|
1048
|
+
'frequency.weekday.6': 'Sábado',
|
|
1049
|
+
'frequency.weekday.7': 'Sol',
|
|
1050
|
+
'unit.day.one': 'dia',
|
|
1051
|
+
'unit.day.other': 'dias',
|
|
1052
|
+
'unit.hour.one': 'hora',
|
|
1053
|
+
'unit.hour.other': 'horas',
|
|
1054
|
+
'unit.minute.one': 'minuto',
|
|
1055
|
+
'unit.minute.other': 'minutos',
|
|
1056
|
+
'unit.second.one': 'segundo',
|
|
1057
|
+
'unit.second.other': 'segundos',
|
|
1058
|
+
},
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
const fill = (template, params) => String(template ?? '').replace(/\{(\w+)\}/g, (_, k) => String(params?.[k] ?? ''));
|
|
1062
|
+
|
|
1063
|
+
const ERROR_KEYS = { session_not_archived: 'error.notArchived',
|
|
1064
|
+
session_not_found: 'error.sessionNotFound', protected_workspace: 'error.workspaceProtected', schedule_reference: 'reference.schedule',
|
|
1065
|
+
reference_check_failed: 'error.referenceCheck' };
|
|
1066
|
+
function errorText(error, t) {
|
|
1067
|
+
const message = String(error?.message ?? error ?? '');
|
|
1068
|
+
const embedded = /dsh-mop:([a-z_]+)/.exec(message);
|
|
1069
|
+
const code = embedded?.[1] || error?.code;
|
|
1070
|
+
const errorKey = `error.${code}`;
|
|
1071
|
+
const key = ERROR_KEYS[code] || (Object.hasOwn(dictionaries.en, errorKey) ? errorKey : null);
|
|
1072
|
+
const reason = code === 'already_archived' ? t('row.archived') : key ? t(key) : message;
|
|
1073
|
+
// Preserve diagnostics supplied by the host for failures without a
|
|
1074
|
+
// plugin-defined code, while translating the actionable heading.
|
|
1075
|
+
const diagnostic = ['purge_failed', 'residue_failed'].includes(code) ? error?.message : error?.detail;
|
|
1076
|
+
const detail = diagnostic ? `: ${diagnostic}` : '';
|
|
1077
|
+
const count = code === 'workspace_filtered' && Number.isInteger(error?.blockedCount) ? ` (${error.blockedCount})` : '';
|
|
1078
|
+
return reason + count + detail;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
function resultText(t, completed, successText, failures, detail) {
|
|
1082
|
+
const parts = [];
|
|
1083
|
+
if (completed > 0 || failures === 0) parts.push(successText);
|
|
1084
|
+
if (failures > 0) parts.push(`${fill(t('notice.failed', { n: failures, count: failures }), { n: failures, count: failures })}${detail ? `: ${detail}` : ''}`);
|
|
1085
|
+
return parts.join(' · ');
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
/** Use the same theme-managed sprite symbols as DSH's product icons. */
|
|
1089
|
+
function officialIcon(glyph, size, className) {
|
|
1090
|
+
const id = `dsw-icon-${glyph}-regular`;
|
|
1091
|
+
return h('svg', { width: size, height: size, className, 'data-icon': id, 'aria-hidden': true },
|
|
1092
|
+
h('use', { href: `#${id}` }));
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
function formatBytes(bytes) {
|
|
1096
|
+
if (typeof bytes !== 'number' || !Number.isFinite(bytes)) return '—';
|
|
1097
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
1098
|
+
const units = ['KB', 'MB', 'GB', 'TB'];
|
|
1099
|
+
let v = bytes / 1024, u = 0;
|
|
1100
|
+
while (v >= 1024 && u < units.length - 1) { v /= 1024; u += 1; }
|
|
1101
|
+
return `${v >= 100 ? Math.round(v) : v.toFixed(1)} ${units[u]}`;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
// Match the official workspace sidebar's compact time buckets and translations.
|
|
1105
|
+
function relativeTime(ms, t) {
|
|
1106
|
+
if (typeof ms !== 'number' || !Number.isFinite(ms)) return '';
|
|
1107
|
+
const diff = Math.max(0, Date.now() - ms);
|
|
1108
|
+
if (diff < 60000) return t('time.now');
|
|
1109
|
+
const [unit, interval] = diff < 3600000 ? ['minutes', 60000]
|
|
1110
|
+
: diff < 86400000 ? ['hours', 3600000]
|
|
1111
|
+
: diff < 30 * 86400000 ? ['days', 86400000]
|
|
1112
|
+
: diff < 365 * 86400000 ? ['months', 30 * 86400000]
|
|
1113
|
+
: ['years', 365 * 86400000];
|
|
1114
|
+
return t(`time.${unit}`, { n: Math.floor(diff / interval) });
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
function hoverTime(ms, t) {
|
|
1118
|
+
if (!(ms > 0)) return '';
|
|
1119
|
+
const time = relativeTime(ms, t);
|
|
1120
|
+
return Math.max(0, Date.now() - ms) < 60000 ? time : t('time.ago', { t: time });
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
// Sort by the same timestamp shown in each row. A blank session has no
|
|
1124
|
+
// displayed time, even if its backing record has a timestamp.
|
|
1125
|
+
function sessionTime(item) {
|
|
1126
|
+
if (item.blank === true) return 0;
|
|
1127
|
+
if (Number.isFinite(item.updatedAt) && item.updatedAt > 0) return item.updatedAt;
|
|
1128
|
+
return Number.isFinite(item.mtimeMs) && item.mtimeMs > 0 ? item.mtimeMs : 0;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
function residueTime(item) {
|
|
1132
|
+
return Number.isFinite(item.mtimeMs) && item.mtimeMs > 0 ? item.mtimeMs : 0;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
function sortByDisplayedTime(items, timeOf) {
|
|
1136
|
+
return [...items].sort((a, b) => {
|
|
1137
|
+
const left = timeOf(a), right = timeOf(b);
|
|
1138
|
+
if (!left || !right) return left ? 1 : right ? -1 : 0;
|
|
1139
|
+
return right - left;
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
function workspaceCreatedLabel(createdAt, t) {
|
|
1144
|
+
const d = new Date(createdAt);
|
|
1145
|
+
if (createdAt == null || !Number.isFinite(d.getTime())) return '';
|
|
1146
|
+
const date = t('date.ymd', { y: d.getFullYear(), m: d.getMonth() + 1, d: d.getDate() });
|
|
1147
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
1148
|
+
return t('hover.created', { time: `${date} ${pad(d.getHours())}:${pad(d.getMinutes())}` });
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// Same display-only POSIX home abbreviation used by DSH workspace rows.
|
|
1152
|
+
function displayPath(path, home) {
|
|
1153
|
+
if (!path || !home || /^[A-Za-z]:[/\\]|^\\\\/.test(path) || /^[A-Za-z]:[/\\]|^\\\\/.test(home)) return path;
|
|
1154
|
+
const root = home.replace(/\/+$/, '');
|
|
1155
|
+
if (!root) return path;
|
|
1156
|
+
if (path.replace(/\/+$/, '') === root) return '~';
|
|
1157
|
+
return path.startsWith(`${root}/`) ? `~${path.slice(root.length)}` : path;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
function cardContent({ title, path, time, statuses, archived, reason, tasks = [], onOpenTask }, t) {
|
|
1161
|
+
const active = tasks.filter((task) => task.status === 'active').sort((a, b) => {
|
|
1162
|
+
const next = (task) => Math.max(Date.parse(task.record?.scheduledAt) || 0, Date.parse(task.record?.deliveryFloorEndsAt) || 0);
|
|
1163
|
+
return next(a) - next(b);
|
|
1164
|
+
});
|
|
1165
|
+
const visibleTasks = [...active.slice(0, 2), ...tasks.filter((task) => task.status !== 'active')];
|
|
1166
|
+
return h('div', { className: 'dsh-mop-hover-content' },
|
|
1167
|
+
h('div', { className: 'dsh-mop-hover-title' }, title),
|
|
1168
|
+
path ? h('div', { className: 'dsh-mop-hover-path' }, path) : null,
|
|
1169
|
+
time ? h('div', { className: 'dsh-mop-hover-time' }, time) : null,
|
|
1170
|
+
...visibleTasks.map((task, index) => h('button', { key: task.id || index, type: 'button', className: 'dsh-mop-hover-status dsh-mop-hover-archived dsh-mop-hover-task-button',
|
|
1171
|
+
disabled: !task.id, onClick: (event) => { event.stopPropagation(); return onOpenTask?.(task.id); },
|
|
1172
|
+
onKeyDown: (event) => { event.stopPropagation(); } },
|
|
1173
|
+
h(React.Fragment, null, officialIcon('clock-outline', 14), h('span', null, task.title || task.id),
|
|
1174
|
+
task.showStatus || task.status === 'paused' || task.status === 'ended' ? h('span', null, t(`status.${task.status}`)) : null))),
|
|
1175
|
+
active.length > 2 ? h('div', { className: 'dsh-mop-hover-time' }, t('hover.more', { count: active.length - 2 })) : null,
|
|
1176
|
+
...(statuses ?? []).map((entry) => h('div', { key: entry.key, className: 'dsh-mop-hover-status' },
|
|
1177
|
+
h(StateDot, { state: entry.state }), h('span', null, t(entry.key, entry.params)))),
|
|
1178
|
+
archived ? h('div', { className: 'dsh-mop-hover-status dsh-mop-hover-archived' },
|
|
1179
|
+
officialIcon('archive-outline', 14), h('span', null, t('row.archived'))) : null,
|
|
1180
|
+
reason ? h('div', { className: 'dsh-mop-hover-status' },
|
|
1181
|
+
officialIcon('shield-outline', 14), h('span', null, reason)) : null);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
function rowWithHover(key, row, content, t, copyText) {
|
|
1185
|
+
return h(HoverCard, {
|
|
1186
|
+
key, anchor: row, content, openDelayMs: 800, grouped: true,
|
|
1187
|
+
...(copyText ? { copyText, copyLabel: t('copy'), copiedLabel: t('hover.copied') } : {}),
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
// Mirrors the official sidebar: reveal only overflows > 8px at 0.03px/ms.
|
|
1192
|
+
const titleFrames = new WeakMap();
|
|
1193
|
+
function titleEnter(event) {
|
|
1194
|
+
if (event.pointerType === 'touch') return;
|
|
1195
|
+
const element = event.currentTarget.querySelector('.dsh-mop-title');
|
|
1196
|
+
if (!element || titleFrames.has(element)) return;
|
|
1197
|
+
const range = element.scrollWidth - element.clientWidth;
|
|
1198
|
+
if (range <= 8) return;
|
|
1199
|
+
const place = (left) => {
|
|
1200
|
+
element.scrollLeft = left;
|
|
1201
|
+
if (left > 0) element.dataset.scrolled = ''; else delete element.dataset.scrolled;
|
|
1202
|
+
if (left < range) element.dataset.clipped = ''; else delete element.dataset.clipped;
|
|
1203
|
+
};
|
|
1204
|
+
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) { place(range); return; }
|
|
1205
|
+
let previous, position = 0;
|
|
1206
|
+
const step = (now) => {
|
|
1207
|
+
if (!element.isConnected) { titleFrames.delete(element); return; }
|
|
1208
|
+
position += previous === undefined ? 0 : (now - previous) * 0.03;
|
|
1209
|
+
previous = now;
|
|
1210
|
+
place(Math.min(position, range));
|
|
1211
|
+
if (position < range) titleFrames.set(element, requestAnimationFrame(step));
|
|
1212
|
+
else titleFrames.delete(element);
|
|
1213
|
+
};
|
|
1214
|
+
titleFrames.set(element, requestAnimationFrame(step));
|
|
1215
|
+
}
|
|
1216
|
+
function titleLeave(event) {
|
|
1217
|
+
const element = event.currentTarget.querySelector('.dsh-mop-title');
|
|
1218
|
+
if (!element) return;
|
|
1219
|
+
if (titleFrames.has(element)) cancelAnimationFrame(titleFrames.get(element));
|
|
1220
|
+
titleFrames.delete(element);
|
|
1221
|
+
element.scrollLeft = 0;
|
|
1222
|
+
delete element.dataset.scrolled;
|
|
1223
|
+
delete element.dataset.clipped;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
function archiveActivityLine(entry, t) {
|
|
1227
|
+
const items = Array.isArray(entry.items) ? entry.items : [];
|
|
1228
|
+
const n = items.length;
|
|
1229
|
+
const names = items.map((item) => item.label ?? item.id).join(t('archive.confirm.listSeparator'));
|
|
1230
|
+
const plural = n === 1 ? 'one' : 'other';
|
|
1231
|
+
if (entry.kind === 'turn') return t('archive.confirm.turn');
|
|
1232
|
+
const namesByKind = { subagent: 'subagents', job: 'jobs', schedule: 'schedules' };
|
|
1233
|
+
const kind = namesByKind[entry.kind];
|
|
1234
|
+
return kind ? t(`archive.confirm.${kind}.${plural}`, { n, names })
|
|
1235
|
+
: t(`archive.confirm.other.${plural}`, { kind: entry.kind, n });
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
function taskRule(task, t) {
|
|
1239
|
+
if (task.kind === 'at' || task.kind === 'after') return t('frequency.once');
|
|
1240
|
+
if (task.kind === 'every' && Number.isFinite(task.everySeconds)) {
|
|
1241
|
+
const units = [['day', 86400], ['hour', 3600], ['minute', 60], ['second', 1]];
|
|
1242
|
+
const [unit, seconds] = units.find(([, size]) => task.everySeconds % size === 0) ?? units[3];
|
|
1243
|
+
const value = task.everySeconds / seconds;
|
|
1244
|
+
return t('frequency.every', { value, unit: t(`unit.${unit}.${value === 1 ? 'one' : 'other'}`, { count: value }) });
|
|
1245
|
+
}
|
|
1246
|
+
if (task.kind === 'daily') return t('frequency.daily', { time: task.time, timeZone: task.timeZone });
|
|
1247
|
+
if (task.kind === 'weekly') return t('frequency.weekly', { time: task.time, timeZone: task.timeZone,
|
|
1248
|
+
weekdays: (task.weekdays ?? []).map((day) => t(`frequency.weekday.${day}`)).join(t('frequency.weekday.join')) });
|
|
1249
|
+
if (task.kind === 'cron') return [task.expression, task.timeZone].filter(Boolean).join(' · ');
|
|
1250
|
+
if (task.kind === 'rrule') return task.rrule || t('frequency.hostCustom');
|
|
1251
|
+
return t('frequency.hostCustom');
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
function SectionContent({ t, archiveNotice, workspaceActions, sessionsService }) {
|
|
1255
|
+
const [tab, setTab] = useState('sessions');
|
|
1256
|
+
const [query, setQuery] = useState('');
|
|
1257
|
+
const [overview, setOverview] = useState(null);
|
|
1258
|
+
const [checked, setChecked] = useState(() => new Set());
|
|
1259
|
+
const [busy, setBusy] = useState(false);
|
|
1260
|
+
const [dialog, setDialog] = useState(null); // {text, run}
|
|
1261
|
+
const [notice, setNotice] = useState(null); // {text, warning, seq}
|
|
1262
|
+
const [loadError, setLoadError] = useState(false);
|
|
1263
|
+
const [collapsed, setCollapsed] = useState(() => new Set());
|
|
1264
|
+
const [searchCollapsed, setSearchCollapsed] = useState(() => new Set());
|
|
1265
|
+
|
|
1266
|
+
const workspaceName = (item) => {
|
|
1267
|
+
const title = item.workspaceTitle || item.workspacePath;
|
|
1268
|
+
return title === 'default-workspace' ? t('workspace.defaultName') : title || t('group.ungrouped');
|
|
1269
|
+
};
|
|
1270
|
+
const displayTitle = (item) => item.blank === true ? t('session.new')
|
|
1271
|
+
: item.title === 'default-workspace' ? t('workspace.defaultName') : item.title;
|
|
1272
|
+
// Sessions and residue facts (blank/updatedAt/running) all come from the
|
|
1273
|
+
// plugin's own Host route, over official services; refresh on every action.
|
|
1274
|
+
const sessionItems = overview?.sessions ?? [];
|
|
1275
|
+
const archivedItems = overview?.recycled ?? [];
|
|
1276
|
+
const tabItems = () => (tab === 'sessions' ? sessionItems : archivedItems);
|
|
1277
|
+
const selectableIds = new Set(tabItems().filter((item) => !item.protected).map((item) => item.id));
|
|
1278
|
+
const selectedSessionIds = [...checked].filter((id) => selectableIds.has(id));
|
|
1279
|
+
|
|
1280
|
+
useEffect(() => {
|
|
1281
|
+
if (tab === 'residue' || !overview) return;
|
|
1282
|
+
setChecked((current) => {
|
|
1283
|
+
const next = new Set([...current].filter((id) => selectableIds.has(id)));
|
|
1284
|
+
return next.size === current.size ? current : next;
|
|
1285
|
+
});
|
|
1286
|
+
}, [tab, overview]);
|
|
1287
|
+
|
|
1288
|
+
const refresh = useCallback(async () => {
|
|
1289
|
+
setBusy(true);
|
|
1290
|
+
try {
|
|
1291
|
+
const response = await fetch('api/dsh-mop.overview');
|
|
1292
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
|
1293
|
+
const raw = await response.json();
|
|
1294
|
+
if (raw?.error) throw new Error(raw.error);
|
|
1295
|
+
if (raw?.apiVersion !== 3) {
|
|
1296
|
+
setOverview(null);
|
|
1297
|
+
setLoadError('host-version');
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
if (!Array.isArray(raw?.residue?.items)) throw new Error('invalid residue response');
|
|
1301
|
+
setOverview(raw);
|
|
1302
|
+
setLoadError(false);
|
|
1303
|
+
} catch {
|
|
1304
|
+
setLoadError(true);
|
|
1305
|
+
} finally {
|
|
1306
|
+
setBusy(false);
|
|
1307
|
+
}
|
|
1308
|
+
}, []);
|
|
1309
|
+
|
|
1310
|
+
useEffect(() => { void refresh(); }, [refresh]);
|
|
1311
|
+
|
|
1312
|
+
// Disk maintenance has no official session/disposed event. Re-read the
|
|
1313
|
+
// host catalog through the same service that supplies the DSH sidebar.
|
|
1314
|
+
const syncSessionList = useCallback(async () => {
|
|
1315
|
+
if (typeof sessionsService?.refresh !== 'function') return;
|
|
1316
|
+
try { await sessionsService.refresh(); }
|
|
1317
|
+
catch (error) { console.warn('dsh-mop: session list refresh failed', error); }
|
|
1318
|
+
}, [sessionsService]);
|
|
1319
|
+
useEffect(() => { void syncSessionList(); }, [syncSessionList]);
|
|
1320
|
+
|
|
1321
|
+
const post = useCallback(async (action, body) => {
|
|
1322
|
+
setBusy(true);
|
|
1323
|
+
try {
|
|
1324
|
+
const response = await fetch(`api/dsh-mop.${action}`, {
|
|
1325
|
+
method: 'POST',
|
|
1326
|
+
headers: { 'content-type': 'application/json' },
|
|
1327
|
+
body: JSON.stringify(body ?? {}),
|
|
1328
|
+
});
|
|
1329
|
+
const result = await response.json();
|
|
1330
|
+
if (!response.ok || result?.error) throw new Error(result?.error || `HTTP ${response.status}`);
|
|
1331
|
+
return result;
|
|
1332
|
+
} finally {
|
|
1333
|
+
setBusy(false);
|
|
1334
|
+
}
|
|
1335
|
+
}, []);
|
|
1336
|
+
|
|
1337
|
+
const showNotice = useCallback((text, warning = false, actions) => {
|
|
1338
|
+
setNotice((previous) => ({ text, warning, actions, seq: (previous?.seq ?? 0) + 1 }));
|
|
1339
|
+
}, []);
|
|
1340
|
+
|
|
1341
|
+
const report = useCallback((text, warning = false, actions) => {
|
|
1342
|
+
if (warning || actions) showNotice(text, warning, actions);
|
|
1343
|
+
else setNotice(null);
|
|
1344
|
+
void refresh();
|
|
1345
|
+
}, [refresh, showNotice]);
|
|
1346
|
+
|
|
1347
|
+
const reportArchived = async (done, failed = [], stopped = false) => {
|
|
1348
|
+
const detail = failed.map((item) => errorText(item, t)).filter(Boolean).join('; ');
|
|
1349
|
+
const single = done.length === 1 && failed.length === 0;
|
|
1350
|
+
const notices = archiveNotice ? await Promise.all(done.map(async (id) => {
|
|
1351
|
+
try { return await archiveNotice(id); } catch { return undefined; }
|
|
1352
|
+
})) : [];
|
|
1353
|
+
const extra = notices.filter((notice) => notice?.text);
|
|
1354
|
+
const text = single ? extra[0]?.text ?? t(stopped ? 'toast.stoppedAndArchived' : 'toast.archived')
|
|
1355
|
+
: resultText(t, done.length, fill(t('notice.archived'), { n: done.length }), failed.length, detail);
|
|
1356
|
+
const actions = done.length ? [{
|
|
1357
|
+
label: t('toast.archivedUndo'), ...(single ? {} : { prefix: t('toast.archivedOr') }), onClick: async () => {
|
|
1358
|
+
try {
|
|
1359
|
+
setNotice(null);
|
|
1360
|
+
let result;
|
|
1361
|
+
if (workspaceActions) {
|
|
1362
|
+
const errors = [];
|
|
1363
|
+
for (const id of done) {
|
|
1364
|
+
try { await workspaceActions.unarchiveSession(id); }
|
|
1365
|
+
catch (error) { errors.push({ id, message: errorText(error, t) }); }
|
|
1366
|
+
}
|
|
1367
|
+
result = { failed: errors };
|
|
1368
|
+
} else result = await post('unarchive', { sessionIds: done });
|
|
1369
|
+
const detail = result.failed.map((failure) => errorText(failure, t)).filter(Boolean).join('; ');
|
|
1370
|
+
report(result.failed.length ? resultText(t, 0, '', result.failed.length, detail) : '', result.failed.length > 0);
|
|
1371
|
+
} catch (error) { showNotice(errorText(error, t), true); }
|
|
1372
|
+
},
|
|
1373
|
+
}, { prefix: t('toast.archivedOr'), label: t('delete'), onClick: () => {
|
|
1374
|
+
setNotice(null); setChecked(new Set()); setQuery(''); setSearchCollapsed(new Set()); setTab('recycled');
|
|
1375
|
+
} }] : undefined;
|
|
1376
|
+
report(single || !extra.length ? text : `${text} · ${extra.map((notice) => notice.text).join(' · ')}`,
|
|
1377
|
+
failed.length > 0 || extra.some((notice) => notice.tone === 'warning'), actions);
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
const archiveSessions = async (ids, stopActivity = false) => {
|
|
1381
|
+
if (!workspaceActions) return post('archive', { sessionIds: ids, ...(stopActivity ? { stopActivity: true } : {}) });
|
|
1382
|
+
setBusy(true);
|
|
1383
|
+
const done = [], failed = [];
|
|
1384
|
+
try {
|
|
1385
|
+
for (const id of ids) {
|
|
1386
|
+
try {
|
|
1387
|
+
await workspaceActions.archiveSession(id, stopActivity ? { stopActivity: true } : {});
|
|
1388
|
+
done.push(id);
|
|
1389
|
+
} catch (error) {
|
|
1390
|
+
const rpc = error?.rpcError;
|
|
1391
|
+
if (rpc?.code === 'workspace/session-active' && Array.isArray(rpc.details?.activity)) {
|
|
1392
|
+
failed.push({ id, title: sessionItems.find((item) => item.id === id)?.title || id, code: 'session_active', activity: rpc.details.activity });
|
|
1393
|
+
} else failed.push({ id, message: errorText(error, t) });
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
return { done, failed };
|
|
1397
|
+
} finally { setBusy(false); }
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
const runArchive = useCallback(async () => {
|
|
1401
|
+
try {
|
|
1402
|
+
if (selectedSessionIds.length === 0) return;
|
|
1403
|
+
const result = await archiveSessions(selectedSessionIds);
|
|
1404
|
+
setChecked(new Set(result.failed.map((item) => item.id)));
|
|
1405
|
+
const active = result.failed.filter((item) => item.code === 'session_active');
|
|
1406
|
+
const failures = result.failed.filter((item) => item.code !== 'session_active');
|
|
1407
|
+
if (result.done.length || failures.length) {
|
|
1408
|
+
await reportArchived(result.done, failures);
|
|
1409
|
+
}
|
|
1410
|
+
const showNext = (index) => {
|
|
1411
|
+
const item = active[index];
|
|
1412
|
+
if (!item) { setDialog(null); return; }
|
|
1413
|
+
const next = () => showNext(index + 1);
|
|
1414
|
+
setDialog({ kind: 'archiveActive', item, next, run: async () => {
|
|
1415
|
+
try {
|
|
1416
|
+
const retry = await archiveSessions([item.id], true);
|
|
1417
|
+
if (retry.done.includes(item.id)) {
|
|
1418
|
+
setChecked((current) => { const updated = new Set(current); updated.delete(item.id); return updated; });
|
|
1419
|
+
await reportArchived(retry.done, [], true);
|
|
1420
|
+
next();
|
|
1421
|
+
} else {
|
|
1422
|
+
showNotice(retry.failed.map((failure) => errorText(failure, t) || t('load.failed')).join('; '), true);
|
|
1423
|
+
}
|
|
1424
|
+
} catch (error) { showNotice(errorText(error, t), true); }
|
|
1425
|
+
} });
|
|
1426
|
+
};
|
|
1427
|
+
if (active.length) showNext(0);
|
|
1428
|
+
} catch (error) {
|
|
1429
|
+
showNotice(errorText(error, t), true);
|
|
1430
|
+
}
|
|
1431
|
+
}, [checked, tab, overview, post, report, showNotice, t, workspaceActions, archiveNotice]);
|
|
1432
|
+
|
|
1433
|
+
const runPurge = useCallback(async () => {
|
|
1434
|
+
try {
|
|
1435
|
+
if (selectedSessionIds.length === 0) return;
|
|
1436
|
+
const r = await post('purge', { sessionIds: selectedSessionIds });
|
|
1437
|
+
await syncSessionList();
|
|
1438
|
+
setChecked(new Set(r.failed.map((item) => item.id)));
|
|
1439
|
+
const detail = [...new Set(r.failed.map((item) => {
|
|
1440
|
+
const reason = errorText(item, t);
|
|
1441
|
+
const shown = archivedItems.find((entry) => entry.id === item.id);
|
|
1442
|
+
return reason ? `${(shown && displayTitle(shown)) || (item.title === 'default-workspace' ? t('workspace.defaultName') : item.title) || item.id}: ${reason}` : '';
|
|
1443
|
+
}).filter(Boolean))].join(' ');
|
|
1444
|
+
report(r.failed.length ? resultText(t, 0, '', r.failed.length, detail) : '', r.failed.length > 0);
|
|
1445
|
+
} catch (error) {
|
|
1446
|
+
showNotice(errorText(error, t), true);
|
|
1447
|
+
}
|
|
1448
|
+
}, [checked, tab, overview, post, report, showNotice, t, syncSessionList]);
|
|
1449
|
+
|
|
1450
|
+
const runRestore = useCallback(async () => {
|
|
1451
|
+
try {
|
|
1452
|
+
if (selectedSessionIds.length === 0) return;
|
|
1453
|
+
let r;
|
|
1454
|
+
if (workspaceActions) {
|
|
1455
|
+
const done = [], failed = [];
|
|
1456
|
+
setBusy(true);
|
|
1457
|
+
try {
|
|
1458
|
+
for (const id of selectedSessionIds) {
|
|
1459
|
+
try { await workspaceActions.unarchiveSession(id); done.push(id); }
|
|
1460
|
+
catch (error) { failed.push({ id, message: errorText(error, t) }); }
|
|
1461
|
+
}
|
|
1462
|
+
r = { done, failed };
|
|
1463
|
+
} finally { setBusy(false); }
|
|
1464
|
+
} else r = await post('unarchive', { sessionIds: selectedSessionIds });
|
|
1465
|
+
setChecked(new Set(r.failed.map((item) => item.id)));
|
|
1466
|
+
const detail = r.failed.map((item) => errorText(item, t)).filter(Boolean).join('; ');
|
|
1467
|
+
report(r.failed.length ? resultText(t, 0, '', r.failed.length, detail) : '', r.failed.length > 0);
|
|
1468
|
+
} catch (error) {
|
|
1469
|
+
showNotice(errorText(error, t), true);
|
|
1470
|
+
}
|
|
1471
|
+
}, [checked, tab, overview, post, report, showNotice, t, workspaceActions]);
|
|
1472
|
+
|
|
1473
|
+
const runClean = useCallback(async (confirmedTasks = {}) => {
|
|
1474
|
+
try {
|
|
1475
|
+
const r = await post('residue', { keys: [...checked], confirmedTasks });
|
|
1476
|
+
await syncSessionList();
|
|
1477
|
+
setChecked(new Set(r.failed.map((item) => item.key)));
|
|
1478
|
+
const detail = r.failed.map((item) => {
|
|
1479
|
+
const reason = errorText(item, t);
|
|
1480
|
+
const entry = overview?.residue?.items?.find((row) => row.key === item.key);
|
|
1481
|
+
const name = entry?.label || item.id || item.key;
|
|
1482
|
+
return reason ? `${name ? `${name}: ` : ''}${reason}` : '';
|
|
1483
|
+
}).filter(Boolean).join('; ');
|
|
1484
|
+
report(r.failed.length ? resultText(t, 0, '', r.failed.length, detail) : '', r.failed.length > 0);
|
|
1485
|
+
} catch (error) {
|
|
1486
|
+
showNotice(errorText(error, t), true);
|
|
1487
|
+
}
|
|
1488
|
+
}, [checked, overview, post, report, showNotice, t, syncSessionList]);
|
|
1489
|
+
|
|
1490
|
+
const ui = {
|
|
1491
|
+
checked,
|
|
1492
|
+
home: overview?.home,
|
|
1493
|
+
onOpenTask: async (sessionId, taskId) => {
|
|
1494
|
+
try {
|
|
1495
|
+
const result = await post('task', { sessionId, id: taskId });
|
|
1496
|
+
if (!result.task) throw new Error(t('detail.missing'));
|
|
1497
|
+
setDialog({ kind: 'taskDetail', task: result.task });
|
|
1498
|
+
} catch (error) {
|
|
1499
|
+
const message = String(error?.message ?? error);
|
|
1500
|
+
showNotice(message.includes('dsh-mop:task_not_found') ? t('detail.missing')
|
|
1501
|
+
: message.includes('dsh-mop:task_unavailable') ? t('list.error') : errorText(error, t), true);
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
onSelect: (key, on) => setChecked((prev) => {
|
|
1505
|
+
const next = new Set(prev);
|
|
1506
|
+
if (on) next.add(key); else next.delete(key);
|
|
1507
|
+
return next;
|
|
1508
|
+
}),
|
|
1509
|
+
collapsed: query.trim() ? searchCollapsed : collapsed,
|
|
1510
|
+
onToggleCollapse: (key) => (query.trim() ? setSearchCollapsed : setCollapsed)((prev) => {
|
|
1511
|
+
const next = new Set(prev);
|
|
1512
|
+
if (next.has(key)) next.delete(key); else next.add(key);
|
|
1513
|
+
return next;
|
|
1514
|
+
}),
|
|
1515
|
+
};
|
|
1516
|
+
|
|
1517
|
+
const term = query.trim().toLocaleLowerCase();
|
|
1518
|
+
const matches = (item) => !term || [item.id, item.title, item.workspaceTitle, item.workspacePath, item.label, item.hint, item.targetSessionId]
|
|
1519
|
+
.some((value) => String(value ?? '').toLocaleLowerCase().includes(term));
|
|
1520
|
+
const displayItems = tabItems().map((item) => ({ ...item,
|
|
1521
|
+
title: displayTitle(item),
|
|
1522
|
+
workspaceTitle: workspaceName(item),
|
|
1523
|
+
}));
|
|
1524
|
+
const visibleItems = displayItems.filter(matches);
|
|
1525
|
+
const ready = !!overview && !busy;
|
|
1526
|
+
const kindLabels = { 'orphan-cache': 'residue.orphanCache', 'orphan-task': 'residue.orphanTask', 'ghost-registry': 'residue.ghostRegistry',
|
|
1527
|
+
'shell-dir': 'residue.sessionDirectory', 'empty-project': 'residue.emptyProject' };
|
|
1528
|
+
const allResidue = overview?.residue?.items ?? [];
|
|
1529
|
+
const registeredIds = new Set(allResidue.filter((item) => item.kind === 'ghost-registry').map((item) => item.id));
|
|
1530
|
+
const residueItems = allResidue.map((item) => ({ ...item,
|
|
1531
|
+
workspaceTitle: workspaceName(item),
|
|
1532
|
+
hint: t(kindLabels[item.kind]),
|
|
1533
|
+
relatedRegistration: item.kind === 'orphan-cache' && registeredIds.has(item.id) }));
|
|
1534
|
+
const visibleResidue = residueItems.filter(matches);
|
|
1535
|
+
const allKeys = tab === 'residue' ? visibleResidue.map((x) => x.key)
|
|
1536
|
+
: visibleItems.filter((x) => selectableIds.has(x.id)).map((x) => x.id);
|
|
1537
|
+
const allSelected = allKeys.length > 0 && allKeys.every((k) => checked.has(k));
|
|
1538
|
+
const toggleVisible = () => setChecked((prev) => {
|
|
1539
|
+
const next = new Set(prev);
|
|
1540
|
+
for (const key of allKeys) { if (allSelected) next.delete(key); else next.add(key); }
|
|
1541
|
+
return next;
|
|
1542
|
+
});
|
|
1543
|
+
const selectedItems = tab === 'residue' ? residueItems.filter((x) => checked.has(x.key))
|
|
1544
|
+
: tabItems().filter((x) => checked.has(x.id));
|
|
1545
|
+
const measuredItems = selectedItems.filter((x) => typeof x.sizeBytes === 'number' && Number.isFinite(x.sizeBytes));
|
|
1546
|
+
const selectedBytes = measuredItems.length ? measuredItems.reduce((sum, x) => sum + x.sizeBytes, 0) : null;
|
|
1547
|
+
const tabLabels = { sessions: t('section.sessions'), recycled: t('tabs.archived'), residue: t('tabs.residue') };
|
|
1548
|
+
const searchPlaceholder = t('search.placeholder', { section: tabLabels[tab] });
|
|
1549
|
+
const confirmResidue = () => {
|
|
1550
|
+
const tasks = selectedItems.filter((item) => item.kind === 'orphan-task');
|
|
1551
|
+
const confirmedTasks = Object.fromEntries(tasks.map((item) => [item.id,
|
|
1552
|
+
{ targetSessionId: item.targetSessionId, updatedAt: item.updatedAt ?? null }]));
|
|
1553
|
+
setDialog({ text: t('confirm.residue.title', { provider: t('tabs.residue') }), kind: 'clean', taskNames: tasks.map((item) => item.label),
|
|
1554
|
+
run: () => runClean(confirmedTasks) });
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1557
|
+
return h('div', { className: 'dsh-mop' },
|
|
1558
|
+
h(Style, null),
|
|
1559
|
+
h('div', { className: 'dsh-mop-header' }, h(SegmentedTabs, {
|
|
1560
|
+
className: 'dsh-mop-tabs', size: 'sm', label: t('actions.archive'), value: tab,
|
|
1561
|
+
items: [['sessions', tabLabels.sessions], ['recycled', tabLabels.recycled], ['residue', tabLabels.residue]]
|
|
1562
|
+
.map(([value, label]) => ({ value, label, id: `dsh-mop-tab-${value}`, panelId: `dsh-mop-panel-${value}` })),
|
|
1563
|
+
onChange: (key) => { if (busy) return; setTab(key); setChecked(new Set()); setQuery(''); setSearchCollapsed(new Set()); setDialog(null); },
|
|
1564
|
+
}),
|
|
1565
|
+
h('div', { className: 'dsh-mop-search' },
|
|
1566
|
+
h(Input, { className: 'dsh-mop-search-input', icon: officialIcon('search-outline', 16),
|
|
1567
|
+
type: 'search', value: query, placeholder: searchPlaceholder, 'aria-label': searchPlaceholder,
|
|
1568
|
+
onChange: (event) => { setQuery(event.target.value); setSearchCollapsed(new Set()); } }),
|
|
1569
|
+
h(Button, { variant: 'ghost', size: 'sm', disabled: !ready || allKeys.length === 0,
|
|
1570
|
+
onClick: toggleVisible }, allSelected ? t('selection.deselectAll') : t('selection.selectAll')))),
|
|
1571
|
+
!overview ? h('div', { className: 'dsh-mop-body dsh-mop-state' },
|
|
1572
|
+
loadError ? [t(loadError === 'host-version' ? 'host.updateRequired' : 'load.failed'), ' ', h(Button, { variant: 'outline', size: 'sm', onClick: () => { setLoadError(false); void refresh(); } }, t('retry'))] : t('loading')) : null,
|
|
1573
|
+
overview && tab !== 'residue' ? h('div', { className: 'dsh-mop-body', role: 'tabpanel', id: `dsh-mop-panel-${tab}`, 'aria-labelledby': `dsh-mop-tab-${tab}` },
|
|
1574
|
+
visibleItems.length === 0 ? h('p', { className: 'dsh-mop-state' }, query.trim() ? t('empty.noMatches')
|
|
1575
|
+
: (tab === 'sessions' ? t('empty.none') : t('empty.noneArchived'))) :
|
|
1576
|
+
h(HoverCardGroup, null, ...renderGroups(visibleItems, (x, checkNode) => sessionCard(x, t, checkNode), ui, t))) : null,
|
|
1577
|
+
overview && tab === 'residue' ? h('div', { className: 'dsh-mop-body', role: 'tabpanel', id: `dsh-mop-panel-${tab}`, 'aria-labelledby': `dsh-mop-tab-${tab}` },
|
|
1578
|
+
visibleResidue.length === 0 ? h('p', { className: 'dsh-mop-state' }, query.trim() ? t('empty.noMatches') : t('empty.residue')) :
|
|
1579
|
+
h(HoverCardGroup, null, ...renderResidueGroups(visibleResidue, ui, t))) : null,
|
|
1580
|
+
h('div', { className: 'dsh-mop-foot' },
|
|
1581
|
+
dialog?.kind === 'taskDetail' ? h(Modal, {
|
|
1582
|
+
open: true, onClose: () => setDialog(null), closeLabel: t('detail.close'), className: 'dsh-mop-dialog',
|
|
1583
|
+
title: t('detail.label'),
|
|
1584
|
+
footer: h(Button, { variant: 'outline', onClick: () => setDialog(null) }, t('close')),
|
|
1585
|
+
}, h('dl', { className: 'dsh-mop-task-detail' },
|
|
1586
|
+
...[
|
|
1587
|
+
[t('detail.name'), dialog.task.title],
|
|
1588
|
+
[t('detail.instruction'), dialog.task.prompt],
|
|
1589
|
+
[t('statusFilter.label'), t(`status.${dialog.task.status}`)],
|
|
1590
|
+
[t('rule.repeat'), taskRule(dialog.task, t)],
|
|
1591
|
+
...(dialog.task.status === 'active' && dialog.task.scheduledAt && Number.isFinite(Date.parse(dialog.task.scheduledAt))
|
|
1592
|
+
? [[t('detail.nextRun'), new Date(dialog.task.scheduledAt).toLocaleString()]] : []),
|
|
1593
|
+
[t('host.target'), t(dialog.task.target?.kind === 'session' ? 'host.currentConversation'
|
|
1594
|
+
: dialog.task.target?.kind === 'new_once' ? 'host.targetNewOnce' : 'host.targetNew')],
|
|
1595
|
+
].flatMap(([label, value], index) => [h('dt', { key: `label-${index}` }, label), h('dd', { key: `value-${index}` }, value)])))
|
|
1596
|
+
: dialog?.kind === 'archiveActive' ? h(Modal, {
|
|
1597
|
+
open: true, onClose: () => { if (!busy) dialog.next(); }, closeLabel: t('close'), className: 'dsh-mop-dialog',
|
|
1598
|
+
title: t('archive.confirm.title'),
|
|
1599
|
+
description: t('archive.confirm.desc', { title: dialog.item.title || dialog.item.id }),
|
|
1600
|
+
footer: h(React.Fragment, null,
|
|
1601
|
+
h(Button, { variant: 'outline', disabled: busy, onClick: dialog.next, 'data-modal-autofocus': '' }, t('cancel')),
|
|
1602
|
+
h(Button, { variant: 'outline', className: 'dsh-mop-danger', disabled: busy, onClick: dialog.run },
|
|
1603
|
+
t(busy ? 'archive.confirm.pending' : 'archive.confirm.action'))),
|
|
1604
|
+
}, h('ul', { 'aria-label': t('archive.confirm.activity') },
|
|
1605
|
+
...dialog.item.activity.map((entry, index) => h('li', { key: index }, archiveActivityLine(entry, t)))),
|
|
1606
|
+
dialog.item.activity.some((entry) => entry.kind === 'schedule') ? h('p', { role: 'note' }, t('archive.scheduleDeletion')) : null)
|
|
1607
|
+
: dialog ? h(Modal, {
|
|
1608
|
+
open: true, className: 'dsh-mop-dialog', title: dialog.text,
|
|
1609
|
+
description: dialog.kind === 'purge' ? t('confirm.purge.description') : dialog.taskNames?.length ? t('confirm.tasks.description') : undefined,
|
|
1610
|
+
closeLabel: t('close'), onClose: () => setDialog(null),
|
|
1611
|
+
footer: h('div', { className: 'dsh-mop-confirm-actions' },
|
|
1612
|
+
h(Button, { variant: 'outline', onClick: () => setDialog(null), 'data-modal-autofocus': '' }, t('cancel')),
|
|
1613
|
+
h(Button, { variant: 'outline', className: 'dsh-mop-danger',
|
|
1614
|
+
onClick: async () => { const d = dialog; setDialog(null); await d.run(); } }, t(dialog.kind === 'purge' ? 'delete.confirm' : 'clear.confirm'))),
|
|
1615
|
+
}, dialog.taskNames?.length ? h('div', { className: 'dsh-mop-confirm-tasks' },
|
|
1616
|
+
h('ul', null, ...dialog.taskNames.map((name, index) => h('li', { key: index }, name)))) : null)
|
|
1617
|
+
: null,
|
|
1618
|
+
notice ? h(Toast, { key: notice.seq, text: notice.text, actions: notice.actions,
|
|
1619
|
+
...(notice.warning ? { icon: officialIcon('warning-outline', 16), holdMs: 8000 } : { tone: 'success', ...(notice.actions ? { holdMs: 6000 } : {}) }),
|
|
1620
|
+
onDone: () => setNotice((current) => current?.seq === notice.seq ? null : current) }) : null,
|
|
1621
|
+
h(React.Fragment, null,
|
|
1622
|
+
h('span', { className: 'dsh-mop-foot-info' },
|
|
1623
|
+
selectedBytes === null
|
|
1624
|
+
? t('selection.summaryCount', { n: checked.size })
|
|
1625
|
+
: fill(t('selection.summary'), { n: checked.size, size: formatBytes(selectedBytes) })),
|
|
1626
|
+
tab === 'sessions' ? h(Button, { variant: 'outline', disabled: !ready || selectedSessionIds.length === 0,
|
|
1627
|
+
onClick: runArchive }, t('actions.archive')) : null,
|
|
1628
|
+
tab === 'recycled' ? [
|
|
1629
|
+
h(Button, { key: 'restore', variant: 'outline', disabled: !ready || selectedSessionIds.length === 0,
|
|
1630
|
+
onClick: runRestore }, t('actions.unarchive')),
|
|
1631
|
+
h(Button, { key: 'action.purge', variant: 'outline', className: 'dsh-mop-danger', disabled: !ready || selectedSessionIds.length === 0,
|
|
1632
|
+
onClick: () => setDialog({ kind: 'purge', text: t('confirm.purge.title', { provider: t('tabs.archived') }), run: runPurge }) }, t('delete')),
|
|
1633
|
+
] : null,
|
|
1634
|
+
tab === 'residue' ? h(Button, { variant: 'outline', className: 'dsh-mop-danger', disabled: !ready || checked.size === 0,
|
|
1635
|
+
onClick: confirmResidue }, t('delete')) : null)));
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/** 会话行:状态/选择框 + 标题 + 右侧元信息。 */
|
|
1639
|
+
function sessionCard(x, t, checkNode) {
|
|
1640
|
+
const timestamp = sessionTime(x);
|
|
1641
|
+
const time = timestamp > 0 ? relativeTime(timestamp, t) : '';
|
|
1642
|
+
const status = sessionStatus(x);
|
|
1643
|
+
return {
|
|
1644
|
+
main: [
|
|
1645
|
+
x.protected ? h('span', { className: 'dsh-mop-lead', 'aria-label': t('protection.label') }, officialIcon('shield-outline', 14)) : checkNode,
|
|
1646
|
+
...(x.live && !x.protected ? [h('span', { className: 'dsh-mop-lead', 'aria-label': t(status.key, status.params) }, h(StateDot, { state: status.state }))] : []),
|
|
1647
|
+
h('span', { className: 'dsh-mop-title' }, x.blank === true ? t('session.new') : x.title),
|
|
1648
|
+
h('span', { className: 'dsh-mop-row-side has-columns' },
|
|
1649
|
+
h('span', { className: 'dsh-mop-marker', ...(x.purgeBlock && !x.protected ? { 'aria-label': t(x.purgeBlock === 'schedule_reference' ? 'reference.schedule' : 'error.referenceCheck') } : { 'aria-hidden': true }) },
|
|
1650
|
+
x.purgeBlock && !x.protected ? officialIcon('shield-outline', 14) : null),
|
|
1651
|
+
h('span', { className: 'dsh-mop-size' }, typeof x.sizeBytes === 'number' ? formatBytes(x.sizeBytes) : ''),
|
|
1652
|
+
h('span', { className: 'dsh-mop-time' }, time)),
|
|
1653
|
+
],
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
// Mirrors the official workspace row's status precedence over the facts the
|
|
1658
|
+
// host route supplies (running/live only; pending states belong to the
|
|
1659
|
+
// official sidebar, which owns live session state).
|
|
1660
|
+
const SESSION_STATUS = { ongoing: { state: 'ongoing', key: 'status.running' }, idle: { state: 'idle', key: 'status.idle' } };
|
|
1661
|
+
function sessionStatus(item) {
|
|
1662
|
+
return item.live ? SESSION_STATUS.ongoing : SESSION_STATUS.idle;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/** DSH theme's shared icon sprite, used by the official workspace rows. */
|
|
1666
|
+
function groupHeading(key, title, isCollapsed, ui, path, createdAt, t) {
|
|
1667
|
+
const button = h('button', {
|
|
1668
|
+
type: 'button', className: 'dsh-mop-group-name',
|
|
1669
|
+
onClick: () => ui.onToggleCollapse(key), 'aria-expanded': !isCollapsed,
|
|
1670
|
+
},
|
|
1671
|
+
h('span', { className: 'dsh-mop-group-icon', 'aria-hidden': true },
|
|
1672
|
+
officialIcon(`folder-${isCollapsed ? 'close' : 'open'}`, 16, 'dsh-mop-folder'),
|
|
1673
|
+
officialIcon('triangle-right-fill', 14, `dsh-mop-chevron${isCollapsed ? '' : ' is-open'}`)),
|
|
1674
|
+
h('span', { className: 'dsh-mop-group-label' }, title));
|
|
1675
|
+
return h('div', { className: 'dsh-mop-group-title' }, path && createdAt != null && Number.isFinite(new Date(createdAt).getTime())
|
|
1676
|
+
? rowWithHover(`workspace:${key}`, button, cardContent({ title, path: displayPath(path, ui.home),
|
|
1677
|
+
time: workspaceCreatedLabel(createdAt, t) }, t), t, path)
|
|
1678
|
+
: button);
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/** 按工作区分组的行;ui = {checked, onSelect(key), collapsed, onToggleCollapse(key)}。 */
|
|
1682
|
+
function renderGroups(items, cardOf, ui, t) {
|
|
1683
|
+
const byWs = new Map();
|
|
1684
|
+
for (const it of sortByDisplayedTime(items, sessionTime)) {
|
|
1685
|
+
const key = it.workspacePath || it.workspaceTitle || '';
|
|
1686
|
+
if (!byWs.has(key)) byWs.set(key, { title: it.workspaceTitle || it.workspacePath || t('group.ungrouped'), path: it.workspacePath, createdAt: it.workspaceCreatedAt, list: [] });
|
|
1687
|
+
byWs.get(key).list.push(it);
|
|
1688
|
+
}
|
|
1689
|
+
return [...byWs.entries()].map(([wsKey, group]) => {
|
|
1690
|
+
const isCollapsed = ui.collapsed.has(wsKey);
|
|
1691
|
+
return h('div', { key: wsKey, className: 'dsh-mop-group' },
|
|
1692
|
+
groupHeading(wsKey, group.title, isCollapsed, ui, group.path, group.createdAt, t),
|
|
1693
|
+
isCollapsed ? null : group.list.map((x) => {
|
|
1694
|
+
const blocked = x.protected;
|
|
1695
|
+
const card = cardOf(x, blocked ? h('span', { className: 'dsh-mop-lead' }, '·') : h('input', {
|
|
1696
|
+
type: 'checkbox', className: 'dsh-mop-check', checked: ui.checked.has(x.id),
|
|
1697
|
+
onChange: () => ui.onSelect(x.id, !ui.checked.has(x.id)), 'aria-label': x.title,
|
|
1698
|
+
}));
|
|
1699
|
+
const row = h('label', { className: `dsh-mop-row${blocked ? ' is-static' : ''}${x.archived ? ' is-archived' : ''}${ui.checked.has(x.id) ? ' is-selected' : ''}`,
|
|
1700
|
+
onPointerEnter: titleEnter, onPointerLeave: titleLeave },
|
|
1701
|
+
h('div', { className: 'dsh-mop-row-main' }, ...card.main));
|
|
1702
|
+
const timestamp = sessionTime(x);
|
|
1703
|
+
return rowWithHover(x.id, row, cardContent({ title: x.title, path: displayPath(x.cwd || x.workspacePath, ui.home),
|
|
1704
|
+
time: x.blank ? '' : hoverTime(timestamp, t),
|
|
1705
|
+
statuses: x.live || !x.archived ? [sessionStatus(x)] : [],
|
|
1706
|
+
archived: x.archived, tasks: x.purgeBlock === 'schedule_reference' ? x.scheduleTasks ?? [] : [],
|
|
1707
|
+
onOpenTask: (taskId) => ui.onOpenTask?.(x.id, taskId),
|
|
1708
|
+
reason: x.protected ? t('protection.label') : x.purgeBlock === 'reference_check_failed' ? t('error.referenceCheck') : x.purgeBlock === 'schedule_reference' && !x.scheduleTasks?.length ? t('reference.schedule') : '' }, t),
|
|
1709
|
+
t, x.blank ? undefined : x.title);
|
|
1710
|
+
}));
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
/** 按可核实的工作区分组。 */
|
|
1715
|
+
function renderResidueGroups(items, ui, t) {
|
|
1716
|
+
const byWorkspace = new Map();
|
|
1717
|
+
for (const item of sortByDisplayedTime(items, residueTime)) {
|
|
1718
|
+
const workspaceKey = item.workspacePath || '';
|
|
1719
|
+
if (!byWorkspace.has(workspaceKey)) byWorkspace.set(workspaceKey, {
|
|
1720
|
+
title: item.workspaceTitle || item.workspacePath || t('group.ungrouped'), path: item.workspacePath, createdAt: item.workspaceCreatedAt, entries: [],
|
|
1721
|
+
});
|
|
1722
|
+
byWorkspace.get(workspaceKey).entries.push(item);
|
|
1723
|
+
}
|
|
1724
|
+
return [...byWorkspace].map(([workspaceKey, group]) => {
|
|
1725
|
+
const key = `residue:workspace:${workspaceKey}`;
|
|
1726
|
+
const isCollapsed = ui.collapsed.has(key);
|
|
1727
|
+
return h('div', { key, className: 'dsh-mop-group' },
|
|
1728
|
+
groupHeading(key, group.title, isCollapsed, ui, group.path, group.createdAt, t),
|
|
1729
|
+
isCollapsed ? null : group.entries.map((item) => {
|
|
1730
|
+
const reason = item.kind === 'orphan-task' ? t('residue.orphanTask') : item.relatedRegistration ? t('residue.registeredCache') : '';
|
|
1731
|
+
const row = h('label', { onPointerEnter: titleEnter, onPointerLeave: titleLeave,
|
|
1732
|
+
className: `dsh-mop-row${ui.checked.has(item.key) ? ' is-selected' : ''}` },
|
|
1733
|
+
h('div', { className: 'dsh-mop-row-main' },
|
|
1734
|
+
h('input', { type: 'checkbox', className: 'dsh-mop-check', checked: ui.checked.has(item.key),
|
|
1735
|
+
onChange: () => ui.onSelect(item.key, !ui.checked.has(item.key)), 'aria-label': item.label }),
|
|
1736
|
+
h('span', { className: 'dsh-mop-title' }, item.label),
|
|
1737
|
+
h('span', { className: 'dsh-mop-row-side has-columns' },
|
|
1738
|
+
h('span', { className: 'dsh-mop-marker', 'aria-hidden': true }, item.kind === 'orphan-task' ? officialIcon('clock-outline', 14) : null),
|
|
1739
|
+
h('span', { className: 'dsh-mop-size' }, typeof item.sizeBytes === 'number' ? formatBytes(item.sizeBytes) : ''),
|
|
1740
|
+
h('span', { className: 'dsh-mop-time' }, residueTime(item) > 0 ? relativeTime(residueTime(item), t) : ''))));
|
|
1741
|
+
return rowWithHover(item.key, row, cardContent({ title: item.label,
|
|
1742
|
+
path: displayPath(item.kind === 'orphan-task' ? item.targetSessionId : item.workspacePath || (item.id !== item.label ? item.id : ''), ui.home),
|
|
1743
|
+
time: hoverTime(residueTime(item), t), reason,
|
|
1744
|
+
tasks: item.kind === 'orphan-task' ? [{ id: item.id, title: item.label, status: item.status, showStatus: true }] : [],
|
|
1745
|
+
onOpenTask: (taskId) => ui.onOpenTask?.(item.targetSessionId, taskId) }, t),
|
|
1746
|
+
t, item.label);
|
|
1747
|
+
}));
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
/** 组件内样式:随组件卸载移除,仅用官方主题令牌。 */
|
|
1752
|
+
function Style() {
|
|
1753
|
+
return h('style', null, `
|
|
1754
|
+
.dsh-mop { display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; font-family: var(--dsw-font-family, inherit); font-size: var(--dsh-content-font-size, 14px); line-height: 1.5; color: var(--dsw-alias-label-primary); }
|
|
1755
|
+
.dsh-mop *, .dsh-mop *::before, .dsh-mop *::after { box-sizing: border-box; }
|
|
1756
|
+
.dsh-mop button, .dsh-mop input { font-family: inherit; }
|
|
1757
|
+
.dsh-mop-body { flex: 1 1 0; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; }
|
|
1758
|
+
.dsh-mop-header { flex: none; min-width: 0; padding-top: 8px; }
|
|
1759
|
+
.dsh-mop-state { padding: 32px 0; text-align: center; color: var(--dsw-alias-label-secondary); }
|
|
1760
|
+
.dsh-mop-search { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; min-width: 0; }
|
|
1761
|
+
.dsh-mop-search-input { flex: 1 1 240px; min-width: 0; }
|
|
1762
|
+
.dsh-mop-tabs { align-self: flex-start; max-width: 100%; }
|
|
1763
|
+
.dsh-mop-group + .dsh-mop-group { margin-top: 4px; }
|
|
1764
|
+
.dsh-mop-group > * + * { margin-top: 2px; }
|
|
1765
|
+
.dsh-mop-group-title { display: flex; align-items: center; width: 100%; }
|
|
1766
|
+
.dsh-mop-group-title > span:has(> .dsh-mop-group-name) { display: block; width: 100%; }
|
|
1767
|
+
.dsh-mop-group-name { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: var(--dsw-radius-md, 8px); background: transparent; color: var(--dsw-alias-label-primary); font-size: 14px; line-height: 20px; cursor: pointer; text-align: left; }
|
|
1768
|
+
.dsh-mop-group-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1769
|
+
.dsh-mop-hover-content { display: flex; flex-direction: column; gap: 8px; }
|
|
1770
|
+
.dsh-mop-hover-title { color: var(--dsw-alias-hovercard-label-primary); font-size: 14px; line-height: 20px; overflow-wrap: break-word; }
|
|
1771
|
+
.dsh-mop-hover-path { color: var(--dsw-alias-hovercard-label-secondary); font-size: 12px; line-height: 16px; word-break: break-all; }
|
|
1772
|
+
.dsh-mop-hover-time { color: var(--dsw-alias-hovercard-label-secondary); font-size: 12px; line-height: 16px; }
|
|
1773
|
+
.dsh-mop-hover-status { display: flex; align-items: center; gap: 8px; color: var(--dsw-alias-hovercard-label-tertiary); font-size: 12px; line-height: 20px; }
|
|
1774
|
+
.dsh-mop-hover-status span { min-width: 0; overflow-wrap: break-word; }
|
|
1775
|
+
.dsh-mop-hover-archived > svg { flex-shrink: 0; margin: 0 -4px; }
|
|
1776
|
+
.dsh-mop-hover-task-button { width: 100%; padding: 0; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
|
|
1777
|
+
.dsh-mop-hover-task-button:hover { color: var(--dsw-alias-hovercard-label-primary); }
|
|
1778
|
+
.dsh-mop-hover-task-button:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, currentColor); outline-offset: 2px; }
|
|
1779
|
+
.dsh-mop-hover-task-button:disabled { cursor: default; }
|
|
1780
|
+
.dsh-mop-group-icon { flex: 0 0 16px; width: 16px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }
|
|
1781
|
+
.dsh-mop-folder { width: 16px; height: 16px; }
|
|
1782
|
+
.dsh-mop-chevron { width: 14px; height: 14px; }
|
|
1783
|
+
.dsh-mop-chevron { display: none; color: var(--dsw-alias-label-caption); transition: transform 150ms var(--ds-ease-in-out, ease-in-out); }
|
|
1784
|
+
.dsh-mop-chevron.is-open { transform: rotate(90deg); }
|
|
1785
|
+
@media (hover: hover) { .dsh-mop-group-name:hover { background: var(--dsw-alias-interactive-bg-hover, var(--dsw-alias-bg-layer-2)); } .dsh-mop-group-name:hover .dsh-mop-folder { display: none; } .dsh-mop-group-name:hover .dsh-mop-chevron { display: block; } }
|
|
1786
|
+
@media (prefers-reduced-motion: reduce) { .dsh-mop-chevron { transition: none; } }
|
|
1787
|
+
.dsh-mop-row { display: flex; align-items: center; height: 32px; padding: 0 8px 0 24px; border-radius: var(--dsw-radius-md, 8px); cursor: pointer; }
|
|
1788
|
+
.dsh-mop-row:hover, .dsh-mop-row.is-selected { background: var(--dsw-alias-interactive-bg-hover, var(--dsw-alias-bg-layer-2)); }
|
|
1789
|
+
.dsh-mop-row.is-static { cursor: default; }
|
|
1790
|
+
.dsh-mop-row.is-static:hover { background: transparent; }
|
|
1791
|
+
.dsh-mop-row-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
|
|
1792
|
+
.dsh-mop-row-side { margin-left: auto; color: var(--dsw-alias-label-tertiary); font-size: 10px; line-height: 16px; white-space: nowrap; }
|
|
1793
|
+
.dsh-mop-row-side.has-columns { flex: 0 0 min(136px, 50%); min-width: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr); column-gap: 6px; align-items: center; text-align: right; }
|
|
1794
|
+
.dsh-mop-marker { width: 16px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
|
|
1795
|
+
.dsh-mop-size, .dsh-mop-time { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1796
|
+
.dsh-mop-check { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--dsw-alias-brand-primary); }
|
|
1797
|
+
.dsh-mop-check:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-brand-primary)); outline-offset: 2px; }
|
|
1798
|
+
.dsh-mop-lead { flex: 0 0 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--dsw-alias-label-secondary); }
|
|
1799
|
+
.dsh-mop-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; }
|
|
1800
|
+
.dsh-mop-row.is-archived .dsh-mop-title { color: var(--dsw-alias-label-caption); }
|
|
1801
|
+
@media (hover: hover) { .dsh-mop-row:hover .dsh-mop-title { text-overflow: clip; } }
|
|
1802
|
+
.dsh-mop-title[data-scrolled] { mask-image: linear-gradient(to right, transparent, #000 12px); }
|
|
1803
|
+
.dsh-mop-title[data-clipped] { mask-image: linear-gradient(to left, transparent, #000 12px); }
|
|
1804
|
+
.dsh-mop-title[data-scrolled][data-clipped] { mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
|
|
1805
|
+
.dsh-mop-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0 0; border-top: 0.5px solid var(--dsw-alias-border-l2); }
|
|
1806
|
+
.dsh-mop-foot-info { flex: 1 1 100px; color: var(--dsw-alias-label-secondary); font-size: .86em; }
|
|
1807
|
+
.dsh-mop-group-name:focus-visible { outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: 2px; }
|
|
1808
|
+
.dsh-mop-danger { color: var(--dsw-alias-state-error-primary); --dsh-button-outline-color: var(--dsw-alias-state-error-primary); }
|
|
1809
|
+
.dsh-mop-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
|
|
1810
|
+
.dsh-mop-confirm-tasks { min-width: 0; }
|
|
1811
|
+
.dsh-mop-confirm-tasks ul { margin: 4px 0 0; padding-left: 20px; }
|
|
1812
|
+
.dsh-mop-task-detail { display: grid; gap: 6px; margin: 0; font-size: 14px; }
|
|
1813
|
+
.dsh-mop-task-detail dt { color: var(--dsw-alias-label-secondary); }
|
|
1814
|
+
.dsh-mop-task-detail dd { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1815
|
+
`);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
/** 设置导航图标跟随 DSH 主题的 archive-outline 图标。 */
|
|
1819
|
+
function NavIcon({ size = 16 }) {
|
|
1820
|
+
return officialIcon('archive-outline', size);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
return {
|
|
1824
|
+
inject: ['slots', 'locale'],
|
|
1825
|
+
apply(ctx) {
|
|
1826
|
+
// 官方惯例:全部语言的词典随模块一次性注册;查找链自动回退英文与
|
|
1827
|
+
// locale 服务的 common 共享词典。
|
|
1828
|
+
ctx.effect(() => ctx.locale.register(NS, dictionaries), 'dsh-mop: dictionaries');
|
|
1829
|
+
// 所有文案都来自本插件命名空间;通用词(delete/close/retry 等)经
|
|
1830
|
+
// locale 服务的 common 命名空间自动回退。
|
|
1831
|
+
const t = ctx.locale.bind(NS);
|
|
1832
|
+
ctx.slots.inject('settings.section', () => ctx.slots.register({
|
|
1833
|
+
name: 'settings.section',
|
|
1834
|
+
id: 'dsh-mop',
|
|
1835
|
+
order: 60,
|
|
1836
|
+
label: () => t('actions.archive'),
|
|
1837
|
+
locale: NS,
|
|
1838
|
+
inject: () => {
|
|
1839
|
+
// 官方客户端服务(可选依赖,缺失时走本插件 Host 路由):
|
|
1840
|
+
// uiWorkspace 的归档动作与官方 toast 文案;sessions 列表刷新。
|
|
1841
|
+
const workspace = ctx.get?.('uiWorkspace');
|
|
1842
|
+
const sessionsService = ctx.get?.('sessions');
|
|
1843
|
+
return {
|
|
1844
|
+
t,
|
|
1845
|
+
...(typeof ctx.waterfall === 'function' ? { archiveNotice: (id) => ctx.waterfall('workspace/archive-notice', id, () => Promise.resolve(undefined)) } : {}),
|
|
1846
|
+
...(workspace && typeof workspace.archiveSession === 'function' && typeof workspace.unarchiveSession === 'function' ? { workspaceActions: workspace } : {}),
|
|
1847
|
+
...(sessionsService && typeof sessionsService.refresh === 'function' ? { sessionsService } : {}),
|
|
1848
|
+
};
|
|
1849
|
+
},
|
|
1850
|
+
}, SectionContent));
|
|
1851
|
+
ctx.slots.inject('settings.section.icon', () => ctx.slots.register({
|
|
1852
|
+
name: 'settings.section.icon',
|
|
1853
|
+
id: 'dsh-mop',
|
|
1854
|
+
}, NavIcon));
|
|
1855
|
+
},
|
|
1856
|
+
};
|
|
1857
|
+
},
|
|
1858
|
+
});
|
|
1859
|
+
|