dsh-mop 0.1.4 → 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/client.js CHANGED
@@ -1,77 +1,1075 @@
1
1
  /**
2
2
  * dsh-mop 浏览器半边:设置 → 归档会话。
3
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 语言一次性注册),不再使用按语言分块文件;
4
13
  */
5
14
  window.__ModuleLoader__.load({
6
15
  id: 'dsh-mop',
7
16
  factory(require) {
8
17
  const React = require('react');
9
18
  const { HoverCard, HoverCardGroup, StateDot, Button, Input, SegmentedTabs, Toast, Modal } = require('@deepseek-ai/dsh-client-ui-primitives');
10
- const { useState, useEffect, useLayoutEffect, useRef, useCallback, useSyncExternalStore } = React;
19
+ const { useState, useEffect, useCallback } = React;
11
20
  const h = React.createElement;
12
21
 
13
22
  const NS = 'dsh-mop';
14
23
 
15
- // 界面文案按语言放在同目录的 client.<语言>.js,由 DSH 按需下发,在 apply() 里载入。
16
- const LANGUAGE_FILES = ['zh', 'en', 'de', 'es', 'fr', 'ja', 'pt', 'ru'];
17
- let LOCALES = {};
18
-
19
- // 复用的 DSH 官方词条:插件的键 → 官方词典的命名空间、键和参数名。插件语言包里不要再定义这些键。
20
- const OFFICIAL_COPY = {
21
- 'host.updateRequired': { namespace: 'pluginManager', key: 'restartNotice', params: { reason: '' } },
22
- 'action.archiveCleanup': { namespace: 'common', key: 'delete' },
23
- 'tabs.archived': { namespace: 'workspace', key: 'row.archived' },
24
- 'selection.selectAll': { namespace: 'settings.models', key: 'fetchSelectAll' },
25
- 'selection.deselectAll': { namespace: 'settings.models', key: 'fetchDeselectAll' },
26
- 'confirm.purge.title': { namespace: 'settings.models', key: 'deleteTitle' },
27
- 'confirm.residue.title': { namespace: 'settings.models', key: 'deleteTitle' },
28
- 'action.purge': { namespace: 'common', key: 'delete' },
29
- 'action.clean': { namespace: 'common', key: 'delete' },
30
- 'notice.archived': { namespace: 'workspace', key: 'row.archived' },
31
- 'empty.residue': { namespace: 'conversation', key: 'detail.empty' },
32
- 'error.sessionNotFound': { namespace: 'conversation', key: 'placeholder.unavailable' },
33
- 'error.referenceCheck': { namespace: 'schedule.manager', key: 'list.error' },
34
- 'notice.failed': { namespace: 'workflowRun', key: 'statusCount.failed', params: { count: ['n', 'count'] } },
35
- 'residue.orphanTask': { namespace: 'schedule.manager', key: 'detail.sessionUnavailable' },
36
- 'error.schedule_delete_failed': { namespace: 'schedule.manager', key: 'toast.deleteFailed' },
37
- 'error.residue_unavailable': { namespace: 'contextMenu', key: 'failed' },
38
- 'error.purge_failed': { namespace: 'contextMenu', key: 'failed' },
39
- 'error.residue_failed': { namespace: 'contextMenu', key: 'failed' },
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
+ },
40
1059
  };
41
1060
 
42
1061
  const fill = (template, params) => String(template ?? '').replace(/\{(\w+)\}/g, (_, k) => String(params?.[k] ?? ''));
43
1062
 
44
- // Use the live official dictionaries first. Official keys have no plugin
45
- // copy (client.<language>.js must not define them), so an absent official
46
- // namespace leaves only the host's missing-key rendering.
47
- function officialTranslator(locale) {
48
- const own = locale.bind(NS);
49
- const translators = new Map();
50
- return (key, params) => {
51
- const entry = OFFICIAL_COPY[key];
52
- if (!entry) return own(key, params);
53
- const { namespace, key: officialKey, params: paramMap } = entry;
54
- if (!translators.has(namespace)) translators.set(namespace, locale.bind(namespace));
55
- const mapped = paramMap && Object.fromEntries(Object.entries(paramMap).map(([name, source]) => [
56
- name, Array.isArray(source) ? source.map((part) => params?.[part]).find((value) => value !== undefined) : source,
57
- ]));
58
- const value = translators.get(namespace)(officialKey, mapped ?? params);
59
- if (typeof value === 'string' && value !== officialKey) return key === 'host.updateRequired' ? value.trimEnd() : value;
60
- // Generic actions have no plugin translation: the official label is their only source.
61
- return ['action.archiveCleanup', 'action.purge', 'action.clean'].includes(key) ? value : own(key, params);
62
- };
63
- }
64
-
65
1063
  const ERROR_KEYS = { session_not_archived: 'error.notArchived',
66
1064
  session_not_found: 'error.sessionNotFound', protected_workspace: 'error.workspaceProtected', schedule_reference: 'reference.schedule',
67
1065
  reference_check_failed: 'error.referenceCheck' };
68
- function errorText(error, t, workspaceT = t) {
1066
+ function errorText(error, t) {
69
1067
  const message = String(error?.message ?? error ?? '');
70
1068
  const embedded = /dsh-mop:([a-z_]+)/.exec(message);
71
1069
  const code = embedded?.[1] || error?.code;
72
1070
  const errorKey = `error.${code}`;
73
- const key = ERROR_KEYS[code] || (Object.hasOwn(LOCALES.en, errorKey) || Object.hasOwn(OFFICIAL_COPY, errorKey) ? errorKey : null);
74
- const reason = code === 'already_archived' ? workspaceT('row.archived') : key ? t(key) : message;
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;
75
1073
  // Preserve diagnostics supplied by the host for failures without a
76
1074
  // plugin-defined code, while translating the actionable heading.
77
1075
  const diagnostic = ['purge_failed', 'residue_failed'].includes(code) ? error?.message : error?.detail;
@@ -159,53 +1157,22 @@ window.__ModuleLoader__.load({
159
1157
  return path.startsWith(`${root}/`) ? `~${path.slice(root.length)}` : path;
160
1158
  }
161
1159
 
162
- /** Keep the 24px content inset and 1px outside gap; flip when needed. */
163
- function HoverPlacement({ anchorRef }) {
164
- const marker = useRef(null);
165
- useLayoutEffect(() => {
166
- const card = marker.current?.closest('.dsh-mop-hover-content')?.parentElement;
167
- const portal = card?.parentElement;
168
- const anchor = anchorRef.current;
169
- const panel = anchor?.closest('[data-shortcut-modal="settings"]');
170
- if (!card || !portal || !panel) return;
171
- // The official component temporarily replaces card content after copy.
172
- // Keep placement on its portal, which survives the feedback state.
173
- portal.dataset.dshMopPositioned = '';
174
- const place = () => {
175
- const width = card.getBoundingClientRect().width;
176
- const anchorBounds = anchor.getBoundingClientRect();
177
- const right = anchorBounds.right + 24 + 1;
178
- const left = anchorBounds.left - width - 1;
179
- const x = right + width <= window.innerWidth - 8 ? right : Math.max(8, left);
180
- portal.style.setProperty('--dsh-mop-card-left', `${x}px`);
181
- };
182
- place();
183
- window.addEventListener('resize', place);
184
- window.addEventListener('scroll', place, true);
185
- return () => { window.removeEventListener('resize', place); window.removeEventListener('scroll', place, true); };
186
- }, [anchorRef]);
187
- return h('span', { ref: marker, hidden: true });
188
- }
189
-
190
- function cardContent({ title, path, time, statuses, archived, reason, tasks = [], anchorRef, onOpenTask, officialSchedule, scheduleSnapshot, catalogT, scheduleT }, t) {
1160
+ function cardContent({ title, path, time, statuses, archived, reason, tasks = [], onOpenTask }, t) {
191
1161
  const active = tasks.filter((task) => task.status === 'active').sort((a, b) => {
192
1162
  const next = (task) => Math.max(Date.parse(task.record?.scheduledAt) || 0, Date.parse(task.record?.deliveryFloorEndsAt) || 0);
193
1163
  return next(a) - next(b);
194
1164
  });
195
1165
  const visibleTasks = [...active.slice(0, 2), ...tasks.filter((task) => task.status !== 'active')];
196
1166
  return h('div', { className: 'dsh-mop-hover-content' },
197
- h(HoverPlacement, { anchorRef }), h('div', { className: 'dsh-mop-hover-title' }, title),
1167
+ h('div', { className: 'dsh-mop-hover-title' }, title),
198
1168
  path ? h('div', { className: 'dsh-mop-hover-path' }, path) : null,
199
1169
  time ? h('div', { className: 'dsh-mop-hover-time' }, time) : null,
200
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',
201
1171
  disabled: !task.id, onClick: (event) => { event.stopPropagation(); return onOpenTask?.(task.id); },
202
1172
  onKeyDown: (event) => { event.stopPropagation(); } },
203
- task.status === 'active' && task.officialVisible && officialSchedule && scheduleSnapshot?.settled
204
- ? h(officialSchedule, { sessionId: task.sessionId, t: catalogT,
205
- useCatalog: (selector) => selector({ ...scheduleSnapshot, records: [task.record] }) })
206
- : h(React.Fragment, null, officialIcon('clock-outline', 14), h('span', null, task.title || task.id),
207
- task.showStatus || task.status === 'paused' || task.status === 'ended' ? h('span', null, scheduleT?.(`status.${task.status}`)) : null))),
208
- active.length > 2 ? h('div', { className: 'dsh-mop-hover-time' }, catalogT?.('hover.more', { count: active.length - 2 })) : null,
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,
209
1176
  ...(statuses ?? []).map((entry) => h('div', { key: entry.key, className: 'dsh-mop-hover-status' },
210
1177
  h(StateDot, { state: entry.state }), h('span', null, t(entry.key, entry.params)))),
211
1178
  archived ? h('div', { className: 'dsh-mop-hover-status dsh-mop-hover-archived' },
@@ -256,90 +1223,6 @@ window.__ModuleLoader__.load({
256
1223
  delete element.dataset.clipped;
257
1224
  }
258
1225
 
259
- /** Join DSH's authoritative session-list flags without inferring from titles. */
260
- function mergeSessionSummaries(data, summary, rpcId) {
261
- if (summary.rpcId !== rpcId || !summary.result?.ok || !Array.isArray(summary.result.value?.items)) {
262
- throw new Error('session/list unavailable');
263
- }
264
- const byId = new Map(summary.result.value.items.map((item) => [item.sessionId, item]));
265
- const merge = (item) => {
266
- const current = byId.get(item.id);
267
- return current ? { ...item, blank: current.blank,
268
- updatedAt: Number.isFinite(current.updatedAt) && current.updatedAt > 0 ? current.updatedAt : item.mtimeMs,
269
- running: current.running,
270
- live: typeof current.running === 'boolean' ? current.running : item.live } : item;
271
- };
272
- return { ...data, sessions: (data.sessions ?? []).map(merge), recycled: (data.recycled ?? []).map(merge) };
273
- }
274
-
275
- /** Read the same root hooks used by the official workspace sidebar. */
276
- function LiveSection(props) {
277
- const liveSessions = props.useSessions((value) => value);
278
- const liveStatuses = props.useSessionStatus((value) => value);
279
- return h(SectionContent, { ...props, liveSessions, liveStatuses });
280
- }
281
-
282
- function SessionSection(props) {
283
- return typeof props.useSessions === 'function' && typeof props.useSessionStatus === 'function'
284
- ? h(LiveSection, props) : h(SectionContent, props);
285
- }
286
-
287
- function ScheduleSection(props) {
288
- const scheduleSnapshot = useSyncExternalStore(props.scheduleSource.subscribe, props.scheduleSource.getSnapshot, props.scheduleSource.getSnapshot);
289
- return h(SessionSection, { ...props, scheduleSnapshot });
290
- }
291
-
292
- function Section(props) {
293
- return props.scheduleSource && typeof useSyncExternalStore === 'function'
294
- ? h(ScheduleSection, props) : h(SessionSection, props);
295
- }
296
-
297
- function withSchedule(item, snapshot) {
298
- if (!snapshot?.settled || !Array.isArray(snapshot.records)) return item;
299
- const records = snapshot.records.filter((task) => (task.involvedSessionIds ?? []).includes(item.id)
300
- || (task.target?.kind !== 'new' && task.target?.sessionId === item.id)
301
- || task.lastDelivery?.targetSessionId === item.id);
302
- return { ...item,
303
- purgeBlock: item.purgeBlock === 'reference_check_failed' ? item.purgeBlock : records.length ? 'schedule_reference' : null,
304
- scheduleTasks: records.map((task) => ({ id: task.id, title: task.title || task.id, status: task.status, sessionId: item.id, record: task,
305
- officialVisible: (task.involvedSessionIds ?? []).includes(item.id) || (task.target?.kind !== 'new' && task.target?.sessionId === item.id) })) };
306
- }
307
-
308
- /** Overlay the authoritative live state without changing the persisted overview. */
309
- function liveItem(item, liveSessions, liveStatuses) {
310
- const current = liveSessions?.byId?.[item.id];
311
- const status = liveStatuses?.get?.(item.id);
312
- const running = status?.running ?? current?.running ?? item.running ?? item.live;
313
- const pending = ['approval', 'plan-review', 'question'].includes(status?.pendingInteraction?.kind)
314
- ? status.pendingInteraction.kind : undefined;
315
- const children = liveSessions?.projectionsBySession?.[item.id]?.values?.subagentCatalog;
316
- const runningChildren = Array.isArray(children) ? children.reduce((count, child) =>
317
- count + ((liveStatuses?.get?.(child.id)?.running ?? liveSessions?.byId?.[child.id]?.running) === true ? 1 : 0), 0) : 0;
318
- return { ...item,
319
- title: typeof current?.title === 'string' && current.title ? current.title : item.title,
320
- blank: typeof current?.blank === 'boolean' ? current.blank : item.blank,
321
- updatedAt: Number.isFinite(current?.updatedAt) && current.updatedAt > 0 ? current.updatedAt : item.updatedAt,
322
- running: running === true, pending, runningChildren,
323
- completed: status?.completionUnread === true,
324
- live: running === true || pending !== undefined || runningChildren > 0,
325
- };
326
- }
327
-
328
- // Mirrors the official workspace row's status precedence.
329
- function sessionStatuses(item) {
330
- const labels = { approval: 'status.waitingApproval', 'plan-review': 'status.planReview', question: 'status.waitingAnswer' };
331
- const child = item.runningChildren > 0 ? { state: 'ongoing',
332
- key: item.runningChildren === 1 ? 'status.subagentsRunning.one' : 'status.subagentsRunning.other',
333
- params: { n: item.runningChildren } } : null;
334
- let primary;
335
- if (labels[item.pending]) primary = { state: 'warning', key: labels[item.pending] };
336
- else if (item.running ?? item.live) primary = { state: 'ongoing', key: 'status.running' };
337
- else if (child) return [child];
338
- else if (item.completed) primary = { state: 'done', key: 'status.completed' };
339
- else primary = { state: 'idle', key: 'status.idle' };
340
- return child ? [primary, child] : [primary];
341
- }
342
-
343
1226
  function archiveActivityLine(entry, t) {
344
1227
  const items = Array.isArray(entry.items) ? entry.items : [];
345
1228
  const n = items.length;
@@ -368,7 +1251,7 @@ window.__ModuleLoader__.load({
368
1251
  return t('frequency.hostCustom');
369
1252
  }
370
1253
 
371
- function SectionContent({ t, workspaceT = t, scheduleT = t, catalogT = scheduleT, liveSessions, liveStatuses, scheduleSnapshot, officialSchedule, workspaceActions, sessionsService, archiveNotice }) {
1254
+ function SectionContent({ t, archiveNotice, workspaceActions, sessionsService }) {
372
1255
  const [tab, setTab] = useState('sessions');
373
1256
  const [query, setQuery] = useState('');
374
1257
  const [overview, setOverview] = useState(null);
@@ -382,12 +1265,14 @@ window.__ModuleLoader__.load({
382
1265
 
383
1266
  const workspaceName = (item) => {
384
1267
  const title = item.workspaceTitle || item.workspacePath;
385
- return title === 'default-workspace' ? t('workspace.defaultName') : title || workspaceT('group.ungrouped');
1268
+ return title === 'default-workspace' ? t('workspace.defaultName') : title || t('group.ungrouped');
386
1269
  };
387
- const displayTitle = (item) => item.blank === true ? workspaceT('session.new')
1270
+ const displayTitle = (item) => item.blank === true ? t('session.new')
388
1271
  : item.title === 'default-workspace' ? t('workspace.defaultName') : item.title;
389
- const sessionItems = (overview?.sessions ?? []).map((item) => withSchedule(liveItem(item, liveSessions, liveStatuses), scheduleSnapshot));
390
- const archivedItems = (overview?.recycled ?? []).map((item) => withSchedule(liveItem(item, liveSessions, liveStatuses), scheduleSnapshot));
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 ?? [];
391
1276
  const tabItems = () => (tab === 'sessions' ? sessionItems : archivedItems);
392
1277
  const selectableIds = new Set(tabItems().filter((item) => !item.protected).map((item) => item.id));
393
1278
  const selectedSessionIds = [...checked].filter((id) => selectableIds.has(id));
@@ -398,7 +1283,7 @@ window.__ModuleLoader__.load({
398
1283
  const next = new Set([...current].filter((id) => selectableIds.has(id)));
399
1284
  return next.size === current.size ? current : next;
400
1285
  });
401
- }, [tab, overview, liveSessions, liveStatuses]);
1286
+ }, [tab, overview]);
402
1287
 
403
1288
  const refresh = useCallback(async () => {
404
1289
  setBusy(true);
@@ -413,22 +1298,7 @@ window.__ModuleLoader__.load({
413
1298
  return;
414
1299
  }
415
1300
  if (!Array.isArray(raw?.residue?.items)) throw new Error('invalid residue response');
416
- const data = raw;
417
- // DSH 的 session/list 含官方 blank 标志;标题不等于空白状态。
418
- try {
419
- const rpcId = globalThis.crypto?.randomUUID?.() ?? `dsh-mop-${Date.now()}-${Math.random()}`;
420
- const summaryResponse = await fetch('api/session/list', {
421
- method: 'POST', headers: { 'content-type': 'application/json' },
422
- body: JSON.stringify({ type: 'client-request', rpcId, method: 'session/list', payload: { args: { _request: {} } } }),
423
- });
424
- if (!summaryResponse.ok) throw new Error(`HTTP ${summaryResponse.status}`);
425
- const summary = await summaryResponse.json();
426
- Object.assign(data, mergeSessionSummaries(data, summary, rpcId));
427
- } catch (error) {
428
- // 无法取得标记时仍展示清单;不要根据标题猜测空白状态。
429
- console.warn('dsh-mop: session status unavailable', error);
430
- }
431
- setOverview(data);
1301
+ setOverview(raw);
432
1302
  setLoadError(false);
433
1303
  } catch {
434
1304
  setLoadError(true);
@@ -475,17 +1345,16 @@ window.__ModuleLoader__.load({
475
1345
  }, [refresh, showNotice]);
476
1346
 
477
1347
  const reportArchived = async (done, failed = [], stopped = false) => {
478
- const detail = failed.map((item) => errorText(item, t, workspaceT)).filter(Boolean).join('; ');
1348
+ const detail = failed.map((item) => errorText(item, t)).filter(Boolean).join('; ');
479
1349
  const single = done.length === 1 && failed.length === 0;
480
1350
  const notices = archiveNotice ? await Promise.all(done.map(async (id) => {
481
1351
  try { return await archiveNotice(id); } catch { return undefined; }
482
1352
  })) : [];
483
1353
  const extra = notices.filter((notice) => notice?.text);
484
- const text = single ? extra[0]?.text ?? workspaceT(stopped ? 'toast.stoppedAndArchived' : 'toast.archived')
1354
+ const text = single ? extra[0]?.text ?? t(stopped ? 'toast.stoppedAndArchived' : 'toast.archived')
485
1355
  : resultText(t, done.length, fill(t('notice.archived'), { n: done.length }), failed.length, detail);
486
1356
  const actions = done.length ? [{
487
- label: workspaceT('toast.archivedUndo'), ...(single ? {} : { prefix: ' · ' }),
488
- onClick: async () => {
1357
+ label: t('toast.archivedUndo'), ...(single ? {} : { prefix: t('toast.archivedOr') }), onClick: async () => {
489
1358
  try {
490
1359
  setNotice(null);
491
1360
  let result;
@@ -497,11 +1366,11 @@ window.__ModuleLoader__.load({
497
1366
  }
498
1367
  result = { failed: errors };
499
1368
  } else result = await post('unarchive', { sessionIds: done });
500
- const detail = result.failed.map((failure) => errorText(failure, t, workspaceT)).filter(Boolean).join('; ');
1369
+ const detail = result.failed.map((failure) => errorText(failure, t)).filter(Boolean).join('; ');
501
1370
  report(result.failed.length ? resultText(t, 0, '', result.failed.length, detail) : '', result.failed.length > 0);
502
1371
  } catch (error) { showNotice(errorText(error, t), true); }
503
1372
  },
504
- }, { prefix: workspaceT('toast.archivedOr'), label: t('action.archiveCleanup'), onClick: () => {
1373
+ }, { prefix: t('toast.archivedOr'), label: t('delete'), onClick: () => {
505
1374
  setNotice(null); setChecked(new Set()); setQuery(''); setSearchCollapsed(new Set()); setTab('recycled');
506
1375
  } }] : undefined;
507
1376
  report(single || !extra.length ? text : `${text} · ${extra.map((notice) => notice.text).join(' · ')}`,
@@ -550,7 +1419,7 @@ window.__ModuleLoader__.load({
550
1419
  await reportArchived(retry.done, [], true);
551
1420
  next();
552
1421
  } else {
553
- showNotice(retry.failed.map((failure) => errorText(failure, t, workspaceT) || t('load.failed')).join('; '), true);
1422
+ showNotice(retry.failed.map((failure) => errorText(failure, t) || t('load.failed')).join('; '), true);
554
1423
  }
555
1424
  } catch (error) { showNotice(errorText(error, t), true); }
556
1425
  } });
@@ -559,7 +1428,7 @@ window.__ModuleLoader__.load({
559
1428
  } catch (error) {
560
1429
  showNotice(errorText(error, t), true);
561
1430
  }
562
- }, [checked, tab, overview, liveSessions, liveStatuses, post, report, showNotice, t, workspaceT, workspaceActions, archiveNotice]);
1431
+ }, [checked, tab, overview, post, report, showNotice, t, workspaceActions, archiveNotice]);
563
1432
 
564
1433
  const runPurge = useCallback(async () => {
565
1434
  try {
@@ -576,7 +1445,7 @@ window.__ModuleLoader__.load({
576
1445
  } catch (error) {
577
1446
  showNotice(errorText(error, t), true);
578
1447
  }
579
- }, [checked, tab, overview, liveSessions, liveStatuses, scheduleSnapshot, post, report, showNotice, t, workspaceT, workspaceActions, syncSessionList]);
1448
+ }, [checked, tab, overview, post, report, showNotice, t, syncSessionList]);
580
1449
 
581
1450
  const runRestore = useCallback(async () => {
582
1451
  try {
@@ -594,12 +1463,12 @@ window.__ModuleLoader__.load({
594
1463
  } finally { setBusy(false); }
595
1464
  } else r = await post('unarchive', { sessionIds: selectedSessionIds });
596
1465
  setChecked(new Set(r.failed.map((item) => item.id)));
597
- const detail = r.failed.map((item) => errorText(item, t, workspaceT)).filter(Boolean).join('; ');
1466
+ const detail = r.failed.map((item) => errorText(item, t)).filter(Boolean).join('; ');
598
1467
  report(r.failed.length ? resultText(t, 0, '', r.failed.length, detail) : '', r.failed.length > 0);
599
1468
  } catch (error) {
600
1469
  showNotice(errorText(error, t), true);
601
1470
  }
602
- }, [checked, tab, overview, liveSessions, liveStatuses, post, report, showNotice, t, workspaceActions]);
1471
+ }, [checked, tab, overview, post, report, showNotice, t, workspaceActions]);
603
1472
 
604
1473
  const runClean = useCallback(async (confirmedTasks = {}) => {
605
1474
  try {
@@ -621,16 +1490,15 @@ window.__ModuleLoader__.load({
621
1490
  const ui = {
622
1491
  checked,
623
1492
  home: overview?.home,
624
- officialSchedule, scheduleSnapshot, catalogT, scheduleT,
625
1493
  onOpenTask: async (sessionId, taskId) => {
626
1494
  try {
627
1495
  const result = await post('task', { sessionId, id: taskId });
628
- if (!result.task) throw new Error(scheduleT('detail.missing'));
1496
+ if (!result.task) throw new Error(t('detail.missing'));
629
1497
  setDialog({ kind: 'taskDetail', task: result.task });
630
1498
  } catch (error) {
631
1499
  const message = String(error?.message ?? error);
632
- showNotice(message.includes('dsh-mop:task_not_found') ? scheduleT('detail.missing')
633
- : message.includes('dsh-mop:task_unavailable') ? scheduleT('list.error') : errorText(error, t), true);
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);
634
1502
  }
635
1503
  },
636
1504
  onSelect: (key, on) => setChecked((prev) => {
@@ -676,7 +1544,7 @@ window.__ModuleLoader__.load({
676
1544
  : tabItems().filter((x) => checked.has(x.id));
677
1545
  const measuredItems = selectedItems.filter((x) => typeof x.sizeBytes === 'number' && Number.isFinite(x.sizeBytes));
678
1546
  const selectedBytes = measuredItems.length ? measuredItems.reduce((sum, x) => sum + x.sizeBytes, 0) : null;
679
- const tabLabels = { sessions: workspaceT('section.sessions'), recycled: t('tabs.archived'), residue: t('tabs.residue') };
1547
+ const tabLabels = { sessions: t('section.sessions'), recycled: t('tabs.archived'), residue: t('tabs.residue') };
680
1548
  const searchPlaceholder = t('search.placeholder', { section: tabLabels[tab] });
681
1549
  const confirmResidue = () => {
682
1550
  const tasks = selectedItems.filter((item) => item.kind === 'orphan-task');
@@ -689,7 +1557,7 @@ window.__ModuleLoader__.load({
689
1557
  return h('div', { className: 'dsh-mop' },
690
1558
  h(Style, null),
691
1559
  h('div', { className: 'dsh-mop-header' }, h(SegmentedTabs, {
692
- className: 'dsh-mop-tabs', size: 'sm', label: workspaceT('actions.archive'), value: tab,
1560
+ className: 'dsh-mop-tabs', size: 'sm', label: t('actions.archive'), value: tab,
693
1561
  items: [['sessions', tabLabels.sessions], ['recycled', tabLabels.recycled], ['residue', tabLabels.residue]]
694
1562
  .map(([value, label]) => ({ value, label, id: `dsh-mop-tab-${value}`, panelId: `dsh-mop-panel-${value}` })),
695
1563
  onChange: (key) => { if (busy) return; setTab(key); setChecked(new Set()); setQuery(''); setSearchCollapsed(new Set()); setDialog(null); },
@@ -703,48 +1571,47 @@ window.__ModuleLoader__.load({
703
1571
  !overview ? h('div', { className: 'dsh-mop-body dsh-mop-state' },
704
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,
705
1573
  overview && tab !== 'residue' ? h('div', { className: 'dsh-mop-body', role: 'tabpanel', id: `dsh-mop-panel-${tab}`, 'aria-labelledby': `dsh-mop-tab-${tab}` },
706
- visibleItems.length === 0 ? h('p', { className: 'dsh-mop-state' }, query.trim() ? workspaceT('empty.noMatches')
707
- : (tab === 'sessions' ? workspaceT('empty.none') : workspaceT('empty.noneArchived'))) :
708
- h(HoverCardGroup, null, ...renderGroups(visibleItems, (x, check) => sessionCard(x, t, check, workspaceT), ui,
709
- { t, workspaceT }))) : null,
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,
710
1577
  overview && tab === 'residue' ? h('div', { className: 'dsh-mop-body', role: 'tabpanel', id: `dsh-mop-panel-${tab}`, 'aria-labelledby': `dsh-mop-tab-${tab}` },
711
- visibleResidue.length === 0 ? h('p', { className: 'dsh-mop-state' }, query.trim() ? workspaceT('empty.noMatches') : t('empty.residue')) :
712
- h(HoverCardGroup, null, ...renderResidueGroups(visibleResidue, ui, t, workspaceT))) : null,
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,
713
1580
  h('div', { className: 'dsh-mop-foot' },
714
1581
  dialog?.kind === 'taskDetail' ? h(Modal, {
715
- open: true, onClose: () => setDialog(null), closeLabel: scheduleT('detail.close'), className: 'dsh-mop-dialog',
716
- title: scheduleT('detail.label'),
717
- footer: h(Button, { variant: 'outline', onClick: () => setDialog(null) }, workspaceT('close')),
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')),
718
1585
  }, h('dl', { className: 'dsh-mop-task-detail' },
719
1586
  ...[
720
- [scheduleT('detail.name'), dialog.task.title],
721
- [scheduleT('detail.instruction'), dialog.task.prompt],
722
- [scheduleT('statusFilter.label'), scheduleT(`status.${dialog.task.status}`)],
723
- [scheduleT('rule.repeat'), taskRule(dialog.task, scheduleT)],
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)],
724
1591
  ...(dialog.task.status === 'active' && dialog.task.scheduledAt && Number.isFinite(Date.parse(dialog.task.scheduledAt))
725
- ? [[scheduleT('detail.nextRun'), new Date(dialog.task.scheduledAt).toLocaleString()]] : []),
726
- [scheduleT('host.target'), scheduleT(dialog.task.target?.kind === 'session' ? 'host.currentConversation'
1592
+ ? [[t('detail.nextRun'), new Date(dialog.task.scheduledAt).toLocaleString()]] : []),
1593
+ [t('host.target'), t(dialog.task.target?.kind === 'session' ? 'host.currentConversation'
727
1594
  : dialog.task.target?.kind === 'new_once' ? 'host.targetNewOnce' : 'host.targetNew')],
728
1595
  ].flatMap(([label, value], index) => [h('dt', { key: `label-${index}` }, label), h('dd', { key: `value-${index}` }, value)])))
729
1596
  : dialog?.kind === 'archiveActive' ? h(Modal, {
730
- open: true, onClose: () => { if (!busy) dialog.next(); }, closeLabel: workspaceT('close'), className: 'dsh-mop-dialog',
731
- title: workspaceT('archive.confirm.title'),
732
- description: workspaceT('archive.confirm.desc', { title: dialog.item.title || dialog.item.id }),
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 }),
733
1600
  footer: h(React.Fragment, null,
734
- h(Button, { variant: 'outline', disabled: busy, onClick: dialog.next, 'data-modal-autofocus': '' }, workspaceT('cancel')),
1601
+ h(Button, { variant: 'outline', disabled: busy, onClick: dialog.next, 'data-modal-autofocus': '' }, t('cancel')),
735
1602
  h(Button, { variant: 'outline', className: 'dsh-mop-danger', disabled: busy, onClick: dialog.run },
736
- workspaceT(busy ? 'archive.confirm.pending' : 'archive.confirm.action'))),
737
- }, h('ul', { 'aria-label': workspaceT('archive.confirm.activity') },
738
- ...dialog.item.activity.map((entry, index) => h('li', { key: index }, archiveActivityLine(entry, workspaceT)))),
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)))),
739
1606
  dialog.item.activity.some((entry) => entry.kind === 'schedule') ? h('p', { role: 'note' }, t('archive.scheduleDeletion')) : null)
740
1607
  : dialog ? h(Modal, {
741
1608
  open: true, className: 'dsh-mop-dialog', title: dialog.text,
742
1609
  description: dialog.kind === 'purge' ? t('confirm.purge.description') : dialog.taskNames?.length ? t('confirm.tasks.description') : undefined,
743
- closeLabel: workspaceT('close'), onClose: () => setDialog(null),
1610
+ closeLabel: t('close'), onClose: () => setDialog(null),
744
1611
  footer: h('div', { className: 'dsh-mop-confirm-actions' },
745
- h(Button, { variant: 'outline', onClick: () => setDialog(null), 'data-modal-autofocus': '' }, scheduleT('delete.cancel')),
1612
+ h(Button, { variant: 'outline', onClick: () => setDialog(null), 'data-modal-autofocus': '' }, t('cancel')),
746
1613
  h(Button, { variant: 'outline', className: 'dsh-mop-danger',
747
- onClick: async () => { const d = dialog; setDialog(null); await d.run(); } }, scheduleT(dialog.kind === 'purge' ? 'delete.confirm' : 'clear.confirm'))),
1614
+ onClick: async () => { const d = dialog; setDialog(null); await d.run(); } }, t(dialog.kind === 'purge' ? 'delete.confirm' : 'clear.confirm'))),
748
1615
  }, dialog.taskNames?.length ? h('div', { className: 'dsh-mop-confirm-tasks' },
749
1616
  h('ul', null, ...dialog.taskNames.map((name, index) => h('li', { key: index }, name)))) : null)
750
1617
  : null,
@@ -753,29 +1620,31 @@ window.__ModuleLoader__.load({
753
1620
  onDone: () => setNotice((current) => current?.seq === notice.seq ? null : current) }) : null,
754
1621
  h(React.Fragment, null,
755
1622
  h('span', { className: 'dsh-mop-foot-info' },
756
- fill(t('selection.summary'), { n: checked.size, size: formatBytes(selectedBytes) })),
1623
+ selectedBytes === null
1624
+ ? t('selection.summaryCount', { n: checked.size })
1625
+ : fill(t('selection.summary'), { n: checked.size, size: formatBytes(selectedBytes) })),
757
1626
  tab === 'sessions' ? h(Button, { variant: 'outline', disabled: !ready || selectedSessionIds.length === 0,
758
- onClick: runArchive }, workspaceT('actions.archive')) : null,
1627
+ onClick: runArchive }, t('actions.archive')) : null,
759
1628
  tab === 'recycled' ? [
760
1629
  h(Button, { key: 'restore', variant: 'outline', disabled: !ready || selectedSessionIds.length === 0,
761
- onClick: runRestore }, workspaceT('actions.unarchive')),
1630
+ onClick: runRestore }, t('actions.unarchive')),
762
1631
  h(Button, { key: 'action.purge', variant: 'outline', className: 'dsh-mop-danger', disabled: !ready || selectedSessionIds.length === 0,
763
- onClick: () => setDialog({ kind: 'purge', text: t('confirm.purge.title', { provider: t('tabs.archived') }), run: runPurge }) }, t('action.purge')),
1632
+ onClick: () => setDialog({ kind: 'purge', text: t('confirm.purge.title', { provider: t('tabs.archived') }), run: runPurge }) }, t('delete')),
764
1633
  ] : null,
765
1634
  tab === 'residue' ? h(Button, { variant: 'outline', className: 'dsh-mop-danger', disabled: !ready || checked.size === 0,
766
- onClick: confirmResidue }, t('action.clean')) : null)));
1635
+ onClick: confirmResidue }, t('delete')) : null)));
767
1636
  }
768
1637
 
769
1638
  /** 会话行:状态/选择框 + 标题 + 右侧元信息。 */
770
- function sessionCard(x, t, checkNode, workspaceT = t) {
1639
+ function sessionCard(x, t, checkNode) {
771
1640
  const timestamp = sessionTime(x);
772
- const time = timestamp > 0 ? relativeTime(timestamp, workspaceT) : '';
773
- const status = sessionStatuses(x)[0];
1641
+ const time = timestamp > 0 ? relativeTime(timestamp, t) : '';
1642
+ const status = sessionStatus(x);
774
1643
  return {
775
1644
  main: [
776
1645
  x.protected ? h('span', { className: 'dsh-mop-lead', 'aria-label': t('protection.label') }, officialIcon('shield-outline', 14)) : checkNode,
777
- ...(x.live && !x.protected ? [h('span', { className: 'dsh-mop-lead', 'aria-label': workspaceT(status.key, status.params) }, h(StateDot, { state: status.state }))] : []),
778
- h('span', { className: 'dsh-mop-title' }, x.blank === true ? workspaceT('session.new') : x.title),
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),
779
1648
  h('span', { className: 'dsh-mop-row-side has-columns' },
780
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 }) },
781
1650
  x.purgeBlock && !x.protected ? officialIcon('shield-outline', 14) : null),
@@ -785,11 +1654,17 @@ window.__ModuleLoader__.load({
785
1654
  };
786
1655
  }
787
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
+
788
1665
  /** DSH theme's shared icon sprite, used by the official workspace rows. */
789
- function groupHeading(key, title, isCollapsed, ui, path, createdAt, workspaceT) {
790
- const anchorRef = { current: null };
1666
+ function groupHeading(key, title, isCollapsed, ui, path, createdAt, t) {
791
1667
  const button = h('button', {
792
- ref: anchorRef,
793
1668
  type: 'button', className: 'dsh-mop-group-name',
794
1669
  onClick: () => ui.onToggleCollapse(key), 'aria-expanded': !isCollapsed,
795
1670
  },
@@ -798,53 +1673,51 @@ window.__ModuleLoader__.load({
798
1673
  officialIcon('triangle-right-fill', 14, `dsh-mop-chevron${isCollapsed ? '' : ' is-open'}`)),
799
1674
  h('span', { className: 'dsh-mop-group-label' }, title));
800
1675
  return h('div', { className: 'dsh-mop-group-title' }, path && createdAt != null && Number.isFinite(new Date(createdAt).getTime())
801
- ? rowWithHover(`workspace:${key}`, button, cardContent({ anchorRef, title, path: displayPath(path, ui.home),
802
- time: workspaceCreatedLabel(createdAt, workspaceT) }, workspaceT), workspaceT, path)
1676
+ ? rowWithHover(`workspace:${key}`, button, cardContent({ title, path: displayPath(path, ui.home),
1677
+ time: workspaceCreatedLabel(createdAt, t) }, t), t, path)
803
1678
  : button);
804
1679
  }
805
1680
 
806
1681
  /** 按工作区分组的行;ui = {checked, onSelect(key), collapsed, onToggleCollapse(key)}。 */
807
- function renderGroups(items, cardOf, ui, { t, workspaceT }) {
1682
+ function renderGroups(items, cardOf, ui, t) {
808
1683
  const byWs = new Map();
809
1684
  for (const it of sortByDisplayedTime(items, sessionTime)) {
810
1685
  const key = it.workspacePath || it.workspaceTitle || '';
811
- if (!byWs.has(key)) byWs.set(key, { title: it.workspaceTitle || it.workspacePath || workspaceT('group.ungrouped'), path: it.workspacePath, createdAt: it.workspaceCreatedAt, list: [] });
1686
+ if (!byWs.has(key)) byWs.set(key, { title: it.workspaceTitle || it.workspacePath || t('group.ungrouped'), path: it.workspacePath, createdAt: it.workspaceCreatedAt, list: [] });
812
1687
  byWs.get(key).list.push(it);
813
1688
  }
814
1689
  return [...byWs.entries()].map(([wsKey, group]) => {
815
1690
  const isCollapsed = ui.collapsed.has(wsKey);
816
1691
  return h('div', { key: wsKey, className: 'dsh-mop-group' },
817
- groupHeading(wsKey, group.title, isCollapsed, ui, group.path, group.createdAt, workspaceT),
1692
+ groupHeading(wsKey, group.title, isCollapsed, ui, group.path, group.createdAt, t),
818
1693
  isCollapsed ? null : group.list.map((x) => {
819
- const anchorRef = { current: null };
820
1694
  const blocked = x.protected;
821
1695
  const card = cardOf(x, blocked ? h('span', { className: 'dsh-mop-lead' }, '·') : h('input', {
822
1696
  type: 'checkbox', className: 'dsh-mop-check', checked: ui.checked.has(x.id),
823
1697
  onChange: () => ui.onSelect(x.id, !ui.checked.has(x.id)), 'aria-label': x.title,
824
1698
  }));
825
- const row = h('label', { ref: anchorRef, className: `dsh-mop-row${blocked ? ' is-static' : ''}${x.archived ? ' is-archived' : ''}${ui.checked.has(x.id) ? ' is-selected' : ''}`,
1699
+ const row = h('label', { className: `dsh-mop-row${blocked ? ' is-static' : ''}${x.archived ? ' is-archived' : ''}${ui.checked.has(x.id) ? ' is-selected' : ''}`,
826
1700
  onPointerEnter: titleEnter, onPointerLeave: titleLeave },
827
1701
  h('div', { className: 'dsh-mop-row-main' }, ...card.main));
828
1702
  const timestamp = sessionTime(x);
829
- return rowWithHover(x.id, row, cardContent({ anchorRef, title: x.title, path: displayPath(x.cwd || x.workspacePath, ui.home),
830
- time: x.blank ? '' : hoverTime(timestamp, workspaceT),
831
- statuses: sessionStatuses(x).filter((status) => !x.archived || !['idle', 'done'].includes(status.state)),
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)] : [],
832
1706
  archived: x.archived, tasks: x.purgeBlock === 'schedule_reference' ? x.scheduleTasks ?? [] : [],
833
- officialSchedule: ui.officialSchedule, scheduleSnapshot: ui.scheduleSnapshot, catalogT: ui.catalogT, scheduleT: ui.scheduleT,
834
1707
  onOpenTask: (taskId) => ui.onOpenTask?.(x.id, taskId),
835
- reason: x.protected ? t('protection.label') : x.purgeBlock === 'reference_check_failed' ? t('error.referenceCheck') : x.purgeBlock === 'schedule_reference' && !x.scheduleTasks?.length ? t('reference.schedule') : '' }, workspaceT),
836
- workspaceT, x.blank ? undefined : x.title);
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);
837
1710
  }));
838
1711
  });
839
1712
  }
840
1713
 
841
1714
  /** 按可核实的工作区分组。 */
842
- function renderResidueGroups(items, ui, t, workspaceT) {
1715
+ function renderResidueGroups(items, ui, t) {
843
1716
  const byWorkspace = new Map();
844
1717
  for (const item of sortByDisplayedTime(items, residueTime)) {
845
1718
  const workspaceKey = item.workspacePath || '';
846
1719
  if (!byWorkspace.has(workspaceKey)) byWorkspace.set(workspaceKey, {
847
- title: item.workspaceTitle || item.workspacePath || workspaceT('group.ungrouped'), path: item.workspacePath, createdAt: item.workspaceCreatedAt, entries: [],
1720
+ title: item.workspaceTitle || item.workspacePath || t('group.ungrouped'), path: item.workspacePath, createdAt: item.workspaceCreatedAt, entries: [],
848
1721
  });
849
1722
  byWorkspace.get(workspaceKey).entries.push(item);
850
1723
  }
@@ -852,11 +1725,10 @@ window.__ModuleLoader__.load({
852
1725
  const key = `residue:workspace:${workspaceKey}`;
853
1726
  const isCollapsed = ui.collapsed.has(key);
854
1727
  return h('div', { key, className: 'dsh-mop-group' },
855
- groupHeading(key, group.title, isCollapsed, ui, group.path, group.createdAt, workspaceT),
1728
+ groupHeading(key, group.title, isCollapsed, ui, group.path, group.createdAt, t),
856
1729
  isCollapsed ? null : group.entries.map((item) => {
857
- const anchorRef = { current: null };
858
1730
  const reason = item.kind === 'orphan-task' ? t('residue.orphanTask') : item.relatedRegistration ? t('residue.registeredCache') : '';
859
- const row = h('label', { ref: anchorRef, onPointerEnter: titleEnter, onPointerLeave: titleLeave,
1731
+ const row = h('label', { onPointerEnter: titleEnter, onPointerLeave: titleLeave,
860
1732
  className: `dsh-mop-row${ui.checked.has(item.key) ? ' is-selected' : ''}` },
861
1733
  h('div', { className: 'dsh-mop-row-main' },
862
1734
  h('input', { type: 'checkbox', className: 'dsh-mop-check', checked: ui.checked.has(item.key),
@@ -865,13 +1737,13 @@ window.__ModuleLoader__.load({
865
1737
  h('span', { className: 'dsh-mop-row-side has-columns' },
866
1738
  h('span', { className: 'dsh-mop-marker', 'aria-hidden': true }, item.kind === 'orphan-task' ? officialIcon('clock-outline', 14) : null),
867
1739
  h('span', { className: 'dsh-mop-size' }, typeof item.sizeBytes === 'number' ? formatBytes(item.sizeBytes) : ''),
868
- h('span', { className: 'dsh-mop-time' }, residueTime(item) > 0 ? relativeTime(residueTime(item), workspaceT) : ''))));
869
- return rowWithHover(item.key, row, cardContent({ anchorRef, title: item.label,
1740
+ h('span', { className: 'dsh-mop-time' }, residueTime(item) > 0 ? relativeTime(residueTime(item), t) : ''))));
1741
+ return rowWithHover(item.key, row, cardContent({ title: item.label,
870
1742
  path: displayPath(item.kind === 'orphan-task' ? item.targetSessionId : item.workspacePath || (item.id !== item.label ? item.id : ''), ui.home),
871
- time: hoverTime(residueTime(item), workspaceT), reason,
1743
+ time: hoverTime(residueTime(item), t), reason,
872
1744
  tasks: item.kind === 'orphan-task' ? [{ id: item.id, title: item.label, status: item.status, showStatus: true }] : [],
873
- scheduleT: ui.scheduleT, onOpenTask: (taskId) => ui.onOpenTask?.(item.targetSessionId, taskId) }, workspaceT),
874
- workspaceT, item.label);
1745
+ onOpenTask: (taskId) => ui.onOpenTask?.(item.targetSessionId, taskId) }, t),
1746
+ t, item.label);
875
1747
  }));
876
1748
  });
877
1749
  }
@@ -894,8 +1766,6 @@ window.__ModuleLoader__.load({
894
1766
  .dsh-mop-group-title > span:has(> .dsh-mop-group-name) { display: block; width: 100%; }
895
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; }
896
1768
  .dsh-mop-group-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
897
- /* Official compact card is portaled above the settings panel. */
898
- span[data-dsh-mop-positioned] > div { z-index: 1001; max-width: calc(100vw - 16px); left: var(--dsh-mop-card-left) !important; }
899
1769
  .dsh-mop-hover-content { display: flex; flex-direction: column; gap: 8px; }
900
1770
  .dsh-mop-hover-title { color: var(--dsw-alias-hovercard-label-primary); font-size: 14px; line-height: 20px; overflow-wrap: break-word; }
901
1771
  .dsh-mop-hover-path { color: var(--dsw-alias-hovercard-label-secondary); font-size: 12px; line-height: 16px; word-break: break-all; }
@@ -939,7 +1809,6 @@ span[data-dsh-mop-positioned] > div { z-index: 1001; max-width: calc(100vw - 16p
939
1809
  .dsh-mop-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
940
1810
  .dsh-mop-confirm-tasks { min-width: 0; }
941
1811
  .dsh-mop-confirm-tasks ul { margin: 4px 0 0; padding-left: 20px; }
942
- div:has(> .dsh-mop-dialog) { z-index: 1002; }
943
1812
  .dsh-mop-task-detail { display: grid; gap: 6px; margin: 0; font-size: 14px; }
944
1813
  .dsh-mop-task-detail dt { color: var(--dsw-alias-label-secondary); }
945
1814
  .dsh-mop-task-detail dd { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
@@ -953,40 +1822,32 @@ div:has(> .dsh-mop-dialog) { z-index: 1002; }
953
1822
 
954
1823
  return {
955
1824
  inject: ['slots', 'locale'],
956
- async apply(ctx) {
957
- // 语言包是包内 chunk:宿主按需下发,地址带版本号,之后走浏览器缓存。
958
- // 单个语言载入失败只让该语言回退英文;英文不可用则无法显示界面。
959
- const loaded = await Promise.allSettled(LANGUAGE_FILES.map(async (language) =>
960
- [language, (await require.async(`./client.${language}.js`)).messages]));
961
- for (const [index, item] of loaded.entries()) {
962
- if (item.status === 'rejected') console.warn(`dsh-mop: ${LANGUAGE_FILES[index]} UI text unavailable`, item.reason);
963
- }
964
- LOCALES = Object.fromEntries(loaded.filter((item) => item.status === 'fulfilled').map((item) => item.value));
965
- if (!LOCALES.en) throw new Error('dsh-mop: English UI text could not be loaded');
966
- ctx.effect(() => ctx.locale.register(NS, LOCALES));
967
- const t = officialTranslator(ctx.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);
968
1832
  ctx.slots.inject('settings.section', () => ctx.slots.register({
969
1833
  name: 'settings.section',
970
1834
  id: 'dsh-mop',
971
1835
  order: 60,
972
- label: () => ctx.locale.bind('workspace')('actions.archive'),
1836
+ label: () => t('actions.archive'),
973
1837
  locale: NS,
974
1838
  inject: () => {
1839
+ // 官方客户端服务(可选依赖,缺失时走本插件 Host 路由):
1840
+ // uiWorkspace 的归档动作与官方 toast 文案;sessions 列表刷新。
975
1841
  const workspace = ctx.get?.('uiWorkspace');
976
1842
  const sessionsService = ctx.get?.('sessions');
977
- const entries = ctx.slots.entriesOfSlot?.('sidebar.session.row.hover') ?? ctx.slots.entries?.('sidebar.session.row.hover') ?? [];
978
- const entry = entries.find((item) => item.options?.id === 'schedule-tasks');
979
- let scheduleSource;
980
- try { scheduleSource = entry?.inject?.()?.hooks?.catalog; } catch { /* optional official task view */ }
981
- return { t, workspaceT: ctx.locale.bind('workspace'), scheduleT: ctx.locale.bind('schedule.manager'),
982
- catalogT: ctx.locale.bind('schedule.catalog'),
1843
+ return {
1844
+ t,
983
1845
  ...(typeof ctx.waterfall === 'function' ? { archiveNotice: (id) => ctx.waterfall('workspace/archive-notice', id, () => Promise.resolve(undefined)) } : {}),
984
1846
  ...(workspace && typeof workspace.archiveSession === 'function' && typeof workspace.unarchiveSession === 'function' ? { workspaceActions: workspace } : {}),
985
1847
  ...(sessionsService && typeof sessionsService.refresh === 'function' ? { sessionsService } : {}),
986
- ...(entry?.component && typeof scheduleSource?.subscribe === 'function' && typeof scheduleSource?.getSnapshot === 'function'
987
- ? { officialSchedule: entry.component, scheduleSource } : {}) };
1848
+ };
988
1849
  },
989
- }, Section));
1850
+ }, SectionContent));
990
1851
  ctx.slots.inject('settings.section.icon', () => ctx.slots.register({
991
1852
  name: 'settings.section.icon',
992
1853
  id: 'dsh-mop',
@@ -995,3 +1856,4 @@ div:has(> .dsh-mop-dialog) { z-index: 1002; }
995
1856
  };
996
1857
  },
997
1858
  });
1859
+