codexmate 0.1.30 → 0.1.32

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.
Files changed (77) hide show
  1. package/README.md +98 -7
  2. package/README.vi.md +98 -7
  3. package/README.zh.md +99 -7
  4. package/cli/agents-files.js +18 -4
  5. package/cli/config-bootstrap.js +25 -11
  6. package/cli/plugin-config.js +64 -0
  7. package/cli/prompt-history.js +17 -4
  8. package/cli/system-prompt-files.js +7 -2
  9. package/cli.js +396 -46
  10. package/lib/cli-config-engine.js +266 -0
  11. package/lib/cli-utils.js +2 -1
  12. package/lib/cli-webhook.js +1 -1
  13. package/lib/handoff-mcp.js +282 -0
  14. package/lib/http-access-control.js +335 -0
  15. package/lib/session-context-health.js +82 -0
  16. package/lib/session-context-records.js +153 -0
  17. package/lib/thread-handoff.js +130 -0
  18. package/lib/web-startup-auth.js +53 -0
  19. package/lib/workflow-engine.js +92 -21
  20. package/lib/workflow-runner.js +261 -0
  21. package/package.json +1 -1
  22. package/plugins/prompt-templates/computed.mjs +3 -3
  23. package/plugins/prompt-templates/invocation.mjs +73 -0
  24. package/plugins/prompt-templates/methods.mjs +48 -3
  25. package/plugins/prompt-templates/overview.mjs +2 -0
  26. package/web-ui/app.js +48 -2
  27. package/web-ui/index.html +1 -0
  28. package/web-ui/logic.context-health.mjs +144 -0
  29. package/web-ui/modules/access-token.mjs +33 -0
  30. package/web-ui/modules/api.mjs +2 -1
  31. package/web-ui/modules/app.computed.prompts.mjs +11 -0
  32. package/web-ui/modules/app.methods.agents.mjs +20 -3
  33. package/web-ui/modules/app.methods.index.mjs +6 -0
  34. package/web-ui/modules/app.methods.navigation.mjs +17 -3
  35. package/web-ui/modules/app.methods.prompts-editor.mjs +7 -0
  36. package/web-ui/modules/app.methods.providers.mjs +2 -2
  37. package/web-ui/modules/app.methods.runtime.mjs +3 -2
  38. package/web-ui/modules/app.methods.session-actions.mjs +3 -0
  39. package/web-ui/modules/app.methods.session-browser.mjs +6 -2
  40. package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
  41. package/web-ui/modules/app.methods.workflows.mjs +41 -0
  42. package/web-ui/modules/context-health.methods.mjs +70 -0
  43. package/web-ui/modules/i18n/locales/en.mjs +70 -2
  44. package/web-ui/modules/i18n/locales/ja.mjs +70 -2
  45. package/web-ui/modules/i18n/locales/vi.mjs +70 -2
  46. package/web-ui/modules/i18n/locales/zh-tw.mjs +70 -2
  47. package/web-ui/modules/i18n/locales/zh.mjs +70 -2
  48. package/web-ui/modules/plugins.methods.mjs +2 -0
  49. package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
  50. package/web-ui/modules/sessions-filters-url.mjs +3 -0
  51. package/web-ui/modules/skills.methods.mjs +6 -5
  52. package/web-ui/modules/thread-handoff.mjs +142 -0
  53. package/web-ui/partials/index/context-health.html +45 -0
  54. package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
  55. package/web-ui/partials/index/panel-config-claude.html +2 -0
  56. package/web-ui/partials/index/panel-config-codex.html +2 -0
  57. package/web-ui/partials/index/panel-config-kilocode.html +3 -1
  58. package/web-ui/partials/index/panel-config-openclaw.html +2 -0
  59. package/web-ui/partials/index/panel-config-opencode.html +3 -1
  60. package/web-ui/partials/index/panel-config-pi.html +2 -0
  61. package/web-ui/partials/index/panel-dashboard.html +59 -0
  62. package/web-ui/partials/index/panel-plugins.html +37 -9
  63. package/web-ui/partials/index/panel-prompts.html +46 -18
  64. package/web-ui/partials/index/panel-sessions.html +35 -44
  65. package/web-ui/partials/index/thread-handoff.html +59 -0
  66. package/web-ui/res/web-ui-render.precompiled.js +1289 -177
  67. package/web-ui/styles/context-health.css +107 -0
  68. package/web-ui/styles/controls-forms.css +9 -0
  69. package/web-ui/styles/dashboard.css +51 -0
  70. package/web-ui/styles/modals-core.css +87 -0
  71. package/web-ui/styles/navigation-panels.css +1 -1
  72. package/web-ui/styles/plugins-panel.css +62 -0
  73. package/web-ui/styles/prompts-editor.css +34 -4
  74. package/web-ui/styles/responsive.css +19 -10
  75. package/web-ui/styles/sessions-preview.css +206 -111
  76. package/web-ui/styles/sub-tabs.css +181 -0
  77. package/web-ui/styles.css +2 -0
@@ -78,6 +78,13 @@ export function createPromptsEditorMethods(options = {}) {
78
78
  promptsEditorMeta(key) {
79
79
  return PROMPTS_EDITOR_META[key] || null;
80
80
  },
81
+ promptPathFileName(path) {
82
+ const normalized = typeof path === 'string' ? path.trim() : '';
83
+ if (!normalized) {
84
+ return '';
85
+ }
86
+ return normalized.split(/[\\/]/).filter(Boolean).pop() || normalized;
87
+ },
81
88
 
82
89
 
83
90
  refreshPromptsPreview(key) {
@@ -1,6 +1,6 @@
1
1
  import { nextCodexProviderName } from './provider-default-names.mjs';
2
2
 
3
- const PROVIDER_NAME_PATTERN = /^[a-zA-Z0-9._-]+$/;
3
+ const PROVIDER_NAME_PATTERN = /^[a-zA-Z0-9_-]+$/;
4
4
  const RESERVED_PROXY_PROVIDER_NAME = 'codexmate-proxy';
5
5
  const RESERVED_LOCAL_PROVIDER_NAME = 'local';
6
6
 
@@ -88,7 +88,7 @@ function getProviderValidationForContext(vm, mode = 'add') {
88
88
  if (!name) {
89
89
  errors.name = '名称不能为空';
90
90
  } else if (!isValidProviderNameInputValue(name)) {
91
- errors.name = '名称仅支持字母/数字/._-';
91
+ errors.name = '名称仅支持字母/数字/_-';
92
92
  } else if (isReservedProviderCreationNameInput(name)) {
93
93
  errors.name = 'codexmate-proxy 为保留名称,不可手动添加';
94
94
  } else if (findProviderByName(vm.providersList, name)) {
@@ -1,3 +1,4 @@
1
+ import { withAccessToken } from './access-token.mjs';
1
2
  import {
2
3
  buildSpeedTestIssue,
3
4
  formatLatency
@@ -219,7 +220,7 @@ export function createRuntimeMethods(options = {}) {
219
220
  return;
220
221
  }
221
222
  this.claudeDownloadProgress = 100;
222
- const downloadUrl = `/download/${encodeURIComponent(res.fileName)}`;
223
+ const downloadUrl = withAccessToken(`/download/${encodeURIComponent(res.fileName)}`);
223
224
  const link = document.createElement('a');
224
225
  link.href = downloadUrl;
225
226
  link.download = res.fileName;
@@ -260,7 +261,7 @@ export function createRuntimeMethods(options = {}) {
260
261
  return;
261
262
  }
262
263
  this.codexDownloadProgress = 100;
263
- const downloadUrl = `/download/${encodeURIComponent(res.fileName)}`;
264
+ const downloadUrl = withAccessToken(`/download/${encodeURIComponent(res.fileName)}`);
264
265
  const link = document.createElement('a');
265
266
  link.href = downloadUrl;
266
267
  link.download = res.fileName;
@@ -1,3 +1,4 @@
1
+ import { getAccessToken } from './access-token.mjs';
1
2
  import {
2
3
  normalizeConfigTemplateDiffConfirmEnabled
3
4
  } from './config-template-confirm-pref.mjs';
@@ -124,6 +125,8 @@ export function createSessionActionMethods(options = {}) {
124
125
  params.set('source', source);
125
126
  if (sessionId) params.set('sessionId', sessionId);
126
127
  if (filePath) params.set('filePath', filePath);
128
+ const accessToken = getAccessToken();
129
+ if (accessToken) params.set('token', accessToken);
127
130
  return `${origin}/session?${params.toString()}`;
128
131
  },
129
132
 
@@ -460,7 +460,9 @@ export function createSessionBrowserMethods(options = {}) {
460
460
  const scrollEl = this.getSessionPreviewScrollContainer();
461
461
  if (!scrollEl) return;
462
462
  if (typeof scrollEl.scrollTo === 'function') {
463
- scrollEl.scrollTo({ top: 0, behavior: 'smooth' });
463
+ const reduceMotion = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
464
+ const instant = (typeof document !== 'undefined' && document.hidden) || reduceMotion;
465
+ scrollEl.scrollTo({ top: 0, behavior: instant ? 'instant' : 'smooth' });
464
466
  } else {
465
467
  scrollEl.scrollTop = 0;
466
468
  }
@@ -470,7 +472,9 @@ export function createSessionBrowserMethods(options = {}) {
470
472
  const scrollEl = this.getSessionPreviewScrollContainer();
471
473
  if (!scrollEl) return;
472
474
  if (typeof scrollEl.scrollTo === 'function') {
473
- scrollEl.scrollTo({ top: scrollEl.scrollHeight, behavior: 'smooth' });
475
+ const reduceMotion = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
476
+ const instant = (typeof document !== 'undefined' && document.hidden) || reduceMotion;
477
+ scrollEl.scrollTo({ top: scrollEl.scrollHeight, behavior: instant ? 'instant' : 'smooth' });
474
478
  } else {
475
479
  scrollEl.scrollTop = scrollEl.scrollHeight;
476
480
  }
@@ -76,6 +76,7 @@ export function createSystemPromptMethods(options = {}) {
76
76
  this.sysPromptPath = res.path || '';
77
77
  this.sysPromptExists = !!res.exists;
78
78
  this.sysPromptHash = res.hash || '';
79
+ this.sysHistoryBucket = res.historyBucket || '';
79
80
  } catch (e) {
80
81
  if (!isLatestRequestToken(this, '_sysPromptOpenRequestToken', requestToken)) return;
81
82
  this.showMessage(this.t('toast.load.fail'), 'error');
@@ -309,6 +310,8 @@ export function createSystemPromptMethods(options = {}) {
309
310
  ? bucketArg.trim()
310
311
  : this.resolveSysHistoryBucket();
311
312
  this.sysHistoryBucket = bucket;
313
+ const requestToken = Symbol('history-list');
314
+ this._sysHistoryRequestToken = requestToken;
312
315
  this.sysHistoryLoading = true;
313
316
  this.sysHistoryError = '';
314
317
  this.sysHistoryItems = [];
@@ -316,20 +319,24 @@ export function createSystemPromptMethods(options = {}) {
316
319
  this.sysHistoryPreviewContent = '';
317
320
  try {
318
321
  const res = await api('list-prompt-history', { bucket });
322
+ if (this._sysHistoryRequestToken !== requestToken || !this.sysHistoryVisible || this.sysHistoryBucket !== bucket) return;
319
323
  if (res && res.error) {
320
324
  this.sysHistoryError = res.error;
321
325
  return;
322
326
  }
323
327
  this.sysHistoryItems = Array.isArray(res) ? res : [];
324
328
  } catch (e) {
329
+ if (this._sysHistoryRequestToken !== requestToken) return;
325
330
  this.sysHistoryError = this.t('toast.load.fail');
326
331
  } finally {
327
- this.sysHistoryLoading = false;
332
+ if (this._sysHistoryRequestToken === requestToken) this.sysHistoryLoading = false;
328
333
  }
329
334
  },
330
335
 
331
336
  closeSysHistory() {
332
337
  this.sysHistoryVisible = false;
338
+ this._sysHistoryRequestToken = null;
339
+ this.sysHistoryLoading = false;
333
340
  this.sysHistoryPreviewId = '';
334
341
  this.sysHistoryPreviewContent = '';
335
342
  this.sysHistoryError = '';
@@ -339,10 +346,15 @@ export function createSystemPromptMethods(options = {}) {
339
346
  if (!item || !item.id) return;
340
347
  if (this.sysHistoryLoading) return;
341
348
  if (this.sysHistoryPreviewId === item.id && this.sysHistoryPreviewContent) return;
349
+ const bucket = this.sysHistoryBucket;
350
+ const requestToken = Symbol('history-preview');
351
+ this._sysHistoryRequestToken = requestToken;
352
+ this.sysHistoryLoading = true;
342
353
  this.sysHistoryPreviewId = item.id;
343
354
  this.sysHistoryPreviewContent = '';
344
355
  try {
345
- const res = await api('get-prompt-history', { bucket: this.sysHistoryBucket, id: item.id });
356
+ const res = await api('get-prompt-history', { bucket, id: item.id });
357
+ if (this._sysHistoryRequestToken !== requestToken || !this.sysHistoryVisible || this.sysHistoryBucket !== bucket) return;
346
358
  if (res && res.error) {
347
359
  this.sysHistoryError = res.error;
348
360
  this.sysHistoryPreviewId = '';
@@ -350,8 +362,11 @@ export function createSystemPromptMethods(options = {}) {
350
362
  }
351
363
  this.sysHistoryPreviewContent = typeof res.content === 'string' ? res.content : '';
352
364
  } catch (e) {
365
+ if (this._sysHistoryRequestToken !== requestToken) return;
353
366
  this.sysHistoryError = this.t('toast.load.fail');
354
367
  this.sysHistoryPreviewId = '';
368
+ } finally {
369
+ if (this._sysHistoryRequestToken === requestToken) this.sysHistoryLoading = false;
355
370
  }
356
371
  },
357
372
 
@@ -0,0 +1,41 @@
1
+ export function createWorkflowMethods({ api }) {
2
+ return {
3
+ async refreshWorkflowRuns() {
4
+ try {
5
+ const [definitions, result] = await Promise.all([api('workflow-list'), api('workflow-active-runs')]);
6
+ if (result.error || definitions.error) throw new Error(result.error || definitions.error);
7
+ this.workflowDefinitions = definitions.workflows || [];
8
+ this.workflowRuns = (result.runs || []).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
9
+ this.workflowError = '';
10
+ } catch (error) { this.workflowError = error.message; }
11
+ },
12
+ async submitWorkflowRun() {
13
+ this.workflowBusy = true;
14
+ try {
15
+ const input = JSON.parse(this.workflowInput);
16
+ const result = await api('workflow-submit', { id: this.workflowId, input, allowWrite: this.workflowAllowWrite });
17
+ if (result.error || result.ok === false) throw new Error(result.error || this.t('workflow.submitFailed'));
18
+ await this.refreshWorkflowRuns();
19
+ } catch (error) { this.workflowError = error instanceof SyntaxError ? this.t('workflow.invalidJson') : error.message; }
20
+ finally { this.workflowBusy = false; }
21
+ },
22
+ async controlWorkflowRun(run, action) {
23
+ this.workflowBusy = true;
24
+ try {
25
+ const params = { runId: run.id };
26
+ if (action === 'resume') {
27
+ params.input = JSON.parse(this.workflowInput);
28
+ params.allowWrite = this.workflowAllowWrite;
29
+ }
30
+ const result = await api(`workflow-${action}`, params);
31
+ if (result.error && !result.id) throw new Error(result.error);
32
+ await this.refreshWorkflowRuns();
33
+ } catch (error) { this.workflowError = error instanceof SyntaxError ? this.t('workflow.invalidJson') : error.message; }
34
+ finally { this.workflowBusy = false; }
35
+ },
36
+ workflowStatusLabel(status) {
37
+ return ['queued', 'running', 'waiting', 'completed', 'failed', 'cancelling', 'cancelled'].includes(status)
38
+ ? this.t(`workflow.status.${status}`) : status;
39
+ }
40
+ };
41
+ }
@@ -0,0 +1,70 @@
1
+ export function createContextHealthMethods({ api }) {
2
+ return {
3
+ async loadSessionContextHealth(force = false) {
4
+ if (!this.activeSession || (this.mainTab !== 'sessions' && !this.sessionStandalone)) return;
5
+ const session = this.activeSession;
6
+ const stamp = `${this.getSessionExportKey(session)}:${this.sessionDetailRequestSeq}`;
7
+ if (force !== true && this.sessionContextHealthStamp === stamp) return;
8
+ this.sessionContextHealthStamp = stamp;
9
+ this.sessionContextHealth = null;
10
+ this.sessionContextHealthError = '';
11
+ this.sessionContextHealthFocusedNode = null;
12
+ this.sessionContextHealthLoading = true;
13
+ try {
14
+ const result = await api('session-context-health', { source: session.source,
15
+ sessionId: session.sessionId, filePath: session.filePath, cwd: session.cwd });
16
+ if (this.activeSession !== session || this.sessionContextHealthStamp !== stamp) return;
17
+ if (result.error) throw new Error(result.error);
18
+ this.sessionContextHealth = Object.freeze(result);
19
+ } catch (error) {
20
+ if (this.activeSession === session && this.sessionContextHealthStamp === stamp) {
21
+ this.sessionContextHealthError = error.message || this.t('toast.load.fail');
22
+ }
23
+ } finally {
24
+ if (this.sessionContextHealthStamp === stamp) this.sessionContextHealthLoading = false;
25
+ }
26
+ },
27
+ toggleContextHealthDetails() {
28
+ this.sessionContextHealthPinned = !this.sessionContextHealthPinned;
29
+ this.sessionContextHealthExpanded = this.sessionContextHealthPinned;
30
+ },
31
+ leaveContextHealthDetails() {
32
+ if (!this.sessionContextHealthPinned) this.sessionContextHealthExpanded = false;
33
+ },
34
+ contextHealthReasonLabel(reason) {
35
+ return this.t(`contextHealth.reason.${reason}`);
36
+ },
37
+ async jumpToContextHealthNode(node) {
38
+ if (!this.activeSession || this.sessionContextHealthNodeLoading) return;
39
+ const session = this.activeSession;
40
+ const stamp = this.sessionContextHealthStamp;
41
+ this.sessionContextHealthNodeLoading = true;
42
+ this.sessionContextHealthError = '';
43
+ try {
44
+ const result = await api('session-context-node', { source: session.source,
45
+ sessionId: session.sessionId, filePath: session.filePath, cwd: session.cwd, nodeId: node.id });
46
+ if (this.activeSession !== session || this.sessionContextHealthStamp !== stamp) return;
47
+ if (result.error) throw new Error(result.error);
48
+ this.sessionContextHealthFocusedNode = Object.freeze({ ...result.node,
49
+ estimatedTokens: node.estimatedTokens, percentage: node.percentage });
50
+ const matching = node.id.includes('.') ? -1
51
+ : this.activeSessionMessages.findIndex((message) => message.recordLineIndex === result.node.recordLineIndex
52
+ && typeof message.text === 'string' && message.text.trim() === result.node.text.trim());
53
+ if (matching >= 0 && this.sessionPreviewRenderEnabled) {
54
+ this.sessionPreviewVisibleCount = Math.max(this.sessionPreviewVisibleCount, matching + 1);
55
+ }
56
+ await this.$nextTick();
57
+ const message = matching >= 0 ? this.activeSessionMessages[matching] : null;
58
+ const key = message ? this.getRecordRenderKey(message, matching) : '';
59
+ const original = key && this.sessionMessageRefMap[key];
60
+ const target = original || this.$refs.contextHealthFocusedMessage;
61
+ if (target) {
62
+ target.scrollIntoView({ block: 'start', behavior: 'auto' });
63
+ if (target === this.$refs.contextHealthFocusedMessage) target.focus();
64
+ }
65
+ } catch (error) {
66
+ if (this.activeSession === session) this.sessionContextHealthError = error.message || this.t('toast.load.fail');
67
+ } finally { this.sessionContextHealthNodeLoading = false; }
68
+ }
69
+ };
70
+ }
@@ -1,4 +1,69 @@
1
1
  const en = Object.freeze({
2
+ 'contextHealth.title': "Context health",
3
+ 'contextHealth.loading': "Scanning the complete session…",
4
+ 'contextHealth.composition': "Context composition",
5
+ 'contextHealth.estimateHint': "Estimated from stored readable text; not actual request usage",
6
+ 'contextHealth.nodes': "message nodes",
7
+ 'contextHealth.topFive': "Top 5 largest nodes",
8
+ 'contextHealth.jump': "Jump to this message",
9
+ 'contextHealth.empty': "No readable messages to analyze",
10
+ 'contextHealth.hotspots': "Bloat hotspots",
11
+ 'contextHealth.message': "Located message node",
12
+ 'contextHealth.category.system': "System & Rules",
13
+ 'contextHealth.category.user': "User Prompts",
14
+ 'contextHealth.category.assistant': "Assistant Reasoning & Text",
15
+ 'contextHealth.category.tools': "Tool Outputs / Logs",
16
+ 'contextHealth.category.code': "Code Blocks",
17
+ 'contextHealth.level.healthy': "Healthy < 32k",
18
+ 'contextHealth.level.heavy': "Heavy 32k–64k",
19
+ 'contextHealth.level.bloated': "Bloated > 64k",
20
+ 'contextHealth.reason.dominant_message': "Single node exceeds 15%",
21
+ 'contextHealth.reason.repeated_file_read': "Repeated file read",
22
+ 'contextHealth.reason.long_error_log': "Long error log",
23
+ 'ecosystem.rollbackConfirm': "Rollback replaces the current configuration and unsaved edits. The current version is backed up before writing.",
24
+ 'ecosystem.variablesTitle': "Fill template variables",
25
+ 'ecosystem.variablesHint': "Values are used only for this invocation. Paste git_diff text; no commands are executed.",
26
+ 'ecosystem.variablesRequired': "Fill every variable.",
27
+ 'ecosystem.useTemplate': "Use template",
28
+ 'ecosystem.share': "Share template",
29
+ 'ecosystem.rollback': "Roll back to this version",
30
+ 'ecosystem.historyCompare': "Historical version → current content",
31
+ 'ecosystem.before': "Historical version",
32
+ 'ecosystem.current': "Current content",
33
+ 'ecosystem.storageFail': "Failed to save plugin configuration.",
34
+ 'ecosystem.cacheFail': "Template configuration saved; browser cache update failed.",
35
+ 'workflow.tagline': "Choose a task. Let it run in the background.",
36
+ 'workflow.options': "Input parameters",
37
+ 'workflow.title': "Automated workflows",
38
+ 'workflow.description': "You can close this page after submitting. Safe steps resume after the service restarts; intervention is requested when a write outcome is unclear.",
39
+ 'workflow.definition': "Task definition",
40
+ 'workflow.noDefinitions': "No task definitions available",
41
+ 'workflow.input': "Input (JSON)",
42
+ 'workflow.inputHint': "Before continuing, load the original input and verify authorization.",
43
+ 'workflow.allowWrite': "Authorize writes for this task",
44
+ 'workflow.submit': "Submit task",
45
+ 'workflow.submitting': "Submitting…",
46
+ 'workflow.refresh': "Refresh results",
47
+ 'workflow.refreshing': "Refreshing…",
48
+ 'workflow.runs': "Run history",
49
+ 'workflow.empty': "No runs yet",
50
+ 'workflow.emptyHint': "After submitting a task, view its status and execution results here.",
51
+ 'workflow.loadInput': "Load original input",
52
+ 'workflow.resume': "Continue after confirming input and authorization",
53
+ 'workflow.cancel': "Cancel further execution",
54
+ 'workflow.summary': "Results and unfinished items",
55
+ 'workflow.details': "Execution details and notification status",
56
+ 'workflow.runId': "Run ID",
57
+ 'workflow.submitFailed': "Submission failed",
58
+ 'workflow.invalidJson': "Enter valid JSON.",
59
+ 'workflow.status.queued': "Queued",
60
+ 'workflow.status.running': "Running",
61
+ 'workflow.status.waiting': "Action required",
62
+ 'workflow.status.completed': "Completed",
63
+ 'workflow.status.failed': "Failed",
64
+ 'workflow.status.cancelling': "Cancelling, waiting for the tool to finish",
65
+ 'workflow.status.cancelled': "Cancelled",
66
+
2
67
  // Global
3
68
  'lang.zh': '中文',
4
69
  'lang.zh-tw': '繁體中文',
@@ -230,8 +295,11 @@ const en = Object.freeze({
230
295
  'subtitle.prompts': 'Edit AGENTS.md and CLAUDE.md.',
231
296
  'prompts.subTab.codex': 'AGENTS.md (Codex)',
232
297
  'prompts.subTab.opencode': 'AGENTS.md (OpenCode)',
233
- 'prompts.subTab.project': 'CLAUDE.md',
234
- 'prompts.subTab.system': 'System Prompt (Pi)',
298
+ 'prompts.subTab.project': 'CLAUDE.md (Claude)',
299
+ 'prompts.subTab.system': 'SYSTEM.md (Pi)',
300
+ 'prompts.path.fullPath': 'Full path',
301
+ 'prompts.actions.edit': 'Edit',
302
+ 'prompts.actions.view': 'View',
235
303
  'prompts.pathReference.title': 'Insert rule reference',
236
304
  'prompts.pathReference.placeholder': 'Insert rule reference…',
237
305
  'prompts.pathReference.codex': 'AGENTS.md (Codex)',
@@ -1,4 +1,69 @@
1
1
  const ja = Object.freeze({
2
+ 'contextHealth.title': "コンテキスト診断",
3
+ 'contextHealth.loading': "会話全体を走査中…",
4
+ 'contextHealth.composition': "コンテキストの構成比率",
5
+ 'contextHealth.estimateHint': "保存された読めるテキストからの推定値。実際のリクエスト使用量とは異なります",
6
+ 'contextHealth.nodes': "メッセージノード",
7
+ 'contextHealth.topFive': "使用量の多い Top 5",
8
+ 'contextHealth.jump': "このメッセージへ移動",
9
+ 'contextHealth.empty': "集計できるテキストがありません",
10
+ 'contextHealth.hotspots': "肥大化ホットスポット",
11
+ 'contextHealth.message': "移動先のメッセージ",
12
+ 'contextHealth.category.system': "システムとルール",
13
+ 'contextHealth.category.user': "ユーザー指示",
14
+ 'contextHealth.category.assistant': "モデルの応答と思考",
15
+ 'contextHealth.category.tools': "ツール出力とログ",
16
+ 'contextHealth.category.code': "コードと Diff",
17
+ 'contextHealth.level.healthy': "正常 < 32k",
18
+ 'contextHealth.level.heavy': "重い 32k–64k",
19
+ 'contextHealth.level.bloated': "肥大 > 64k",
20
+ 'contextHealth.reason.dominant_message': "単一ノードが 15% 超",
21
+ 'contextHealth.reason.repeated_file_read': "ファイルの重複読み込み",
22
+ 'contextHealth.reason.long_error_log': "長いエラーログ",
23
+ 'ecosystem.rollbackConfirm': "ロールバックは現在の設定と未保存の編集を置き換えます。書き込み前に現在のバージョンをバックアップします。",
24
+ 'ecosystem.variablesTitle': "テンプレート変数を入力",
25
+ 'ecosystem.variablesHint': "入力値は今回の呼び出しだけで使用します。git_diff は差分テキストを貼り付けてください。コマンドは実行しません。",
26
+ 'ecosystem.variablesRequired': "すべての変数を入力してください。",
27
+ 'ecosystem.useTemplate': "テンプレートを使用",
28
+ 'ecosystem.share': "テンプレートを共有",
29
+ 'ecosystem.rollback': "このバージョンに戻す",
30
+ 'ecosystem.historyCompare': "履歴バージョン → 現在の内容",
31
+ 'ecosystem.before': "履歴バージョン",
32
+ 'ecosystem.current': "現在の内容",
33
+ 'ecosystem.storageFail': "プラグイン設定の保存に失敗しました。",
34
+ 'ecosystem.cacheFail': "テンプレート設定を保存しました。ブラウザーのキャッシュ更新に失敗しました。",
35
+ 'workflow.tagline': "タスクを選んで、あとはバックグラウンドで。",
36
+ 'workflow.options': "入力パラメーター",
37
+ 'workflow.title': "自動ワークフロー",
38
+ 'workflow.description': "送信後はこのページを閉じられます。サービスの再起動後、安全なステップから再開します。書き込み結果が不明な場合は対応を求めます。",
39
+ 'workflow.definition': "タスク定義",
40
+ 'workflow.noDefinitions': "利用可能なタスク定義はありません",
41
+ 'workflow.input': "入力(JSON)",
42
+ 'workflow.inputHint': "続行前に元の入力を読み込み、権限を確認してください。",
43
+ 'workflow.allowWrite': "今回のタスクの書き込みを許可",
44
+ 'workflow.submit': "タスクを送信",
45
+ 'workflow.submitting': "送信中…",
46
+ 'workflow.refresh': "結果を更新",
47
+ 'workflow.refreshing': "更新中…",
48
+ 'workflow.runs': "実行履歴",
49
+ 'workflow.empty': "実行履歴はありません",
50
+ 'workflow.emptyHint': "タスクを送信すると、ここで状態と実行結果を確認できます。",
51
+ 'workflow.loadInput': "元の入力を読み込む",
52
+ 'workflow.resume': "入力と権限を確認して続行",
53
+ 'workflow.cancel': "以降の実行をキャンセル",
54
+ 'workflow.summary': "結果と未完了項目",
55
+ 'workflow.details': "実行の詳細と通知状態",
56
+ 'workflow.runId': "実行ID",
57
+ 'workflow.submitFailed': "送信に失敗しました",
58
+ 'workflow.invalidJson': "有効なJSONを入力してください。",
59
+ 'workflow.status.queued': "待機中",
60
+ 'workflow.status.running': "実行中",
61
+ 'workflow.status.waiting': "対応が必要",
62
+ 'workflow.status.completed': "完了",
63
+ 'workflow.status.failed': "失敗",
64
+ 'workflow.status.cancelling': "キャンセル処理中、ツールの終了を待っています",
65
+ 'workflow.status.cancelled': "キャンセル済み",
66
+
2
67
 
3
68
  // Global
4
69
  'lang.zh': '中国語',
@@ -231,8 +296,11 @@ const ja = Object.freeze({
231
296
  'subtitle.prompts': 'AGENTS.md と CLAUDE.md を編集。',
232
297
  'prompts.subTab.codex': 'AGENTS.md (Codex)',
233
298
  'prompts.subTab.opencode': 'AGENTS.md (OpenCode)',
234
- 'prompts.subTab.project': 'CLAUDE.md',
235
- 'prompts.subTab.system': 'System Prompt (Pi)',
299
+ 'prompts.subTab.project': 'CLAUDE.md (Claude)',
300
+ 'prompts.subTab.system': 'SYSTEM.md (Pi)',
301
+ 'prompts.path.fullPath': 'フルパス',
302
+ 'prompts.actions.edit': '編集',
303
+ 'prompts.actions.view': '表示',
236
304
  'prompts.pathReference.title': 'ルール参照を挿入',
237
305
  'prompts.pathReference.placeholder': 'ルール参照を挿入…',
238
306
  'prompts.pathReference.codex': 'AGENTS.md (Codex)',
@@ -1,4 +1,69 @@
1
1
  const vi = Object.freeze({
2
+ 'contextHealth.title': "Sức khỏe ngữ cảnh",
3
+ 'contextHealth.loading': "Đang quét toàn bộ phiên…",
4
+ 'contextHealth.composition': "Tỷ lệ thành phần ngữ cảnh",
5
+ 'contextHealth.estimateHint': "Ước tính từ văn bản đọc được đã lưu; không phải mức dùng thực tế",
6
+ 'contextHealth.nodes': "nút tin nhắn",
7
+ 'contextHealth.topFive': "Top 5 nút lớn nhất",
8
+ 'contextHealth.jump': "Đi đến tin nhắn này",
9
+ 'contextHealth.empty': "Không có văn bản để phân tích",
10
+ 'contextHealth.hotspots': "Điểm phình ngữ cảnh",
11
+ 'contextHealth.message': "Nút tin nhắn được định vị",
12
+ 'contextHealth.category.system': "Hệ thống và quy tắc",
13
+ 'contextHealth.category.user': "Chỉ dẫn người dùng",
14
+ 'contextHealth.category.assistant': "Văn bản và suy luận của mô hình",
15
+ 'contextHealth.category.tools': "Đầu ra công cụ và nhật ký",
16
+ 'contextHealth.category.code': "Mã và Diff",
17
+ 'contextHealth.level.healthy': "Khỏe < 32k",
18
+ 'contextHealth.level.heavy': "Nặng 32k–64k",
19
+ 'contextHealth.level.bloated': "Phình > 64k",
20
+ 'contextHealth.reason.dominant_message': "Một nút vượt 15%",
21
+ 'contextHealth.reason.repeated_file_read': "Đọc lại cùng tệp",
22
+ 'contextHealth.reason.long_error_log': "Nhật ký lỗi dài",
23
+ 'ecosystem.rollbackConfirm': "Khôi phục sẽ thay thế cấu hình hiện tại và nội dung chưa lưu. Phiên bản hiện tại được sao lưu trước khi ghi.",
24
+ 'ecosystem.variablesTitle': "Điền biến mẫu",
25
+ 'ecosystem.variablesHint': "Giá trị chỉ dùng cho lần gọi này. Dán văn bản git_diff; không thực thi lệnh.",
26
+ 'ecosystem.variablesRequired': "Điền tất cả các biến.",
27
+ 'ecosystem.useTemplate': "Dùng mẫu",
28
+ 'ecosystem.share': "Chia sẻ mẫu",
29
+ 'ecosystem.rollback': "Khôi phục phiên bản này",
30
+ 'ecosystem.historyCompare': "Phiên bản lịch sử → nội dung hiện tại",
31
+ 'ecosystem.before': "Phiên bản lịch sử",
32
+ 'ecosystem.current': "Nội dung hiện tại",
33
+ 'ecosystem.storageFail': "Không thể lưu cấu hình plugin.",
34
+ 'ecosystem.cacheFail': "Đã lưu cấu hình mẫu; không thể cập nhật bộ nhớ đệm trình duyệt.",
35
+ 'workflow.tagline': "Chọn tác vụ. Để hệ thống tiếp tục chạy nền.",
36
+ 'workflow.options': "Tham số đầu vào",
37
+ 'workflow.title': "Quy trình tự động",
38
+ 'workflow.description': "Bạn có thể đóng trang sau khi gửi. Các bước an toàn tiếp tục sau khi dịch vụ khởi động lại; hệ thống yêu cầu can thiệp khi chưa rõ kết quả ghi.",
39
+ 'workflow.definition': "Định nghĩa tác vụ",
40
+ 'workflow.noDefinitions': "Chưa có định nghĩa tác vụ khả dụng",
41
+ 'workflow.input': "Dữ liệu đầu vào (JSON)",
42
+ 'workflow.inputHint': "Trước khi tiếp tục, hãy tải dữ liệu đầu vào ban đầu và kiểm tra quyền đã cấp.",
43
+ 'workflow.allowWrite': "Cho phép ghi cho tác vụ này",
44
+ 'workflow.submit': "Gửi tác vụ",
45
+ 'workflow.submitting': "Đang gửi…",
46
+ 'workflow.refresh': "Làm mới kết quả",
47
+ 'workflow.refreshing': "Đang làm mới…",
48
+ 'workflow.runs': "Lịch sử thực thi",
49
+ 'workflow.empty': "Chưa có lần thực thi nào",
50
+ 'workflow.emptyHint': "Sau khi gửi tác vụ, xem trạng thái và kết quả thực thi tại đây.",
51
+ 'workflow.loadInput': "Tải dữ liệu đầu vào ban đầu",
52
+ 'workflow.resume': "Tiếp tục sau khi xác nhận dữ liệu đầu vào và quyền đã cấp",
53
+ 'workflow.cancel': "Hủy các bước thực thi tiếp theo",
54
+ 'workflow.summary': "Kết quả và các mục chưa hoàn thành",
55
+ 'workflow.details': "Chi tiết thực thi và trạng thái thông báo",
56
+ 'workflow.runId': "Mã lần thực thi",
57
+ 'workflow.submitFailed': "Gửi thất bại",
58
+ 'workflow.invalidJson': "Vui lòng nhập JSON hợp lệ.",
59
+ 'workflow.status.queued': "Đang chờ",
60
+ 'workflow.status.running': "Đang thực thi",
61
+ 'workflow.status.waiting': "Cần xử lý",
62
+ 'workflow.status.completed': "Đã hoàn thành",
63
+ 'workflow.status.failed': "Thất bại",
64
+ 'workflow.status.cancelling': "Đang hủy, chờ công cụ kết thúc",
65
+ 'workflow.status.cancelled': "Đã hủy",
66
+
2
67
  'plugins.catalog.promptTemplates.title': 'Mẫu prompt',
3
68
  'plugins.catalog.promptTemplates.description': 'Công cụ prompt theo mẫu, hỗ trợ biến, sao chép và xuất.',
4
69
  'plugins.status.standard': 'tiêu chuẩn',
@@ -259,8 +324,11 @@ const vi = Object.freeze({
259
324
  'subtitle.prompts': 'Chỉnh sửa AGENTS.md và CLAUDE.md.',
260
325
  'prompts.subTab.codex': 'AGENTS.md (Codex)',
261
326
  'prompts.subTab.opencode': 'AGENTS.md (OpenCode)',
262
- 'prompts.subTab.project': 'CLAUDE.md',
263
- 'prompts.subTab.system': 'System Prompt (Pi)',
327
+ 'prompts.subTab.project': 'CLAUDE.md (Claude)',
328
+ 'prompts.subTab.system': 'SYSTEM.md (Pi)',
329
+ 'prompts.path.fullPath': 'Đường dẫn đầy đủ',
330
+ 'prompts.actions.edit': 'Chỉnh sửa',
331
+ 'prompts.actions.view': 'Chế độ xem',
264
332
  'prompts.pathReference.title': 'Chèn tham chiếu quy tắc',
265
333
  'prompts.pathReference.placeholder': 'Chèn tham chiếu quy tắc…',
266
334
  'prompts.pathReference.codex': 'AGENTS.md (Codex)',
@@ -1,4 +1,69 @@
1
1
  const zhTw = Object.freeze({
2
+ 'contextHealth.title': "上下文健檢",
3
+ 'contextHealth.loading': "掃描完整會話…",
4
+ 'contextHealth.composition': "上下文組成比例",
5
+ 'contextHealth.estimateHint': "依保存的可讀文字估算;不等於實際請求用量",
6
+ 'contextHealth.nodes': "訊息節點",
7
+ 'contextHealth.topFive': "佔用最多的 Top 5",
8
+ 'contextHealth.jump': "定位此訊息",
9
+ 'contextHealth.empty': "沒有可統計的文字訊息",
10
+ 'contextHealth.hotspots': "膨脹熱點",
11
+ 'contextHealth.message': "定位訊息節點",
12
+ 'contextHealth.category.system': "系統與規則",
13
+ 'contextHealth.category.user': "使用者指令",
14
+ 'contextHealth.category.assistant': "模型文字與思考",
15
+ 'contextHealth.category.tools': "工具輸出與日誌",
16
+ 'contextHealth.category.code': "程式碼與 Diff",
17
+ 'contextHealth.level.healthy': "健康 < 32k",
18
+ 'contextHealth.level.heavy': "偏重 32k–64k",
19
+ 'contextHealth.level.bloated': "膨脹 > 64k",
20
+ 'contextHealth.reason.dominant_message': "單條超過 15%",
21
+ 'contextHealth.reason.repeated_file_read': "重複讀取檔案",
22
+ 'contextHealth.reason.long_error_log': "過長錯誤日誌",
23
+ 'ecosystem.rollbackConfirm': "回復將取代目前設定與未儲存內容;寫入前保留目前版本備份。",
24
+ 'ecosystem.variablesTitle': "填寫範本變數",
25
+ 'ecosystem.variablesHint': "填寫後僅用於本次呼叫;git_diff 請貼上差異文字,不執行命令。",
26
+ 'ecosystem.variablesRequired': "請填寫全部變數。",
27
+ 'ecosystem.useTemplate': "使用範本",
28
+ 'ecosystem.share': "分享範本",
29
+ 'ecosystem.rollback': "回復至此版本",
30
+ 'ecosystem.historyCompare': "歷史版本 → 目前內容",
31
+ 'ecosystem.before': "歷史版本",
32
+ 'ecosystem.current': "目前內容",
33
+ 'ecosystem.storageFail': "外掛設定儲存失敗。",
34
+ 'ecosystem.cacheFail': "範本設定已儲存;瀏覽器快取更新失敗。",
35
+ 'workflow.tagline': "選好任務,背景接著做。",
36
+ 'workflow.options': "輸入參數",
37
+ 'workflow.title': "自動工作流程",
38
+ 'workflow.description': "提交後可關閉頁面。服務重新啟動後會恢復安全步驟;寫入結果不明時會請求介入。",
39
+ 'workflow.definition': "任務定義",
40
+ 'workflow.noDefinitions': "暫無可用任務定義",
41
+ 'workflow.input': "輸入(JSON)",
42
+ 'workflow.inputHint': "繼續任務前,請先載入原始輸入並核對授權。",
43
+ 'workflow.allowWrite': "授權本次任務寫入",
44
+ 'workflow.submit': "提交任務",
45
+ 'workflow.submitting': "提交中…",
46
+ 'workflow.refresh': "重新整理結果",
47
+ 'workflow.refreshing': "重新整理中…",
48
+ 'workflow.runs': "執行紀錄",
49
+ 'workflow.empty': "暫無執行紀錄",
50
+ 'workflow.emptyHint': "提交任務後,可在此查看狀態與執行結果。",
51
+ 'workflow.loadInput': "載入原始輸入",
52
+ 'workflow.resume': "確認輸入與授權後繼續",
53
+ 'workflow.cancel': "取消後續執行",
54
+ 'workflow.summary': "結果與未完成項目",
55
+ 'workflow.details': "執行詳細資訊與通知狀態",
56
+ 'workflow.runId': "執行識別碼",
57
+ 'workflow.submitFailed': "提交失敗",
58
+ 'workflow.invalidJson': "請輸入有效的 JSON。",
59
+ 'workflow.status.queued': "排隊中",
60
+ 'workflow.status.running': "執行中",
61
+ 'workflow.status.waiting': "需要處理",
62
+ 'workflow.status.completed': "已完成",
63
+ 'workflow.status.failed': "失敗",
64
+ 'workflow.status.cancelling': "正在取消,等待工具結束",
65
+ 'workflow.status.cancelled': "已取消",
66
+
2
67
  // Global
3
68
  'lang.zh': '中文',
4
69
  'lang.zh-tw': '繁體中文',
@@ -230,8 +295,11 @@ const zhTw = Object.freeze({
230
295
  'subtitle.prompts': '編輯 AGENTS.md 與 CLAUDE.md。',
231
296
  'prompts.subTab.codex': 'AGENTS.md (Codex)',
232
297
  'prompts.subTab.opencode': 'AGENTS.md (OpenCode)',
233
- 'prompts.subTab.project': 'CLAUDE.md',
234
- 'prompts.subTab.system': 'System Prompt (Pi)',
298
+ 'prompts.subTab.project': 'CLAUDE.md (Claude)',
299
+ 'prompts.subTab.system': 'SYSTEM.md (Pi)',
300
+ 'prompts.path.fullPath': '完整路徑',
301
+ 'prompts.actions.edit': '編輯',
302
+ 'prompts.actions.view': '檢視',
235
303
  'prompts.pathReference.title': '插入規則引用',
236
304
  'prompts.pathReference.placeholder': '插入規則引用…',
237
305
  'prompts.pathReference.codex': 'AGENTS.md (Codex)',