codexmate 0.1.31 → 0.1.33

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 (92) hide show
  1. package/README.md +8 -3
  2. package/README.vi.md +8 -3
  3. package/README.zh.md +8 -3
  4. package/cli/agents-files.js +18 -4
  5. package/cli/claude-proxy.js +2 -2
  6. package/cli/plugin-config.js +64 -0
  7. package/cli/prompt-history.js +19 -4
  8. package/cli/system-prompt-files.js +7 -2
  9. package/cli.js +200 -214
  10. package/lib/cli-config-engine.js +15 -4
  11. package/lib/cli-file-utils.js +6 -1
  12. package/lib/config-change-fs.js +132 -0
  13. package/lib/config-changes.js +293 -0
  14. package/lib/handoff-mcp.js +18 -2
  15. package/lib/local-feature-store.js +39 -0
  16. package/lib/session-bookmarks.js +72 -0
  17. package/lib/session-context-health.js +102 -0
  18. package/lib/session-context-records.js +153 -0
  19. package/lib/session-diagnostics.js +75 -0
  20. package/lib/session-feature-settings.js +21 -0
  21. package/lib/session-features.js +63 -0
  22. package/lib/session-handoff-draft.js +43 -0
  23. package/lib/session-projects.js +76 -0
  24. package/lib/session-search-index.js +188 -0
  25. package/lib/thread-handoff.js +8 -0
  26. package/lib/web-server.js +216 -0
  27. package/lib/web-startup-auth.js +5 -1
  28. package/package.json +1 -1
  29. package/plugins/prompt-templates/computed.mjs +3 -3
  30. package/plugins/prompt-templates/invocation.mjs +73 -0
  31. package/plugins/prompt-templates/methods.mjs +48 -3
  32. package/plugins/prompt-templates/overview.mjs +2 -0
  33. package/web-ui/app.js +32 -1
  34. package/web-ui/index.html +2 -0
  35. package/web-ui/logic.context-health.mjs +144 -0
  36. package/web-ui/logic.context-window.mjs +15 -0
  37. package/web-ui/modules/api.mjs +72 -39
  38. package/web-ui/modules/app.computed.prompts.mjs +11 -0
  39. package/web-ui/modules/app.methods.agents.mjs +25 -3
  40. package/web-ui/modules/app.methods.claude-config.mjs +2 -0
  41. package/web-ui/modules/app.methods.codex-config.mjs +9 -0
  42. package/web-ui/modules/app.methods.config-changes.mjs +124 -0
  43. package/web-ui/modules/app.methods.index.mjs +4 -0
  44. package/web-ui/modules/app.methods.kilocode-config.mjs +2 -0
  45. package/web-ui/modules/app.methods.openclaw-persist.mjs +2 -0
  46. package/web-ui/modules/app.methods.opencode-config.mjs +2 -0
  47. package/web-ui/modules/app.methods.pi-config.mjs +12 -3
  48. package/web-ui/modules/app.methods.provider-cache.mjs +9 -3
  49. package/web-ui/modules/app.methods.providers.mjs +6 -0
  50. package/web-ui/modules/app.methods.startup-claude.mjs +8 -47
  51. package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
  52. package/web-ui/modules/config-change-actions.mjs +9 -0
  53. package/web-ui/modules/context-health.methods.mjs +70 -0
  54. package/web-ui/modules/i18n/locales/en.mjs +164 -4
  55. package/web-ui/modules/i18n/locales/ja.mjs +164 -4
  56. package/web-ui/modules/i18n/locales/vi.mjs +164 -4
  57. package/web-ui/modules/i18n/locales/zh-tw.mjs +164 -4
  58. package/web-ui/modules/i18n/locales/zh.mjs +164 -4
  59. package/web-ui/modules/plugins.methods.mjs +2 -0
  60. package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
  61. package/web-ui/modules/request-deadline.mjs +33 -0
  62. package/web-ui/modules/session-features.mjs +279 -0
  63. package/web-ui/modules/thread-handoff.mjs +1 -1
  64. package/web-ui/partials/index/config-changes.html +25 -0
  65. package/web-ui/partials/index/context-health.html +45 -0
  66. package/web-ui/partials/index/context-window-reference.html +17 -0
  67. package/web-ui/partials/index/layout-header.html +7 -30
  68. package/web-ui/partials/index/modal-openclaw-config.html +0 -2
  69. package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
  70. package/web-ui/partials/index/modal-skills.html +0 -1
  71. package/web-ui/partials/index/modals-basic.html +0 -8
  72. package/web-ui/partials/index/modals-pi-provider.html +0 -1
  73. package/web-ui/partials/index/panel-config-codex.html +0 -3
  74. package/web-ui/partials/index/panel-config-openclaw.html +16 -13
  75. package/web-ui/partials/index/panel-dashboard.html +0 -2
  76. package/web-ui/partials/index/panel-plugins.html +37 -10
  77. package/web-ui/partials/index/panel-prompts.html +18 -3
  78. package/web-ui/partials/index/panel-sessions.html +23 -11
  79. package/web-ui/partials/index/panel-settings.html +1 -12
  80. package/web-ui/partials/index/panel-trash.html +0 -1
  81. package/web-ui/partials/index/session-diagnostics.html +29 -0
  82. package/web-ui/partials/index/session-features.html +107 -0
  83. package/web-ui/partials/index/thread-handoff.html +6 -3
  84. package/web-ui/res/web-ui-render.precompiled.js +1863 -271
  85. package/web-ui/styles/config-changes.css +30 -0
  86. package/web-ui/styles/context-health.css +107 -0
  87. package/web-ui/styles/openclaw-structured.css +205 -189
  88. package/web-ui/styles/prompts-editor.css +23 -0
  89. package/web-ui/styles/session-features.css +148 -0
  90. package/web-ui/styles/sessions-preview.css +21 -0
  91. package/web-ui/styles/sub-tabs.css +181 -0
  92. package/web-ui/styles.css +5 -1
@@ -0,0 +1,279 @@
1
+ import { api } from './api.mjs';
2
+ import { contextWindowReference } from '../logic.context-window.mjs';
3
+ const SessionMessageActions = {
4
+ props: { message: { type: Object, required: true } },
5
+ render() {
6
+ // A child render tracks shared action state independently of the message v-memo.
7
+ const vm = this.$parent;
8
+ return Vue.h('div', { class: 'session-feature-controls' }, [
9
+ Vue.h('button', { type: 'button', class: 'btn-mini feature-icon-button', disabled: vm.featureBusy,
10
+ title: vm.t('features.bookmark'), 'aria-label': vm.t('features.bookmark'),
11
+ onClick: () => vm.bookmarkMessage(this.message) }, [
12
+ Vue.h('svg', { viewBox: '0 0 24 24', width: 18, height: 18, fill: 'none',
13
+ stroke: 'currentColor', 'stroke-width': 1.8, 'stroke-linejoin': 'round' }, [
14
+ Vue.h('path', { d: 'M6 3h12v18l-6-4-6 4V3Z' })
15
+ ])
16
+ ]),
17
+ Vue.h('label', { class: 'feature-message-select' }, [Vue.h('input', { type: 'checkbox', checked: vm.selectedContextIds.includes(vm.contextSelectionKey(this.message)),
18
+ 'aria-label': vm.t('features.selectMessage'), onChange: () => vm.toggleHandoffMessage(this.message) })])
19
+ ]);
20
+ }
21
+ };
22
+ export const sessionFeaturesMixin = {
23
+ components: { SessionMessageActions },
24
+ data() {
25
+ return { featureView: '', featureBusy: false, featureError: '', bookmarks: [], bookmarkRevision: '',
26
+ bookmarkQuery: '', bookmarkTag: '', bookmarkProject: '', bookmarkEditor: null,
27
+ selectedContextIds: [], featureFocus: null, featureRequestSeq: 0,
28
+ indexReport: null, indexResults: null, indexQuery: '', indexTimer: null, handoffDraftEvidence: [], handoffUnverified: [], projectReport: null, projectSelected: '', projectAlias: '', projectPrompt: null, contextWindowInput: '', contextSelectedModel: '', contextFeatureSettings: null, contextSettingsRevision: '', diagnosticsReport: null, diagnosticsMarkdown: '', diagnosticsRemote: false,
29
+ diagnosticsTargets: [], diagnosticsSelected: [], diagnosticsTimer: null };
30
+ },
31
+ computed: {
32
+ contextPreferenceKey() {
33
+ return `${this.handoffSessionKey}::${this.contextSelectedModel || this.sessionContextHealth?.models?.[0] || 'manual'}`;
34
+ },
35
+ contextReference() {
36
+ try { return contextWindowReference(this.sessionContextHealth, { model: this.contextSelectedModel, window: this.contextWindowInput }); }
37
+ catch (_) { return { status: 'invalid', source: 'manual' }; }
38
+ },
39
+ contextReminderDismissed() { return !!this.contextFeatureSettings?.dismissed?.[this.contextPreferenceKey]; }
40
+ },
41
+ beforeUnmount() { clearTimeout(this.indexTimer); clearTimeout(this.diagnosticsTimer); },
42
+ watch: {
43
+ sessionContextHealth(report) {
44
+ if (!report) return;
45
+ this.contextSelectedModel = report.models?.length === 1 ? report.models[0] : '';
46
+ void this.loadContextPreferences();
47
+ },
48
+ contextSelectedModel() { if (this.sessionContextHealth) void this.loadContextPreferences(); },
49
+ handoffSessionKey() { this.contextWindowInput = ''; this.contextSelectedModel = ''; this.selectedContextIds = []; this.handoffDraftEvidence = []; this.handoffUnverified = []; this.featureFocus = null; this.featureRequestSeq++; this.featureBusy = false; }
50
+ },
51
+ methods: {
52
+ featureErrorText(error) {
53
+ const key = `features.error.${error.message || error}`;
54
+ const text = this.t(key);
55
+ return text === key ? this.t('features.error.feature-read-failed') : text;
56
+ },
57
+ sessionNodeParams(msg) {
58
+ const session = this.activeSession;
59
+ const index = msg.recordLineIndex;
60
+ if (!session) throw new Error('bookmark-source-unavailable');
61
+ return { source: session.source, sessionId: session.sessionId, filePath: session.filePath,
62
+ cwd: session.cwd || '', ...(msg.id && /^record-/.test(msg.id) ? { nodeId: msg.id } : (Number.isInteger(index) && index >= 0
63
+ ? { nodeId: `record-${index}` } : { messageText: msg.text })) };
64
+ },
65
+ async featureCall(action, params = {}) {
66
+ const result = await api(action, params);
67
+ if (result.error) throw new Error(result.error);
68
+ return result;
69
+ },
70
+ async openFeatureView(view) {
71
+ this.featureView = this.featureView === view ? '' : view;
72
+ this.featureError = '';
73
+ if (this.featureView === 'bookmarks') await this.loadBookmarks();
74
+ if (this.featureView === 'search') await this.pollSessionIndex();
75
+ if (this.featureView === 'projects') await this.loadProjectWorkspace();
76
+ },
77
+ async loadBookmarks() {
78
+ const seq = ++this.featureRequestSeq;
79
+ this.featureBusy = true; this.featureError = '';
80
+ try {
81
+ const result = await this.featureCall('session-bookmarks-list', { query: this.bookmarkQuery,
82
+ tag: this.bookmarkTag, project: this.bookmarkProject });
83
+ if (seq !== this.featureRequestSeq) return;
84
+ this.bookmarks = result.items; this.bookmarkRevision = result.revision;
85
+ } catch (error) { if (seq === this.featureRequestSeq) this.featureError = this.featureErrorText(error); }
86
+ finally { if (seq === this.featureRequestSeq) this.featureBusy = false; }
87
+ },
88
+ async bookmarkMessage(msg) {
89
+ if (this.featureBusy) return;
90
+ this.featureBusy = true; this.featureError = '';
91
+ try {
92
+ const params = this.sessionNodeParams(msg);
93
+ const list = await this.featureCall('session-bookmarks-list');
94
+ const result = await this.featureCall('session-bookmark-save', { ...params, note: '', tags: [], revision: list.revision });
95
+ this.bookmarkEditor = { ...result.item, tagsText: result.item.tags.join(', ') };
96
+ this.bookmarks = result.items; this.bookmarkRevision = result.revision; this.featureView = 'bookmarks';
97
+ } catch (error) { this.featureError = this.featureErrorText(error); }
98
+ finally { this.featureBusy = false; }
99
+ },
100
+ async saveBookmark() {
101
+ if (!this.bookmarkEditor || this.featureBusy) return;
102
+ this.featureBusy = true; this.featureError = '';
103
+ try {
104
+ const item = this.bookmarkEditor;
105
+ const result = await this.featureCall('session-bookmark-save', { id: item.id, note: item.note,
106
+ tags: item.tagsText.split(/[,,]/).map((tag) => tag.trim()).filter(Boolean), revision: this.bookmarkRevision });
107
+ this.bookmarks = result.items; this.bookmarkRevision = result.revision; this.bookmarkEditor = null;
108
+ } catch (error) { this.featureError = this.featureErrorText(error); }
109
+ finally { this.featureBusy = false; }
110
+ },
111
+ async removeBookmark(item) {
112
+ if (this.featureBusy) return;
113
+ this.featureBusy = true; this.featureError = '';
114
+ try {
115
+ const result = await this.featureCall('session-bookmark-remove', { id: item.id, revision: this.bookmarkRevision });
116
+ this.bookmarks = result.items; this.bookmarkRevision = result.revision;
117
+ if (this.bookmarkEditor?.id === item.id) this.bookmarkEditor = null;
118
+ } catch (error) { this.featureError = this.featureErrorText(error); }
119
+ finally { this.featureBusy = false; }
120
+ },
121
+ async locateBookmark(item) {
122
+ this.featureError = '';
123
+ try {
124
+ const result = await this.featureCall('session-bookmark-locate', { id: item.id });
125
+ if (!result.available) throw new Error('bookmark-source-unavailable');
126
+ await this.selectSession({ ...item, title: item.excerpt.slice(0, 80) });
127
+ this.featureFocus = result.node;
128
+ await this.$nextTick(); this.$refs.featureFocus?.focus();
129
+ } catch (error) { this.featureError = this.featureErrorText(error); }
130
+ },
131
+ async pollSessionIndex() {
132
+ clearTimeout(this.indexTimer);
133
+ try {
134
+ this.indexReport = await this.featureCall('session-index-status');
135
+ if (this.indexReport.job.status === 'running') {
136
+ this.indexTimer = setTimeout(() => this.pollSessionIndex(), 1000);
137
+ }
138
+ } catch (error) { this.featureError = this.featureErrorText(error); }
139
+ },
140
+ async refreshSessionIndex(rebuild = false) {
141
+ this.featureError = '';
142
+ try {
143
+ await this.featureCall('session-index-refresh', { source: this.sessionFilterSource || 'all', rebuild: rebuild === true });
144
+ await this.pollSessionIndex();
145
+ } catch (error) { this.featureError = this.featureErrorText(error); }
146
+ },
147
+ async cancelSessionIndex() {
148
+ try { await this.featureCall('session-index-cancel'); await this.pollSessionIndex(); }
149
+ catch (error) { this.featureError = this.featureErrorText(error); }
150
+ },
151
+ async searchSessionIndex() {
152
+ if (this.featureBusy) return;
153
+ const seq = ++this.featureRequestSeq;
154
+ this.featureBusy = true; this.featureError = ''; this.indexResults = null;
155
+ try {
156
+ const result = await this.featureCall('session-index-search', { query: this.indexQuery,
157
+ source: this.sessionFilterSource || 'all', project: this.sessionPathFilter, role: this.sessionRoleFilter, scope: 'all' });
158
+ if (seq === this.featureRequestSeq) this.indexResults = result;
159
+ } catch (error) { if (seq === this.featureRequestSeq) this.featureError = this.featureErrorText(error); }
160
+ finally { if (seq === this.featureRequestSeq) this.featureBusy = false; }
161
+ },
162
+ async openIndexedMessage(result) {
163
+ this.featureError = '';
164
+ try {
165
+ const found = await this.featureCall('session-index-node', { ...result.session, nodeId: result.nodeId, textHash: result.textHash });
166
+ await this.selectSession(result.session);
167
+ this.featureFocus = found.node;
168
+ await this.$nextTick(); this.$refs.featureFocus?.focus();
169
+ } catch (error) { this.featureError = this.featureErrorText(error); }
170
+ },
171
+ async generateSelectedHandoff() {
172
+ if (this.featureBusy || !this.activeSession) return;
173
+ const seq = this.handoffRequestSeq;
174
+ this.featureBusy = true; this.featureError = '';
175
+ try {
176
+ const result = await this.featureCall('session-handoff-draft', { ...this.activeSession,
177
+ selections: this.selectedContextIds, goal: this.handoffDraft.goal });
178
+ if (seq !== this.handoffRequestSeq) return;
179
+ this.handoffDraft = { ...this.handoffDraft, goal: result.card.goal,
180
+ ...Object.fromEntries(['completed', 'blockers', 'nextSteps', 'files'].map((key) => [key, result.card[key].join('\n')])) };
181
+ this.handoffDraftEvidence = result.evidence; this.handoffUnverified = result.unverified;
182
+ this.handoffExpanded = true;
183
+ } catch (error) { if (seq === this.handoffRequestSeq) this.featureError = this.featureErrorText(error); }
184
+ finally { this.featureBusy = false; }
185
+ },
186
+ async locateDraftEvidence(item) {
187
+ await this.openIndexedMessage({ session: { source: item.source, sessionId: item.sessionId, filePath: item.filePath, cwd: item.cwd }, nodeId: item.nodeId, textHash: item.textHash });
188
+ },
189
+ async loadProjectWorkspace(project) {
190
+ const seq = ++this.featureRequestSeq;
191
+ this.featureBusy = true; this.featureError = '';
192
+ try {
193
+ const result = await this.featureCall('session-projects', project === undefined ? {} : { project });
194
+ if (seq !== this.featureRequestSeq) return;
195
+ this.projectReport = result; this.projectPrompt = null; this.projectSelected = project === undefined ? '' : project;
196
+ } catch (error) { if (seq === this.featureRequestSeq) this.featureError = this.featureErrorText(error); }
197
+ finally { if (seq === this.featureRequestSeq) this.featureBusy = false; }
198
+ },
199
+ async openProjectPrompt(file) {
200
+ try {
201
+ const project = this.projectReport.detail.cwd;
202
+ const name = file.slice(project.length + 1).replace(/\\/g, '/');
203
+ this.projectPrompt = await this.featureCall('session-project-prompt', { project, name });
204
+ } catch (error) { this.featureError = this.featureErrorText(error); }
205
+ },
206
+ async mapProjectWorkspace() {
207
+ this.featureError = '';
208
+ try {
209
+ await this.featureCall('session-project-map', { from: this.projectSelected, to: this.projectAlias,
210
+ revision: this.projectReport.revision });
211
+ await this.loadProjectWorkspace(this.projectAlias || this.projectSelected);
212
+ this.projectAlias = '';
213
+ } catch (error) { this.featureError = this.featureErrorText(error); }
214
+ },
215
+ async loadContextPreferences() {
216
+ const key = this.contextPreferenceKey;
217
+ try {
218
+ const result = await this.featureCall('session-feature-settings-get');
219
+ if (key !== this.contextPreferenceKey) return;
220
+ this.contextFeatureSettings = result.settings; this.contextSettingsRevision = result.revision;
221
+ this.contextWindowInput = result.settings.windows[key] === undefined ? '' : String(result.settings.windows[key]);
222
+ } catch (error) { this.featureError = this.featureErrorText(error); }
223
+ },
224
+ async saveContextPreferences(dismissed = false) {
225
+ try {
226
+ if (this.contextReference?.status === 'invalid') throw new Error('context-window-invalid');
227
+ const key = this.contextPreferenceKey;
228
+ const result = await this.featureCall('session-feature-settings-save', { key,
229
+ window: this.contextWindowInput === '' ? '' : Number(this.contextWindowInput), dismissed,
230
+ revision: this.contextSettingsRevision });
231
+ if (key !== this.contextPreferenceKey) return;
232
+ this.contextFeatureSettings = result.settings; this.contextSettingsRevision = result.revision;
233
+ } catch (error) { this.featureError = this.featureErrorText(error); }
234
+ },
235
+ async loadDiagnosticTargets() {
236
+ try {
237
+ const result = await this.featureCall('session-diagnostics-targets', { cwd: this.activeSession?.cwd });
238
+ this.diagnosticsTargets = result.names;
239
+ } catch (error) { this.featureError = this.featureErrorText(error); }
240
+ },
241
+ async startDiagnostics() {
242
+ this.featureError = '';
243
+ try {
244
+ await this.featureCall('session-diagnostics-start', { remote: this.diagnosticsRemote,
245
+ mcpNames: this.diagnosticsSelected, cwd: this.activeSession?.cwd });
246
+ await this.pollDiagnostics();
247
+ } catch (error) { this.featureError = this.featureErrorText(error); }
248
+ },
249
+ async pollDiagnostics() {
250
+ clearTimeout(this.diagnosticsTimer);
251
+ try {
252
+ const result = await this.featureCall('session-diagnostics-status');
253
+ this.diagnosticsReport = result.report; this.diagnosticsMarkdown = result.markdown;
254
+ if (result.report.status === 'running') this.diagnosticsTimer = setTimeout(() => this.pollDiagnostics(), 1000);
255
+ } catch (error) { this.featureError = this.featureErrorText(error); }
256
+ },
257
+ async cancelDiagnostics() {
258
+ try { await this.featureCall('session-diagnostics-cancel'); await this.pollDiagnostics(); }
259
+ catch (error) { this.featureError = this.featureErrorText(error); }
260
+ },
261
+ exportDiagnostics(format) {
262
+ this.downloadTextFile(`codexmate-diagnostics.${format === 'json' ? 'json' : 'md'}`,
263
+ format === 'json' ? JSON.stringify(this.diagnosticsReport, null, 2) : this.diagnosticsMarkdown,
264
+ format === 'json' ? 'application/json;charset=utf-8' : 'text/markdown;charset=utf-8');
265
+ },
266
+ contextSelectionKey(msg) {
267
+ if (msg.id && /^record-/.test(msg.id)) return msg.id;
268
+ return Number.isInteger(msg.recordLineIndex) && msg.recordLineIndex >= 0
269
+ ? `record-${msg.recordLineIndex}` : `text:${msg.text}`;
270
+ },
271
+ toggleHandoffMessage(msg) {
272
+ try {
273
+ const nodeId = this.contextSelectionKey(msg);
274
+ this.selectedContextIds = this.selectedContextIds.includes(nodeId)
275
+ ? this.selectedContextIds.filter((id) => id !== nodeId) : [...this.selectedContextIds, nodeId];
276
+ } catch (error) { this.featureError = this.featureErrorText(error); }
277
+ }
278
+ }
279
+ };
@@ -101,7 +101,7 @@ export const threadHandoffMixin = {
101
101
  this.handoffError = '';
102
102
  this.handoffNotice = '';
103
103
  try {
104
- const result = await api('thread-handoff-create', { threadId, target: draft.target.trim(), card, cwd: this.activeSession.cwd || undefined });
104
+ const result = await api('thread-handoff-create', { threadId, target: draft.target.trim(), card, ...(this.handoffDraftEvidence?.length ? { evidence: this.handoffDraftEvidence } : {}), cwd: this.activeSession.cwd || undefined });
105
105
  if (result.error) throw new Error(result.error);
106
106
  if (requestSeq !== this.handoffRequestSeq) return;
107
107
  this.handoffNotice = result.message || '已生成交接记录;读取状态以交接历史为准。';
@@ -0,0 +1,25 @@
1
+ <section v-if="mainTab === 'config' && lastConfigChange && lastConfigChange.target === configMode" class="config-change-last" aria-live="polite">
2
+ <span>{{ t('changes.last') }} · {{ lastConfigChange.createdAt }}</span>
3
+ <button type="button" class="btn-tool" @click="undoLastConfigChange" :disabled="configChangeBusy || configChangeApplying || !isToolConfigWriteAllowed(configMode)">{{ t('changes.undo') }}</button>
4
+ </section>
5
+ <teleport to="body">
6
+ <div v-if="configChangePreview" class="modal-overlay config-change-overlay" @click.self="closeConfigChangePreview()" @keydown="handleConfigChangeKeydown">
7
+ <section class="modal modal-wide config-change-modal" role="dialog" aria-modal="true" aria-labelledby="config-change-title" aria-describedby="config-change-hint" :aria-busy="configChangeApplying">
8
+ <h2 id="config-change-title" class="modal-title">{{ t('changes.preview') }}</h2>
9
+ <p id="config-change-hint" class="form-hint">{{ t('changes.hint') }}</p>
10
+ <div class="config-change-files" tabindex="0" :aria-label="t('changes.files')">
11
+ <article v-for="file in configChangePreview.files" :key="file.path" class="config-change-file">
12
+ <h3><span>{{ t('changes.operation.' + file.operation) }}</span> <code>{{ file.path }}</code></h3>
13
+ <p v-if="file.hidden" class="form-hint">{{ t('changes.hidden') }}</p>
14
+ <p v-else-if="file.maskedOnly" class="form-hint">{{ t('changes.maskedOnly') }}</p>
15
+ <pre v-else class="config-change-diff"><template v-for="(line, index) in file.diff.lines" :key="index"><span :class="['config-change-line', 'config-change-line-' + line.type]">{{ line.type === 'add' ? '+' : line.type === 'del' ? '−' : ' ' }} {{ line.text || line.value }}</span></template></pre>
16
+ </article>
17
+ </div>
18
+ <p v-if="configChangeError" class="form-hint form-error" role="alert">{{ configChangeError }}</p>
19
+ <div class="btn-group config-change-actions">
20
+ <button ref="configChangeCancel" type="button" class="btn btn-cancel" @click="closeConfigChangePreview()" :disabled="configChangeApplying">{{ t('common.cancel') }}</button>
21
+ <button type="button" class="btn btn-confirm" @click="confirmConfigChange" :disabled="configChangeApplying || !!configChangeError">{{ configChangeApplying ? t('changes.saving') : t('changes.apply') }}</button>
22
+ </div>
23
+ </section>
24
+ </div>
25
+ </teleport>
@@ -0,0 +1,45 @@
1
+ <section v-if="activeSession" class="context-health" aria-labelledby="context-health-heading" :aria-busy="sessionContextHealthLoading" @vue:mounted="loadSessionContextHealth()" @vue:updated="loadSessionContextHealth()">
2
+ <div class="context-health-header">
3
+ <div class="context-health-heading">
4
+ <h3 id="context-health-heading" class="context-health-title">{{ t('contextHealth.title') }}</h3>
5
+ <span v-if="sessionContextHealth" :class="['context-health-rating', sessionContextHealth.health]" role="img" :aria-label="t('contextHealth.level.' + sessionContextHealth.health)"></span>
6
+ <p class="context-health-meta" v-if="sessionContextHealth">{{ sessionContextHealth.messageCount.toLocaleString() }} {{ t('contextHealth.nodes') }}</p>
7
+ <p class="context-health-meta" v-else-if="sessionContextHealthLoading" role="status">{{ t('contextHealth.loading') }}</p>
8
+ </div>
9
+ <div v-if="sessionContextHealth" class="context-health-summary">
10
+ <span class="context-health-total mono">≈ {{ sessionContextHealth.totalEstimatedTokens.toLocaleString() }} <small>Token</small></span>
11
+ </div>
12
+ <div v-else-if="sessionContextHealthLoading" class="context-health-summary context-health-summary-skeleton" aria-hidden="true"><span></span></div>
13
+ <button type="button" class="btn-mini context-health-refresh" @click="loadSessionContextHealth(true)" :disabled="sessionContextHealthLoading" :aria-label="t('common.refresh')" :title="t('common.refresh')">
14
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 7v5h-5M4 17v-5h5"/><path d="M6.1 7a7 7 0 0 1 11.5-1.3L20 8M4 16l2.4 2.3A7 7 0 0 0 17.9 17"/></svg>
15
+ </button>
16
+ </div>
17
+ <div class="context-health-bar" role="img" :aria-label="t('contextHealth.composition')">
18
+ <template v-if="sessionContextHealth">
19
+ <span v-for="part in sessionContextHealth.categories" :key="part.id" :class="['context-health-segment', part.id]" :style="{ flexGrow: part.estimatedTokens }" :title="t('contextHealth.category.' + part.id) + ': ≈ ' + part.estimatedTokens + ' Token (' + part.percentage.toFixed(2) + '%)'" :aria-label="t('contextHealth.category.' + part.id) + ': ' + part.percentage.toFixed(2) + '%'" v-show="part.estimatedTokens > 0"></span>
20
+ </template>
21
+ </div>
22
+ <p v-if="sessionContextHealthError" class="form-error context-health-error" role="alert">{{ sessionContextHealthError }}</p>
23
+ <div v-if="sessionContextHealth" id="context-health-details" class="context-health-details">
24
+ <dl class="context-health-legend">
25
+ <div v-for="part in sessionContextHealth.categories" :key="part.id">
26
+ <dt><span :class="['context-health-dot', part.id]" aria-hidden="true"></span>{{ t('contextHealth.category.' + part.id) }}</dt>
27
+ <dd><span class="context-health-category-tokens mono">≈ {{ part.estimatedTokens.toLocaleString() }}</span><span class="context-health-category-share mono">{{ part.percentage.toFixed(2) }}%</span></dd>
28
+ </div>
29
+ </dl>
30
+ <p v-if="!sessionContextHealth.messageCount" class="context-health-note">{{ t('contextHealth.empty') }}</p>
31
+ </div>
32
+ <dl v-else-if="sessionContextHealthLoading" class="context-health-legend context-health-loading" aria-hidden="true">
33
+ <div v-for="part in ['system', 'user', 'assistant', 'tools', 'code']" :key="part" class="context-health-loading-row">
34
+ <dt><span :class="['context-health-dot', part]" aria-hidden="true"></span>{{ t('contextHealth.category.' + part) }}</dt>
35
+ <dd><span class="context-health-value-skeleton"></span><span class="context-health-share-skeleton"></span></dd>
36
+ </div>
37
+ </dl>
38
+ </section>
39
+ <article v-if="sessionContextHealthFocusedNode" ref="contextHealthFocusedMessage" class="context-health-focused-message" tabindex="-1" :data-context-node-id="sessionContextHealthFocusedNode.id" :aria-label="t('contextHealth.message')">
40
+ <header>
41
+ <div><strong>{{ t('contextHealth.message') }}</strong><span class="context-health-meta mono">{{ sessionContextHealthFocusedNode.id }}</span></div>
42
+ <button type="button" class="btn-mini context-health-refresh" @click="sessionContextHealthFocusedNode = null" :aria-label="t('common.close')"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true"><path d="m6 6 12 12M18 6 6 18"/></svg></button>
43
+ </header>
44
+ <pre>{{ sessionContextHealthFocusedNode.text }}</pre>
45
+ </article>
@@ -0,0 +1,17 @@
1
+ <section v-if="sessionContextHealth" class="context-window-reference" :aria-label="t('features.windowReference')">
2
+ <div class="feature-section-heading"><h4>{{ t('features.windowReference') }}</h4><small v-if="contextReference?.percentage !== undefined" class="feature-meta">{{ t('features.windowSource.' + contextReference.source) }}</small></div>
3
+ <p v-if="contextReference?.percentage !== undefined" class="feature-hint">{{ t('features.contextEstimate', { percent: contextReference.percentage.toFixed(2), window: contextReference.window }) }}</p>
4
+ <p v-else class="feature-hint">{{ t('features.windowStatus.' + (contextReference?.status || 'unknown')) }}</p>
5
+ <details class="feature-disclosure">
6
+ <summary>{{ t('features.windowSettings') }}</summary>
7
+ <div class="feature-window-fields">
8
+ <label v-if="sessionContextHealth.models?.length">{{ t('features.model') }}<select v-model="contextSelectedModel" :aria-label="t('features.model')"><option value="">{{ t('features.chooseModel') }}</option><option v-for="model in sessionContextHealth.models" :key="model" :value="model">{{ model }}</option></select></label>
9
+ <label>{{ t('features.contextWindow') }}<input v-model="contextWindowInput" type="number" min="1" step="1" :aria-label="t('features.contextWindow')"></label>
10
+ <button type="button" class="btn-mini" @click="saveContextPreferences(false)" :disabled="contextReference?.status === 'invalid'">{{ t('features.save') }}</button>
11
+ </div>
12
+ </details>
13
+ <div v-if="contextReference && ['warning', 'high'].includes(contextReference.status) && !contextReminderDismissed" role="status" class="feature-window-warning">
14
+ <span>{{ t('features.windowStatus.' + contextReference.status) }}</span>
15
+ <div class="feature-record-actions"><button type="button" class="btn-mini" @click="handoffExpanded = true">{{ t('features.handoffs') }}</button><button type="button" class="btn-mini feature-quiet" @click="saveContextPreferences(true)">{{ t('features.dismiss') }}</button></div>
16
+ </div>
17
+ </section>
@@ -161,7 +161,6 @@
161
161
  <span class="side-item-icon" aria-hidden="true">⌂</span>
162
162
  <div class="side-item-title">{{ t('side.overview.doctor') }}</div>
163
163
  <div class="side-item-meta">
164
- <span>{{ t('side.overview.doctor.meta') }}</span>
165
164
  <span>{{ inspectorHealthStatus }}</span>
166
165
  </div>
167
166
  </button>
@@ -178,7 +177,6 @@
178
177
  <span class="side-item-icon" aria-hidden="true">?</span>
179
178
  <div class="side-item-title">{{ t('side.docs.cliInstall') }}</div>
180
179
  <div class="side-item-meta">
181
- <span>{{ t('side.docs.cliInstall.meta') }}</span>
182
180
  <span>{{ String(installPackageManager || 'npm').toUpperCase() }} · {{ installCommandAction === 'update' ? t('common.update') : (installCommandAction === 'uninstall' ? t('common.uninstall') : t('common.install')) }}</span>
183
181
  </div>
184
182
  </button>
@@ -188,6 +186,7 @@
188
186
  <button
189
187
  v-if="isConfigModeVisible('codex')"
190
188
  id="side-tab-config-codex"
189
+ :aria-description="t('side.config.codex.meta')"
191
190
  data-main-tab="config"
192
191
  data-config-mode="codex"
193
192
  :aria-current="mainTab === 'config' && configMode === 'codex' ? 'page' : null"
@@ -196,13 +195,11 @@
196
195
  @click="onConfigTabClick('codex', $event)">
197
196
  <span class="side-item-icon" aria-hidden="true">C</span>
198
197
  <div class="side-item-title">{{ t('side.config.codex') }}</div>
199
- <div class="side-item-meta">
200
- <span>{{ t('side.config.codex.meta') }}</span>
201
- </div>
202
198
  </button>
203
199
  <button
204
200
  v-if="isConfigModeVisible('claude')"
205
201
  id="side-tab-config-claude"
202
+ :aria-description="t('side.config.claude.meta')"
206
203
  data-main-tab="config"
207
204
  data-config-mode="claude"
208
205
  :aria-current="mainTab === 'config' && configMode === 'claude' ? 'page' : null"
@@ -211,13 +208,11 @@
211
208
  @click="onConfigTabClick('claude', $event)">
212
209
  <span class="side-item-icon" aria-hidden="true">A</span>
213
210
  <div class="side-item-title">{{ t('side.config.claude') }}</div>
214
- <div class="side-item-meta">
215
- <span>{{ t('side.config.claude.meta') }}</span>
216
- </div>
217
211
  </button>
218
212
  <button
219
213
  v-if="isConfigModeVisible('openclaw')"
220
214
  id="side-tab-config-openclaw"
215
+ :aria-description="t('side.config.openclaw.meta')"
221
216
  data-main-tab="config"
222
217
  data-config-mode="openclaw"
223
218
  :aria-current="mainTab === 'config' && configMode === 'openclaw' ? 'page' : null"
@@ -226,13 +221,11 @@
226
221
  @click="onConfigTabClick('openclaw', $event)">
227
222
  <span class="side-item-icon" aria-hidden="true">O</span>
228
223
  <div class="side-item-title">{{ t('side.config.openclaw') }}</div>
229
- <div class="side-item-meta">
230
- <span>{{ t('side.config.openclaw.meta') }}</span>
231
- </div>
232
224
  </button>
233
225
  <button
234
226
  v-if="isConfigModeVisible('opencode')"
235
227
  id="side-tab-config-opencode"
228
+ :aria-description="t('side.config.opencode.meta')"
236
229
  data-main-tab="config"
237
230
  data-config-mode="opencode"
238
231
  :aria-current="mainTab === 'config' && configMode === 'opencode' ? 'page' : null"
@@ -241,14 +234,12 @@
241
234
  @click="onConfigTabClick('opencode', $event)">
242
235
  <span class="side-item-icon" aria-hidden="true">N</span>
243
236
  <div class="side-item-title">{{ t('side.config.opencode') }}</div>
244
- <div class="side-item-meta">
245
- <span>{{ t('side.config.opencode.meta') }}</span>
246
- </div>
247
237
  </button>
248
238
 
249
239
  <button
250
240
  v-if="isConfigModeVisible('kilocode')"
251
241
  id="side-tab-config-kilocode"
242
+ :aria-description="t('side.config.kilocode.meta')"
252
243
  data-main-tab="config"
253
244
  data-config-mode="kilocode"
254
245
  :aria-current="mainTab === 'config' && configMode === 'kilocode' ? 'page' : null"
@@ -257,13 +248,11 @@
257
248
  @click="onConfigTabClick('kilocode', $event)">
258
249
  <span class="side-item-icon" aria-hidden="true">K</span>
259
250
  <div class="side-item-title">{{ t('side.config.kilocode') }}</div>
260
- <div class="side-item-meta">
261
- <span>{{ t('side.config.kilocode.meta') }}</span>
262
- </div>
263
251
  </button>
264
252
  <button
265
253
  v-if="isConfigModeVisible('pi')"
266
254
  id="side-tab-config-pi"
255
+ :aria-description="t('side.config.pi.meta')"
267
256
  data-main-tab="config"
268
257
  data-config-mode="pi"
269
258
  :aria-current="mainTab === 'config' && configMode === 'pi' ? 'page' : null"
@@ -272,9 +261,6 @@
272
261
  @click="onConfigTabClick('pi', $event)">
273
262
  <span class="side-item-icon" aria-hidden="true">P</span>
274
263
  <div class="side-item-title">{{ t('side.config.pi') }}</div>
275
- <div class="side-item-meta">
276
- <span>{{ t('side.config.pi.meta') }}</span>
277
- </div>
278
264
  </button>
279
265
  </div>
280
266
 
@@ -291,12 +277,12 @@
291
277
  <span class="side-item-icon" aria-hidden="true">S</span>
292
278
  <div class="side-item-title">{{ t('side.sessions.browser') }}</div>
293
279
  <div class="side-item-meta">
294
- <span>{{ t('side.sessions.browser.meta') }}</span>
295
280
  <span>{{ t('sessions.sourceLabel', { value: (sessionFilterSource === 'all' ? t('sessions.source.all') : (sessionFilterSource === 'claude' ? 'Claude Code' : (sessionFilterSource === 'gemini' ? 'Gemini CLI' : (sessionFilterSource === 'codebuddy' ? 'CodeBuddy Code' : (sessionFilterSource === 'workbuddy' ? 'WorkBuddy AI' : 'Codex'))))) }) }}</span>
296
281
  </div>
297
282
  </button>
298
283
  <button
299
284
  id="side-tab-prompts"
285
+ :aria-description="t('side.prompts.meta')"
300
286
  data-main-tab="prompts"
301
287
  :aria-current="mainTab === 'prompts' ? 'page' : null"
302
288
  :class="['side-item', { active: isMainTabNavActive('prompts') }]"
@@ -304,9 +290,6 @@
304
290
  @click="onMainTabClick('prompts', $event)">
305
291
  <span class="side-item-icon" aria-hidden="true">P</span>
306
292
  <div class="side-item-title">{{ t('side.prompts') }}</div>
307
- <div class="side-item-meta">
308
- <span>{{ t('side.prompts.meta') }}</span>
309
- </div>
310
293
  </button>
311
294
 
312
295
  <button
@@ -319,7 +302,6 @@
319
302
  <span class="side-item-icon" aria-hidden="true">↗</span>
320
303
  <div class="side-item-title">{{ t('tab.usage') }}</div>
321
304
  <div class="side-item-meta">
322
- <span>{{ t('side.usage.meta') }}</span>
323
305
  <span>{{ t('usage.rangeLabel', { value: (sessionsUsageTimeRange === 'all' ? t('usage.range.all') : (sessionsUsageTimeRange === '30d' ? t('usage.range.30d.short') : t('usage.range.7d.short'))) }) }}</span>
324
306
  </div>
325
307
  </button>
@@ -357,7 +339,6 @@
357
339
  <span class="side-item-icon" aria-hidden="true">◇</span>
358
340
  <div class="side-item-title">{{ t('side.plugins.tools') }}</div>
359
341
  <div class="side-item-meta">
360
- <span>{{ t('side.plugins.tools.meta') }}</span>
361
342
  <span>{{ t('side.plugins.templatesCount', { count: promptTemplatesList.length }) }}</span>
362
343
  </div>
363
344
  </button>
@@ -388,9 +369,6 @@
388
369
  @click="onMainTabClick('settings', $event)">
389
370
  <span class="side-item-icon" aria-hidden="true">⚙</span>
390
371
  <div class="side-item-title">{{ t('side.system.settings') }}</div>
391
- <div class="side-item-meta">
392
- <span>{{ t('side.system.settings.meta') }}</span>
393
- </div>
394
372
  </button>
395
373
  <button
396
374
  id="side-tab-trash"
@@ -463,7 +441,6 @@
463
441
  <div class="panel-header-copy">
464
442
  <div class="panel-kicker">{{ mainTabKicker }}</div>
465
443
  <h1 class="main-title">{{ mainTabTitle }}</h1>
466
- <p class="subtitle">{{ mainTabSubtitle }}</p>
467
444
  </div>
468
445
  </div>
469
446
 
@@ -26,7 +26,6 @@
26
26
  <div class="quick-header">
27
27
  <div>
28
28
  <div class="quick-title">{{ t('modal.openclaw.quick.title') }}</div>
29
- <div class="form-hint">{{ t('modal.openclaw.quick.subtitle') }}</div>
30
29
  </div>
31
30
  <div class="quick-actions">
32
31
  <button class="btn-mini" @click="syncOpenclawQuickFromText">{{ t('modal.openclaw.quick.readFromEditor') }}</button>
@@ -117,7 +116,6 @@
117
116
  <div class="form-group">
118
117
  <label class="form-label">{{ t('field.displayName') }}</label>
119
118
  <input v-model="openclawQuick.modelName" class="form-input" :placeholder="t('placeholder.modelNameOptional')">
120
- <div class="form-hint">{{ t('modal.openclaw.quick.modelNameHint') }}</div>
121
119
  </div>
122
120
  <div class="form-group">
123
121
  <label class="form-label">{{ t('field.contextAndMaxOutput') }}</label>
@@ -0,0 +1,17 @@
1
+ <div v-if="promptInvocationVisible" class="modal-overlay" @click.self="closePromptTemplateInvocation">
2
+ <form ref="promptInvocationDialog" class="modal prompt-invocation-dialog" role="dialog" aria-modal="true" aria-labelledby="prompt-invocation-title" aria-describedby="prompt-invocation-hint" @submit.prevent="finishPromptTemplateInvocation" @keydown="onPromptInvocationKeydown">
3
+ <h2 id="prompt-invocation-title" class="modal-title">{{ t('ecosystem.variablesTitle') }}</h2>
4
+ <p id="prompt-invocation-hint" class="form-hint">{{ t('ecosystem.variablesHint') }}</p>
5
+ <div class="prompt-invocation-fields">
6
+ <label v-for="(name, index) in promptInvocationNames" :key="name" class="form-group" :for="'prompt-invocation-var-' + index">
7
+ <span class="form-label mono">{{ '{' + '{' + name + '}' + '}' }}</span>
8
+ <textarea :id="'prompt-invocation-var-' + index" v-model="promptInvocationValues[name]" class="form-input" :rows="name === 'git_diff' ? 6 : 2" autocomplete="off" spellcheck="false" aria-required="true" :aria-invalid="!!promptInvocationError && !promptInvocationValues[name].trim()"></textarea>
9
+ </label>
10
+ </div>
11
+ <p v-if="promptInvocationError" class="form-error" role="alert">{{ promptInvocationError }}</p>
12
+ <div class="modal-actions">
13
+ <button type="button" class="btn btn-secondary" @click="closePromptTemplateInvocation">{{ t('common.cancel') }}</button>
14
+ <button type="submit" class="btn btn-primary">{{ t('ecosystem.useTemplate') }}</button>
15
+ </div>
16
+ </form>
17
+ </div>
@@ -3,7 +3,6 @@
3
3
  <div class="modal-header skills-modal-header">
4
4
  <div>
5
5
  <div class="modal-title" id="skills-modal-title">{{ t('modal.skills.title') }}</div>
6
- <div class="skills-modal-subtitle">{{ t('modal.skills.subtitle') }}</div>
7
6
  </div>
8
7
  <div class="modal-header-actions skills-modal-actions">
9
8
  <div class="market-target-switch market-target-switch-compact" role="group" :aria-label="t('modal.skills.target.aria')">