codexmate 0.1.33 → 0.1.34

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 (61) hide show
  1. package/README.md +13 -2
  2. package/README.vi.md +13 -2
  3. package/README.zh.md +13 -2
  4. package/cli/local-bridge.js +10 -6
  5. package/cli/openai-chat-routing.js +38 -0
  6. package/cli/routing-bridge.js +143 -0
  7. package/cli/system-prompt-files.js +75 -53
  8. package/cli.js +162 -4
  9. package/lib/file-sharing-lan.js +111 -0
  10. package/lib/file-sharing.js +196 -0
  11. package/lib/model-test-client.js +61 -0
  12. package/lib/model-test.js +126 -0
  13. package/lib/routing-groups.js +161 -0
  14. package/package.json +1 -1
  15. package/plugins/file-sharing/manifest.mjs +10 -0
  16. package/plugins/file-sharing/methods.mjs +101 -0
  17. package/plugins/file-sharing/overview.mjs +3 -0
  18. package/plugins/file-sharing/ownership.mjs +5 -0
  19. package/plugins/registry.mjs +3 -0
  20. package/web-ui/app.js +15 -2
  21. package/web-ui/index.html +3 -2
  22. package/web-ui/modules/app.computed.main-tabs.mjs +3 -0
  23. package/web-ui/modules/app.methods.agents.mjs +12 -0
  24. package/web-ui/modules/app.methods.install.mjs +23 -3
  25. package/web-ui/modules/app.methods.navigation.mjs +2 -0
  26. package/web-ui/modules/app.methods.prompts-editor.mjs +7 -4
  27. package/web-ui/modules/app.methods.session-actions.mjs +2 -2
  28. package/web-ui/modules/app.methods.system-prompt.mjs +88 -17
  29. package/web-ui/modules/app.methods.theme.mjs +4 -3
  30. package/web-ui/modules/app.methods.web-ui-preferences.mjs +7 -0
  31. package/web-ui/modules/i18n/locales/en.mjs +123 -4
  32. package/web-ui/modules/i18n/locales/ja.mjs +123 -4
  33. package/web-ui/modules/i18n/locales/vi.mjs +123 -4
  34. package/web-ui/modules/i18n/locales/zh-tw.mjs +123 -4
  35. package/web-ui/modules/i18n/locales/zh.mjs +123 -4
  36. package/web-ui/modules/model-test.mjs +82 -0
  37. package/web-ui/modules/plugins.methods.mjs +3 -1
  38. package/web-ui/modules/prompt-ecosystem.methods.mjs +4 -3
  39. package/web-ui/modules/routing.mjs +206 -0
  40. package/web-ui/partials/index/layout-header.html +33 -12
  41. package/web-ui/partials/index/modals-basic.html +15 -0
  42. package/web-ui/partials/index/panel-plugins.html +3 -9
  43. package/web-ui/partials/index/panel-prompts.html +13 -7
  44. package/web-ui/partials/index/panel-routing.html +3 -0
  45. package/web-ui/partials/index/panel-settings.html +11 -1
  46. package/web-ui/partials/index/plugin-file-sharing.html +47 -0
  47. package/web-ui/partials/index/routing-model-test.html +53 -0
  48. package/web-ui/partials/index/session-diagnostics.html +7 -4
  49. package/web-ui/res/web-ui-render.precompiled.js +606 -105
  50. package/web-ui/styles/base-theme.css +1 -1
  51. package/web-ui/styles/modals-core.css +6 -5
  52. package/web-ui/styles/navigation-panels.css +4 -0
  53. package/web-ui/styles/plugins-panel.css +40 -1
  54. package/web-ui/styles/responsive.css +10 -5
  55. package/web-ui/styles/routing.css +78 -0
  56. package/web-ui/styles/session-features.css +117 -7
  57. package/web-ui/styles/settings-panel.css +30 -0
  58. package/web-ui/styles/system-prompt.css +8 -7
  59. package/web-ui/styles/theme-violet-tokens.css +52 -0
  60. package/web-ui/styles/theme-violet.css +1736 -0
  61. package/web-ui/styles.css +2 -0
@@ -9,7 +9,6 @@
9
9
  <div class="selector-header plugins-sidebar-header">
10
10
  <div>
11
11
  <span class="selector-title">{{ t('plugins.sidebar.title') }}</span>
12
- <div class="plugins-panel-note">{{ t('plugins.sidebar.note') }}</div>
13
12
  </div>
14
13
  </div>
15
14
 
@@ -17,6 +16,7 @@
17
16
  <button
18
17
  v-for="plugin in pluginsCatalog"
19
18
  :key="'plugin-' + plugin.id"
19
+ :data-plugin-id="plugin.id"
20
20
  type="button"
21
21
  :class="['plugins-item', { active: pluginsActiveId === plugin.id }]"
22
22
  :aria-current="pluginsActiveId === plugin.id ? 'page' : null"
@@ -41,7 +41,6 @@
41
41
  <div class="plugins-panel-head">
42
42
  <div>
43
43
  <div class="plugins-panel-title">{{ t('plugins.promptTemplates.title') }}</div>
44
- <div v-if="pluginsActiveAttribution" class="plugins-panel-note">{{ pluginsActiveAttribution }}</div>
45
44
  </div>
46
45
  <div v-if="!pluginsSidebarVisible" class="settings-tab-actions">
47
46
  <button type="button" class="btn-tool btn-tool-compact" @click="loadPluginsOverview({ forceRefresh: true, silent: false })" :disabled="loading || !!initError || pluginsLoading">
@@ -81,7 +80,6 @@
81
80
  </select>
82
81
 
83
82
  <div v-if="!promptComposerActiveTemplate" class="plugins-panel-note">{{ t('plugins.promptTemplates.compose.empty') }}</div>
84
- <div v-else-if="promptComposerActiveTemplate.description" class="plugins-panel-note">{{ promptComposerActiveTemplate.description }}</div>
85
83
  <div v-if="promptComposerActiveTemplate && !promptComposerActiveTemplate.isBuiltin" class="prompt-compose-actions">
86
84
  <button
87
85
  type="button"
@@ -95,7 +93,6 @@
95
93
  <div class="prompt-vars-head">
96
94
  <div>
97
95
  <div class="prompt-vars-title">{{ t('plugins.promptTemplates.vars.title') }}</div>
98
- <div v-if="!promptComposerActiveTemplate.isBuiltin" class="plugins-panel-note">{{ t('plugins.promptTemplates.compose.varsHint') }}</div>
99
96
  <div v-if="promptComposerMissingVars.length" class="plugins-panel-note">{{ t('plugins.promptTemplates.compose.missingCount', { count: promptComposerMissingVars.length }) }}</div>
100
97
  </div>
101
98
  <div class="prompt-editor-actions">
@@ -121,7 +118,6 @@
121
118
  <div class="prompt-vars-head">
122
119
  <div>
123
120
  <div class="prompt-vars-title">{{ t('plugins.promptTemplates.compose.outputTitle') }}</div>
124
- <div class="plugins-panel-note">{{ t('plugins.promptTemplates.compose.outputHint') }}</div>
125
121
  </div>
126
122
  <button type="button" class="btn-mini" @click="copyPromptComposerRendered" :disabled="pluginsLoading || !promptComposerRendered">{{ t('plugins.promptTemplates.compose.copy') }}</button>
127
123
  </div>
@@ -210,9 +206,7 @@
210
206
  <div v-if="promptTemplateDraft.isBuiltin" class="plugins-panel-note">
211
207
  {{ t('plugins.promptTemplates.editor.builtinReadOnly') }}
212
208
  </div>
213
- <div v-if="promptTemplateDraft.isBuiltin && (promptTemplateDraft.createdBy || (promptTemplateDraft.maintainers && promptTemplateDraft.maintainers.length))" class="plugins-panel-note">
214
- {{ t('plugins.meta.attribution', { createdBy: promptTemplateDraft.createdBy || '', maintainers: (promptTemplateDraft.maintainers || []).join(', ') }) }}
215
- </div>
209
+
216
210
  <input class="form-input" type="text" v-model.trim="promptTemplateDraftRaw.description" :disabled="promptTemplateDraft.isBuiltin" :placeholder="t('plugins.promptTemplates.editor.descPlaceholder')" :aria-label="t('plugins.promptTemplates.editor.descAria')">
217
211
  </div>
218
212
 
@@ -265,7 +259,6 @@
265
259
  <div class="plugins-panel-head">
266
260
  <div>
267
261
  <div class="plugins-panel-title">{{ t('plugins.textTools.title') }}</div>
268
- <div v-if="pluginsActiveAttribution" class="plugins-panel-note">{{ pluginsActiveAttribution }}</div>
269
262
  </div>
270
263
  </div>
271
264
 
@@ -307,6 +300,7 @@
307
300
  </div>
308
301
  </div>
309
302
 
303
+ <!-- @include ./plugin-file-sharing.html -->
310
304
  <div v-else class="skills-empty-state">{{ t('plugins.promptTemplates.noPluginSelected') }}</div>
311
305
  </section>
312
306
  </div>
@@ -29,9 +29,6 @@
29
29
  :value="projectClaudeMdPath"
30
30
  @change="setProjectClaudeMdPathManual($event.target.value)">
31
31
  </div>
32
- <div v-if="projectClaudeMdPath" class="form-hint project-path-detected">
33
- {{ t('prompts.project.detected', { path: projectClaudeMdPath }) }}
34
- </div>
35
32
  </div>
36
33
 
37
34
 
@@ -271,21 +268,30 @@
271
268
 
272
269
  <div v-if="promptsSubTab === 'system'">
273
270
  <div class="sys-prompt-controls">
271
+ <div class="sys-prompt-control-group">
272
+ <label class="form-label" for="sys-prompt-file-select">{{ t('sysPrompt.fileLabel') }}</label>
273
+ <select id="sys-prompt-file-select" class="form-input sys-prompt-select" :value="currentSysPromptFileName()" :aria-busy="sysPromptFilesLoading" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible" @focus="loadSystemPromptFiles" @pointerdown="loadSystemPromptFiles" @keydown.enter="loadSystemPromptFiles" @keydown.space="loadSystemPromptFiles" @change="switchSysPromptFileName($event.target.value, $event)">
274
+ <option v-if="!sysPromptFiles.some(file => file.filename === currentSysPromptFileName())" :value="currentSysPromptFileName()" disabled>{{ currentSysPromptFileName() }}</option>
275
+ <option v-for="file in sysPromptFiles" :key="file.filename" :value="file.filename">{{ file.filename }}{{ file.exists ? '' : ' · ' + t('common.notExistsWillCreateOnSave') }}</option>
276
+ </select>
277
+ <div v-if="sysPromptFilesLoading" class="form-hint" role="status">{{ t('sysPrompt.filesLoading') }}</div>
278
+ </div>
274
279
  <div class="sys-prompt-control-group">
275
280
  <label class="form-label">{{ t('sysPrompt.scope.label') }}</label>
276
- <select class="form-input sys-prompt-select" :value="sysPromptScope" @change="switchSysPromptScope($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible">
281
+ <select class="form-input sys-prompt-select" :value="sysPromptScope" @change="switchSysPromptScope($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
277
282
  <option value="global">{{ t('sysPrompt.scope.global') }}</option>
278
283
  <option value="project">{{ t('sysPrompt.scope.project') }}</option>
279
284
  </select>
280
285
  </div>
281
- <div class="sys-prompt-control-group">
286
+ <div v-if="!isSysPromptCustomFile()" class="sys-prompt-control-group">
282
287
  <label class="form-label">{{ t('sysPrompt.mode.label') }}</label>
283
- <select class="form-input sys-prompt-select" :value="sysPromptMode" @change="switchSysPromptMode($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible">
288
+ <select class="form-input sys-prompt-select" :value="sysPromptMode" @change="switchSysPromptMode($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
284
289
  <option value="append">{{ t('sysPrompt.mode.append') }}</option>
285
290
  <option value="system">{{ t('sysPrompt.mode.system') }}</option>
286
291
  </select>
287
292
  </div>
288
293
  </div>
294
+ <div v-if="sysPromptFilesError" class="state-message error" role="alert">{{ sysPromptFilesError }}</div>
289
295
 
290
296
  <div class="prompts-editor">
291
297
  <div class="prompts-editor-toolbar">
@@ -332,7 +338,7 @@
332
338
  <button class="btn-mini" @click="sysPromptDiffVisible ? resetSysPromptDiffState() : cancelSysPromptEdit()" :disabled="sysPromptSaving || sysPromptDiffLoading" :title="t('common.cancel')">
333
339
  <svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg>
334
340
  </button>
335
- <button class="btn-mini btn-confirm-mini" @click="applySystemPrompt" :disabled="sysPromptSaving || sysPromptLoading || sysPromptDiffLoading || (!sysPromptDiffVisible && !hasSysPromptContentChanged()) || (sysPromptDiffVisible && !sysPromptDiffHasChangesValue)" :title="sysPromptDiffVisible ? t('common.save') : t('common.preview')">
341
+ <button class="btn-mini btn-confirm-mini" @click="applySystemPrompt" :disabled="sysPromptFileMissing || sysPromptSaving || sysPromptLoading || sysPromptDiffLoading || (!sysPromptDiffVisible && !hasSysPromptContentChanged()) || (sysPromptDiffVisible && !sysPromptDiffHasChangesValue)" :title="sysPromptDiffVisible ? t('common.save') : t('common.preview')">
336
342
  <svg v-if="sysPromptDiffVisible" class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
337
343
  <svg v-else class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
338
344
  </button>
@@ -0,0 +1,3 @@
1
+ <section v-show="mainTab === 'routing'" id="panel-routing" class="mode-content" role="tabpanel" aria-labelledby="tab-routing">
2
+ <!-- @include ./routing-model-test.html -->
3
+ </section>
@@ -64,25 +64,35 @@
64
64
  <div class="settings-card-main">
65
65
  <div class="settings-card-content">
66
66
  <div class="settings-card-title">{{ t('settings.theme.title') }}</div>
67
- <div class="settings-toggle-group">
67
+ <div class="settings-toggle-group settings-theme-options">
68
68
  <button
69
69
  type="button"
70
70
  :class="['toggle-btn', { active: theme === 'light' }]"
71
+ :aria-pressed="theme === 'light'"
71
72
  @click="setTheme('light')">
72
73
  {{ t('settings.theme.light') }}
73
74
  </button>
74
75
  <button
75
76
  type="button"
76
77
  :class="['toggle-btn', { active: theme === 'dark' }]"
78
+ :aria-pressed="theme === 'dark'"
77
79
  @click="setTheme('dark')">
78
80
  {{ t('settings.theme.dark') }}
79
81
  </button>
80
82
  <button
81
83
  type="button"
82
84
  :class="['toggle-btn', { active: theme === 'ocean' }]"
85
+ :aria-pressed="theme === 'ocean'"
83
86
  @click="setTheme('ocean')">
84
87
  {{ t('settings.theme.ocean') }}
85
88
  </button>
89
+ <button
90
+ type="button"
91
+ :class="['toggle-btn', { active: theme === 'violet' }]"
92
+ :aria-pressed="theme === 'violet'"
93
+ @click="setTheme('violet')">
94
+ {{ t('settings.theme.violet') }}
95
+ </button>
86
96
  </div>
87
97
  </div>
88
98
  </div>
@@ -0,0 +1,47 @@
1
+ <div v-else-if="pluginsActiveId === 'file-sharing'" class="plugins-panel" id="plugin-file-sharing">
2
+ <div class="plugins-panel-head">
3
+ <div class="plugins-panel-title">{{ t('plugins.fileSharing.title') }}</div>
4
+ <div class="file-sharing-actions">
5
+ <button type="button" class="btn-mini" :disabled="fileSharingBusy" @click="$refs.fileSharingFiles.click()">{{ t('plugins.fileSharing.chooseFiles') }}</button>
6
+ <button type="button" class="btn-mini" :disabled="fileSharingBusy" @click="$refs.fileSharingFolder.click()">{{ t('plugins.fileSharing.chooseFolder') }}</button>
7
+ <button type="button" class="btn-mini" :disabled="fileSharingBusy" @click="refreshFileSharing">{{ t('common.refresh') }}</button>
8
+ </div>
9
+ </div>
10
+ <input ref="fileSharingFiles" id="file-sharing-files" type="file" multiple hidden @change="selectFileSharingItems($event, false)">
11
+ <input ref="fileSharingFolder" id="file-sharing-folder" type="file" webkitdirectory hidden @change="selectFileSharingItems($event, true)">
12
+ <p v-if="fileSharingError" role="alert" class="state-message error">{{ fileSharingError }}</p>
13
+ <div v-if="fileSharingPending" class="file-sharing-pending">
14
+ <p class="plugins-panel-note">{{ t('plugins.fileSharing.confirm') }}</p>
15
+ <ul class="file-sharing-items" aria-live="polite">
16
+ <li v-for="(file, index) in fileSharingPending.entries" :key="index" dir="auto">{{ file.name }}</li>
17
+ </ul>
18
+ <div class="file-sharing-actions">
19
+ <button type="button" class="btn-mini" id="upload-file-sharing" :disabled="fileSharingBusy" @click="uploadFileSharingItems">{{ t('plugins.fileSharing.upload') }}</button>
20
+ <button type="button" class="btn-mini" id="cancel-file-sharing" :disabled="fileSharingBusy" @click="fileSharingPending = null">{{ t('common.cancel') }}</button>
21
+ </div>
22
+ </div>
23
+ <p v-if="fileSharingBusy" role="status" class="plugins-panel-note">{{ t('common.loading') }}</p>
24
+ <p v-else-if="!fileSharingBatches.length" class="skills-empty-state">{{ t('plugins.fileSharing.empty') }}</p>
25
+ <ul v-if="fileSharingBatches.length" class="file-sharing-items file-sharing-batches">
26
+ <li v-for="batch in fileSharingBatches" :key="batch.id">
27
+ <div class="file-sharing-row">
28
+ <strong dir="auto">{{ batch.folder || t('plugins.fileSharing.files', { count: batch.files.length }) }}</strong>
29
+ <button type="button" class="btn-mini file-sharing-icon file-sharing-remove" :aria-label="t('plugins.fileSharing.remove')" :title="t('plugins.fileSharing.remove')" :disabled="fileSharingBusy" @click="removeFileSharingBatch(batch.id)">
30
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" focusable="false"><path d="M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6m5 4v6m4-6v6"/></svg>
31
+ </button>
32
+ </div>
33
+ <ul class="file-sharing-items">
34
+ <li v-for="(file, index) in batch.files" :key="index" class="file-sharing-row">
35
+ <span dir="auto">{{ file.name }}</span>
36
+ <span class="file-sharing-size">{{ t('plugins.fileSharing.bytes', { size: file.size }) }}</span>
37
+ <a class="btn-mini file-sharing-icon" :aria-label="t('plugins.fileSharing.download')" :title="t('plugins.fileSharing.download')" :href="fileSharingDownloadUrl(batch.id, index)" download referrerpolicy="no-referrer">
38
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" focusable="false"><path d="M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4"/></svg>
39
+ </a>
40
+ <button type="button" class="btn-mini file-sharing-icon file-sharing-copy" :aria-label="t('plugins.fileSharing.copyLink')" :title="t('plugins.fileSharing.copyLink')" :disabled="fileSharingBusy" @click="copyFileSharingLink(batch.id, index)">
41
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" focusable="false"><path d="M10 13a4 4 0 0 0 6 .5l3-3a4 4 0 0 0-5.5-5.5l-1.7 1.7m2.2 4.3a4 4 0 0 0-6-.5l-3 3a4 4 0 0 0 5.5 5.5l1.7-1.7"/></svg>
42
+ </button>
43
+ </li>
44
+ </ul>
45
+ </li>
46
+ </ul>
47
+ </div>
@@ -0,0 +1,53 @@
1
+ <div class="routing-test">
2
+ <form novalidate @submit.prevent="runModelTest" :aria-busy="modelTestRunning">
3
+ <fieldset :disabled="modelTestRunning || modelTestLoading">
4
+ <legend class="routing-test-legend">{{ t('modelTest.selection') }}</legend>
5
+ <div class="routing-test-heading">
6
+ <div class="segmented-control" role="group" :aria-label="t('modelTest.source')">
7
+ <button v-for="target in ['codex', 'pi']" :key="target" type="button" :class="['segment', { active: modelTestTarget === target }]" :aria-pressed="modelTestTarget === target" @click="setModelTestTarget(target)">{{ target === 'codex' ? 'Codex' : 'Pi' }}</button>
8
+ </div>
9
+ <button type="button" class="btn-tool routing-icon-btn" :disabled="modelTestLoading || modelTestRunning" :aria-label="t('routing.refresh')" :title="t('routing.refresh')" @click="loadModelTestCatalog">
10
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" focusable="false"><path d="M20 7v5h-5M4 17v-5h5M6 7a7 7 0 0 1 12-1l2 3M4 15l2 3a7 7 0 0 0 12-1"/></svg>
11
+ </button>
12
+ </div>
13
+ <div class="routing-form-head">
14
+ <label class="routing-field"><span class="form-label">{{ t('routing.provider') }}</span>
15
+ <select class="model-select" v-model="modelTestProvider" @change="selectModelTestProvider">
16
+ <option value="" disabled>{{ t('routing.selectProvider') }}</option>
17
+ <option v-for="provider in modelTestProviders()" :key="provider.name" :value="provider.name">{{ provider.name }}</option>
18
+ </select>
19
+ </label>
20
+ <label class="routing-field"><span class="form-label">{{ t('routing.model') }}</span>
21
+ <select class="model-select" v-model="modelTestModel">
22
+ <option value="" disabled>{{ t('modelTest.selectModel') }}</option>
23
+ <option v-for="model in modelTestModels()" :key="model" :value="model">{{ model }}</option>
24
+ </select>
25
+ </label>
26
+ </div>
27
+ <p v-if="!modelTestLoading && !modelTestModels().length" class="routing-hint">{{ t('modelTest.empty') }} <button type="button" class="btn-tool" @click="switchConfigMode(modelTestTarget)">{{ t('routing.openConfig') }}</button></p>
28
+ <label class="routing-field routing-test-prompt"><span class="form-label">{{ t('modelTest.prompt') }}</span>
29
+ <textarea class="form-input" v-model="modelTestPrompt" rows="4" maxlength="8000"></textarea>
30
+ </label>
31
+ <div class="routing-test-actions">
32
+ <button type="submit" class="btn-tool btn-primary" :disabled="!modelTestPrompt.trim() || !modelTestModels().length">{{ t(modelTestRunning ? 'modelTest.running' : 'modelTest.run') }}</button>
33
+ </div>
34
+ </fieldset>
35
+ </form>
36
+ <p v-if="modelTestError" class="routing-error" role="alert">{{ modelTestError }}</p>
37
+ <div class="routing-test-response" aria-live="polite" :aria-busy="modelTestRunning">
38
+ <p v-if="modelTestLoading" class="routing-hint" role="status">{{ t('modelTest.loading') }}</p>
39
+ <template v-else-if="modelTestResult">
40
+ <div class="routing-test-result-head">
41
+ <strong>{{ modelTestResult.provider }} / {{ modelTestResult.responseModel || modelTestResult.model }}</strong>
42
+ <span class="routing-hint">{{ t(modelTestRunning ? 'modelTest.running' : modelTestResult.ok ? 'modelTest.completed' : 'modelTest.failed') }}<template v-if="!modelTestRunning"> · {{ modelTestDuration() }}</template></span>
43
+ </div>
44
+ <p class="routing-test-question">{{ modelTestResult.prompt }}</p>
45
+ <p v-if="!modelTestRunning && !modelTestResult.ok" class="routing-error" role="alert">{{ modelTestResult.error }}</p>
46
+ <template v-else-if="!modelTestRunning">
47
+ <div v-if="modelTestRenderedResponse.html" class="routing-test-answer" v-html="modelTestRenderedResponse.html"></div>
48
+ <p v-else class="routing-test-answer routing-test-plain">{{ modelTestResult.text }}</p>
49
+ <p v-if="modelTestResult.incomplete" class="routing-hint">{{ t('modelTest.incomplete') }}</p>
50
+ </template>
51
+ </template>
52
+ </div>
53
+ </div>
@@ -1,5 +1,8 @@
1
1
  <details class="session-features feature-diagnostics" @toggle="$event.target === $event.currentTarget && $event.currentTarget.open && loadDiagnosticTargets()">
2
- <summary class="feature-diagnostics-heading">{{ t('features.diagnostics') }}</summary>
2
+ <summary class="feature-diagnostics-heading">
3
+ <span>{{ t('features.diagnostics') }}</span>
4
+ <svg class="feature-diagnostics-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true" focusable="false"><path d="m9 5 7 7-7 7"/></svg>
5
+ </summary>
3
6
  <div class="feature-content">
4
7
  <p class="feature-hint">{{ t('features.diagnosticScope') }}</p>
5
8
  <p v-if="featureError" class="form-error feature-feedback" role="alert">{{ featureError }}</p>
@@ -8,8 +11,8 @@
8
11
  <label v-for="name in diagnosticsTargets" :key="name"><input type="checkbox" :value="name" v-model="diagnosticsSelected" :disabled="diagnosticsReport?.status === 'running'"><span>{{ name }}</span></label>
9
12
  </div>
10
13
  <div class="feature-actions feature-diagnostic-controls">
11
- <button type="button" class="btn-mini feature-primary" @click="startDiagnostics" :disabled="diagnosticsReport?.status === 'running'">{{ t('features.check') }}</button>
12
- <button v-if="diagnosticsReport?.status === 'running'" type="button" class="btn-mini feature-quiet" @click="cancelDiagnostics">{{ t('features.cancel') }}</button>
14
+ <button type="button" class="feature-button feature-primary" @click="startDiagnostics" :disabled="diagnosticsReport?.status === 'running'">{{ t('features.check') }}</button>
15
+ <button v-if="diagnosticsReport?.status === 'running'" type="button" class="feature-button feature-quiet" @click="cancelDiagnostics">{{ t('features.cancel') }}</button>
13
16
  <span v-if="diagnosticsReport" class="feature-status" :data-status="diagnosticsReport.status" role="status">{{ t('features.status.' + diagnosticsReport.status) }}</span>
14
17
  </div>
15
18
  <template v-if="diagnosticsReport">
@@ -23,7 +26,7 @@
23
26
  <p v-if="item.errorCode" class="form-error">{{ t('features.error.' + item.errorCode) }}</p>
24
27
  <details class="feature-disclosure"><summary>{{ t('features.technicalDetails') }}</summary><pre class="feature-code">{{ JSON.stringify(item.evidence || {}, null, 2) }}</pre></details>
25
28
  </article>
26
- <footer class="feature-record-actions feature-export-actions"><button type="button" class="btn-mini feature-quiet" @click="exportDiagnostics('json')">{{ t('features.exportJson') }}</button><button type="button" class="btn-mini feature-quiet" @click="exportDiagnostics('md')">{{ t('features.exportMarkdown') }}</button></footer>
29
+ <footer class="feature-record-actions feature-export-actions"><button type="button" class="feature-button feature-quiet" @click="exportDiagnostics('json')">{{ t('features.exportJson') }}</button><button type="button" class="feature-button feature-quiet" @click="exportDiagnostics('md')">{{ t('features.exportMarkdown') }}</button></footer>
27
30
  </template>
28
31
  </div>
29
32
  </details>