codexmate 0.1.35 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -100
- package/README.vi.md +105 -93
- package/README.zh.md +102 -98
- package/cli/skills.js +103 -4
- package/cli.js +5 -2
- package/package.json +1 -1
- package/web-ui/app.js +14 -0
- package/web-ui/logic.codex.mjs +14 -0
- package/web-ui/modules/app.computed.main-tabs.mjs +12 -0
- package/web-ui/modules/app.methods.agents.mjs +0 -3
- package/web-ui/modules/app.methods.claude-config.mjs +26 -5
- package/web-ui/modules/app.methods.install.mjs +13 -17
- package/web-ui/modules/app.methods.navigation.mjs +1 -1
- package/web-ui/modules/app.methods.openclaw-editing.mjs +29 -0
- package/web-ui/modules/app.methods.openclaw-persist.mjs +3 -3
- package/web-ui/modules/app.methods.opencode-config.mjs +34 -0
- package/web-ui/modules/app.methods.pi-config.mjs +14 -9
- package/web-ui/modules/app.methods.prompts-editor.mjs +30 -6
- package/web-ui/modules/app.methods.providers.mjs +11 -0
- package/web-ui/modules/app.methods.session-trash.mjs +4 -5
- package/web-ui/modules/app.methods.startup-claude.mjs +11 -5
- package/web-ui/modules/claude-provider-presets.mjs +23 -0
- package/web-ui/modules/i18n/locales/en.mjs +29 -0
- package/web-ui/modules/i18n/locales/ja.mjs +29 -0
- package/web-ui/modules/i18n/locales/vi.mjs +29 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +29 -0
- package/web-ui/modules/i18n/locales/zh.mjs +29 -0
- package/web-ui/modules/pi-provider-templates.mjs +6 -1
- package/web-ui/modules/session-features.mjs +25 -1
- package/web-ui/modules/skills.methods.mjs +61 -16
- package/web-ui/partials/index/layout-header.html +36 -37
- package/web-ui/partials/index/modal-openclaw-config.html +3 -0
- package/web-ui/partials/index/modals-basic.html +1 -1
- package/web-ui/partials/index/modals-pi-provider.html +1 -1
- package/web-ui/partials/index/panel-config-claude.html +4 -21
- package/web-ui/partials/index/panel-config-codex.html +3 -1
- package/web-ui/partials/index/panel-config-opencode.html +4 -0
- package/web-ui/partials/index/panel-market.html +10 -3
- package/web-ui/partials/index/panel-prompts.html +40 -20
- package/web-ui/partials/index/panel-settings.html +45 -0
- package/web-ui/partials/index/session-features.html +24 -7
- package/web-ui/res/web-ui-render.precompiled.js +531 -271
- package/web-ui/styles/layout-shell.css +41 -70
- package/web-ui/styles/prompts-editor.css +127 -27
- package/web-ui/styles/session-features.css +12 -1
- package/web-ui/styles/settings-panel.css +4 -0
- package/web-ui/styles/system-prompt.css +9 -4
- package/web-ui/styles/theme-dark.css +0 -18
- package/web-ui/styles/theme-ocean.css +0 -14
- package/web-ui/styles/theme-violet.css +0 -23
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
role="tabpanel"
|
|
7
7
|
aria-labelledby="tab-prompts">
|
|
8
8
|
<div class="prompts-md-tabs" role="tablist" :aria-label="t('tab.prompts')">
|
|
9
|
-
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'codex' }]" role="tab" :aria-selected="promptsSubTab === 'codex'" @click="switchPromptsSubTab('codex')">
|
|
10
|
-
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'opencode' }]" role="tab" :aria-selected="promptsSubTab === 'opencode'" @click="switchPromptsSubTab('opencode')">
|
|
11
|
-
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'claude-project' }]" role="tab" :aria-selected="promptsSubTab === 'claude-project'" @click="switchPromptsSubTab('claude-project')">
|
|
12
|
-
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'system' }]" role="tab" :aria-selected="promptsSubTab === 'system'" @click="switchPromptsSubTab('system')">
|
|
9
|
+
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'codex' }]" role="tab" :aria-selected="promptsSubTab === 'codex'" @click="switchPromptsSubTab('codex')"><span>AGENTS.md</span><span class="prompts-file-badge">Codex</span></button>
|
|
10
|
+
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'opencode' }]" role="tab" :aria-selected="promptsSubTab === 'opencode'" @click="switchPromptsSubTab('opencode')"><span>AGENTS.md</span><span class="prompts-file-badge">OpenCode</span></button>
|
|
11
|
+
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'claude-project' }]" role="tab" :aria-selected="promptsSubTab === 'claude-project'" @click="switchPromptsSubTab('claude-project')"><span>CLAUDE.md</span><span class="prompts-file-badge">Claude</span></button>
|
|
12
|
+
<button type="button" :class="['prompts-md-tab', { active: promptsSubTab === 'system' }]" role="tab" :aria-selected="promptsSubTab === 'system'" @click="switchPromptsSubTab('system')"><span>SYSTEM.md</span><span class="prompts-file-badge">Pi</span></button>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<div v-if="promptsSubTab === 'claude-project'" class="project-path-selector">
|
|
15
|
+
<div v-if="promptsSubTab === 'claude-project'" class="project-path-selector prompts-target-card">
|
|
16
16
|
<label class="project-path-label">{{ t('prompts.project.pathLabel') }}</label>
|
|
17
17
|
<div class="project-path-row">
|
|
18
18
|
<select
|
|
@@ -89,6 +89,14 @@
|
|
|
89
89
|
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 8v4l3 2"/><path d="M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4"/></svg>
|
|
90
90
|
</button>
|
|
91
91
|
</div>
|
|
92
|
+
<div v-if="promptsPreviewEnabled && !agentsDiffVisible" class="prompts-editor-group prompts-editor-group--reading">
|
|
93
|
+
<button type="button" class="btn-mini prompts-outline-toggle" :aria-expanded="!promptsOutlineCollapsed" aria-controls="prompts-agents-outline" :aria-label="t('prompts.editor.outline')" :title="t('prompts.editor.outline')" @click="promptsOutlineCollapsed = !promptsOutlineCollapsed">
|
|
94
|
+
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M10 4v16"/></svg>
|
|
95
|
+
</button>
|
|
96
|
+
<button type="button" class="btn-mini prompts-split-collapse-btn" :aria-pressed="!promptsPreviewCollapsed" :title="promptsPreviewCollapsed ? t('prompts.editor.expandPreview') : t('prompts.editor.collapsePreview')" :aria-label="promptsPreviewCollapsed ? t('prompts.editor.expandPreview') : t('prompts.editor.collapsePreview')" @click="togglePromptsPreviewCollapsed()">
|
|
97
|
+
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
92
100
|
<div class="prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view" role="group" :aria-label="t('prompts.actions.view')">
|
|
93
101
|
<button class="btn-mini" @click="agentsDiffVisible ? resetAgentsDiffState() : loadPromptsContent()" :disabled="agentsSaving || agentsDiffLoading" :title="t('common.cancel')">
|
|
94
102
|
<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>
|
|
@@ -234,10 +242,12 @@
|
|
|
234
242
|
</div>
|
|
235
243
|
</div>
|
|
236
244
|
</div>
|
|
237
|
-
<div :class="['editor-frame prompts-editor-frame', { 'editor-frame--loading': agentsLoading, 'prompts-editor-frame--split': promptsPreviewEnabled, 'prompts-editor-frame--preview-collapsed': promptsPreviewCollapsed, 'prompts-editor-frame--mobile-preview': promptsPreviewEnabled && promptsMobileView === 'preview' }]">
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
|
|
245
|
+
<div :class="['editor-frame prompts-editor-frame', { 'prompts-editor-frame--outline': promptsPreviewEnabled && !promptsOutlineCollapsed, 'editor-frame--loading': agentsLoading, 'prompts-editor-frame--split': promptsPreviewEnabled, 'prompts-editor-frame--preview-collapsed': promptsPreviewCollapsed, 'prompts-editor-frame--mobile-preview': promptsPreviewEnabled && promptsMobileView === 'preview' }]">
|
|
246
|
+
<nav v-if="promptsPreviewEnabled" v-show="!promptsOutlineCollapsed" id="prompts-agents-outline" class="prompts-outline" :aria-label="t('prompts.editor.outline')">
|
|
247
|
+
<div class="prompts-outline-title">{{ t('prompts.editor.outline') }}</div>
|
|
248
|
+
<p v-if="!agentsPreviewHeadings.length" class="form-hint">{{ t('prompts.editor.outlineEmpty') }}</p>
|
|
249
|
+
<button v-for="heading in agentsPreviewHeadings" :key="heading.index" type="button" class="prompts-outline-item" :style="{ '--outline-depth': heading.depth }" @click="jumpToPromptsHeading('agents', heading.index)">{{ heading.text }}</button>
|
|
250
|
+
</nav>
|
|
241
251
|
<div v-if="agentsLoading" class="editor-skeleton">
|
|
242
252
|
<div class="skeleton-line" v-for="i in 6" :key="i"></div>
|
|
243
253
|
</div>
|
|
@@ -252,7 +262,7 @@
|
|
|
252
262
|
@input="onAgentsContentInput"
|
|
253
263
|
:placeholder="t(promptsSubTab === 'claude-project' ? 'modal.agents.placeholder.claudeProject' : 'modal.agents.placeholder')"></textarea>
|
|
254
264
|
</div>
|
|
255
|
-
<div v-if="promptsPreviewEnabled" class="prompts-preview-pane">
|
|
265
|
+
<div v-if="promptsPreviewEnabled" ref="promptsAgentsPreviewPane" class="prompts-preview-pane">
|
|
256
266
|
<div v-if="promptsPreviewLibsMissing" class="state-message error">{{ t('prompts.editor.previewUnavailable') }}</div>
|
|
257
267
|
<div v-else-if="!agentsPreviewHtml" class="state-message">{{ t('prompts.editor.previewEmpty') }}</div>
|
|
258
268
|
<div v-else class="prompts-preview-body" v-html="agentsPreviewHtml"></div>
|
|
@@ -267,7 +277,7 @@
|
|
|
267
277
|
</div>
|
|
268
278
|
|
|
269
279
|
<div v-if="promptsSubTab === 'system'">
|
|
270
|
-
<div class="sys-prompt-controls">
|
|
280
|
+
<div class="sys-prompt-controls prompts-target-card">
|
|
271
281
|
<div class="sys-prompt-control-group">
|
|
272
282
|
<label class="form-label" for="sys-prompt-file-select">{{ t('sysPrompt.fileLabel') }}</label>
|
|
273
283
|
<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)">
|
|
@@ -277,15 +287,15 @@
|
|
|
277
287
|
<div v-if="sysPromptFilesLoading" class="form-hint" role="status">{{ t('sysPrompt.filesLoading') }}</div>
|
|
278
288
|
</div>
|
|
279
289
|
<div class="sys-prompt-control-group">
|
|
280
|
-
<label class="form-label">{{ t('sysPrompt.scope.label') }}</label>
|
|
281
|
-
<select class="form-input sys-prompt-select" :value="sysPromptScope" @change="switchSysPromptScope($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
|
|
290
|
+
<label class="form-label" for="sys-prompt-scope-select">{{ t('sysPrompt.scope.label') }}</label>
|
|
291
|
+
<select id="sys-prompt-scope-select" class="form-input sys-prompt-select" :value="sysPromptScope" @change="switchSysPromptScope($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
|
|
282
292
|
<option value="global">{{ t('sysPrompt.scope.global') }}</option>
|
|
283
293
|
<option value="project">{{ t('sysPrompt.scope.project') }}</option>
|
|
284
294
|
</select>
|
|
285
295
|
</div>
|
|
286
296
|
<div v-if="!isSysPromptCustomFile()" class="sys-prompt-control-group">
|
|
287
|
-
<label class="form-label">{{ t('sysPrompt.mode.label') }}</label>
|
|
288
|
-
<select class="form-input sys-prompt-select" :value="sysPromptMode" @change="switchSysPromptMode($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
|
|
297
|
+
<label class="form-label" for="sys-prompt-mode-select">{{ t('sysPrompt.mode.label') }}</label>
|
|
298
|
+
<select id="sys-prompt-mode-select" class="form-input sys-prompt-select" :value="sysPromptMode" @change="switchSysPromptMode($event.target.value)" :disabled="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible || hasSysPromptContentChanged()">
|
|
289
299
|
<option value="append">{{ t('sysPrompt.mode.append') }}</option>
|
|
290
300
|
<option value="system">{{ t('sysPrompt.mode.system') }}</option>
|
|
291
301
|
</select>
|
|
@@ -334,6 +344,14 @@
|
|
|
334
344
|
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 8v4l3 2"/><path d="M3 12a9 9 0 1 0 9-9 9 9 0 0 0-7.5 4M3 4v4h4"/></svg>
|
|
335
345
|
</button>
|
|
336
346
|
</div>
|
|
347
|
+
<div v-if="promptsPreviewEnabled && !sysPromptDiffVisible" class="prompts-editor-group prompts-editor-group--reading">
|
|
348
|
+
<button type="button" class="btn-mini prompts-outline-toggle" :aria-expanded="!promptsOutlineCollapsed" aria-controls="prompts-sys-outline" :aria-label="t('prompts.editor.outline')" :title="t('prompts.editor.outline')" @click="promptsOutlineCollapsed = !promptsOutlineCollapsed">
|
|
349
|
+
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M10 4v16"/></svg>
|
|
350
|
+
</button>
|
|
351
|
+
<button type="button" class="btn-mini prompts-split-collapse-btn" :aria-pressed="!promptsPreviewCollapsed" :title="promptsPreviewCollapsed ? t('prompts.editor.expandPreview') : t('prompts.editor.collapsePreview')" :aria-label="promptsPreviewCollapsed ? t('prompts.editor.expandPreview') : t('prompts.editor.collapsePreview')" @click="togglePromptsPreviewCollapsed()">
|
|
352
|
+
<svg class="btn-icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
353
|
+
</button>
|
|
354
|
+
</div>
|
|
337
355
|
<div class="prompts-editor-group prompts-editor-group--workflow prompts-editor-group--view" role="group" :aria-label="t('prompts.actions.view')">
|
|
338
356
|
<button class="btn-mini" @click="sysPromptDiffVisible ? resetSysPromptDiffState() : cancelSysPromptEdit()" :disabled="sysPromptSaving || sysPromptDiffLoading" :title="t('common.cancel')">
|
|
339
357
|
<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>
|
|
@@ -417,10 +435,12 @@
|
|
|
417
435
|
</div>
|
|
418
436
|
</div>
|
|
419
437
|
</div>
|
|
420
|
-
<div :class="['editor-frame prompts-editor-frame', { 'editor-frame--loading': sysPromptLoading, 'prompts-editor-frame--split': promptsPreviewEnabled, 'prompts-editor-frame--preview-collapsed': promptsPreviewCollapsed, 'prompts-editor-frame--mobile-preview': promptsPreviewEnabled && promptsMobileView === 'preview' }]">
|
|
421
|
-
<
|
|
422
|
-
<
|
|
423
|
-
|
|
438
|
+
<div :class="['editor-frame prompts-editor-frame', { 'prompts-editor-frame--outline': promptsPreviewEnabled && !promptsOutlineCollapsed, 'editor-frame--loading': sysPromptLoading, 'prompts-editor-frame--split': promptsPreviewEnabled, 'prompts-editor-frame--preview-collapsed': promptsPreviewCollapsed, 'prompts-editor-frame--mobile-preview': promptsPreviewEnabled && promptsMobileView === 'preview' }]">
|
|
439
|
+
<nav v-if="promptsPreviewEnabled" v-show="!promptsOutlineCollapsed" id="prompts-sys-outline" class="prompts-outline" :aria-label="t('prompts.editor.outline')">
|
|
440
|
+
<div class="prompts-outline-title">{{ t('prompts.editor.outline') }}</div>
|
|
441
|
+
<p v-if="!sysPreviewHeadings.length" class="form-hint">{{ t('prompts.editor.outlineEmpty') }}</p>
|
|
442
|
+
<button v-for="heading in sysPreviewHeadings" :key="heading.index" type="button" class="prompts-outline-item" :style="{ '--outline-depth': heading.depth }" @click="jumpToPromptsHeading('sys', heading.index)">{{ heading.text }}</button>
|
|
443
|
+
</nav>
|
|
424
444
|
<div v-if="sysPromptLoading" class="editor-skeleton">
|
|
425
445
|
<div class="skeleton-line" v-for="i in 6" :key="i"></div>
|
|
426
446
|
</div>
|
|
@@ -434,7 +454,7 @@
|
|
|
434
454
|
:readonly="sysPromptLoading || sysPromptSaving || sysPromptDiffVisible"
|
|
435
455
|
:placeholder="t('sysPrompt.placeholder')"></textarea>
|
|
436
456
|
</div>
|
|
437
|
-
<div v-if="promptsPreviewEnabled" class="prompts-preview-pane">
|
|
457
|
+
<div v-if="promptsPreviewEnabled" ref="promptsSysPreviewPane" class="prompts-preview-pane">
|
|
438
458
|
<div v-if="promptsPreviewLibsMissing" class="state-message error">{{ t('prompts.editor.previewUnavailable') }}</div>
|
|
439
459
|
<div v-else-if="!sysPromptPreviewHtml" class="state-message">{{ t('prompts.editor.previewEmpty') }}</div>
|
|
440
460
|
<div v-else class="prompts-preview-body" v-html="sysPromptPreviewHtml"></div>
|
|
@@ -32,6 +32,16 @@
|
|
|
32
32
|
:class="['segmented-option', { active: settingsTab === 'data' }]"
|
|
33
33
|
@click="onSettingsTabClick('data')"
|
|
34
34
|
@keydown="onSettingsTabKeydown($event, 'data')">{{ t('settings.tab.data') }}</button>
|
|
35
|
+
<button
|
|
36
|
+
id="settings-tab-about"
|
|
37
|
+
type="button"
|
|
38
|
+
role="tab"
|
|
39
|
+
aria-controls="settings-panel-about"
|
|
40
|
+
:aria-selected="settingsTab === 'about'"
|
|
41
|
+
:tabindex="settingsTab === 'about' ? 0 : -1"
|
|
42
|
+
:class="['segmented-option', { active: settingsTab === 'about' }]"
|
|
43
|
+
@click="onSettingsTabClick('about')"
|
|
44
|
+
@keydown="onSettingsTabKeydown($event, 'about')">{{ t('settings.tab.about') }}</button>
|
|
35
45
|
</div>
|
|
36
46
|
</div>
|
|
37
47
|
|
|
@@ -270,4 +280,39 @@
|
|
|
270
280
|
</section>
|
|
271
281
|
</div>
|
|
272
282
|
</div>
|
|
283
|
+
|
|
284
|
+
<div
|
|
285
|
+
v-show="settingsTab === 'about'"
|
|
286
|
+
id="settings-panel-about"
|
|
287
|
+
role="tabpanel"
|
|
288
|
+
aria-labelledby="settings-tab-about">
|
|
289
|
+
<div class="settings-grid">
|
|
290
|
+
<section class="settings-card" aria-labelledby="settings-about-update-title">
|
|
291
|
+
<div class="settings-card-main">
|
|
292
|
+
<div class="settings-card-content">
|
|
293
|
+
<h2 id="settings-about-update-title" class="settings-card-title">Codex Mate · {{ t('settings.about.update') }}</h2>
|
|
294
|
+
<p class="settings-card-hint">{{ t('settings.about.currentVersion', { version: appVersion ? 'v' + appVersion : '—' }) }}</p>
|
|
295
|
+
<div role="status">
|
|
296
|
+
<p v-if="appVersionStatusLoading" class="settings-card-hint">{{ t('side.update.checking') }}</p>
|
|
297
|
+
<p v-else-if="appVersionStatusError" class="settings-card-hint form-error">{{ appVersionStatusError }}</p>
|
|
298
|
+
<template v-else-if="appVersionStatusChecked">
|
|
299
|
+
<p class="settings-card-hint">{{ t('settings.about.latestVersion', { version: 'v' + appLatestVersion }) }}</p>
|
|
300
|
+
<p class="settings-card-hint">{{ t(isAppUpdateAvailable() ? 'side.update.available' : 'side.update.upToDate') }}</p>
|
|
301
|
+
</template>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
<div class="settings-card-actions">
|
|
306
|
+
<button id="settings-about-check-update" type="button" class="settings-card-action"
|
|
307
|
+
:disabled="appVersionStatusLoading"
|
|
308
|
+
@click="loadAppVersionStatus({ force: true, silent: true })">
|
|
309
|
+
{{ t(appVersionStatusError ? 'side.update.retry' : 'side.update.check') }}
|
|
310
|
+
</button>
|
|
311
|
+
<button v-if="!appVersionStatusLoading && !appVersionStatusError && isAppUpdateAvailable()"
|
|
312
|
+
id="settings-about-view-update" type="button" class="settings-card-action"
|
|
313
|
+
@click="openAppUpdateModal($event.currentTarget)">{{ t('settings.about.viewUpdate') }}</button>
|
|
314
|
+
</div>
|
|
315
|
+
</section>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
273
318
|
</div>
|
|
@@ -38,13 +38,30 @@
|
|
|
38
38
|
<p class="feature-meta">{{ t('features.coverage', { scanned: indexResults.scanned, total: indexResults.candidates }) }}</p>
|
|
39
39
|
<p v-if="!indexResults.complete" class="feature-hint">{{ t('features.partial') }}</p>
|
|
40
40
|
<p v-if="!indexResults.results.length" class="feature-empty">{{ t('features.empty') }}</p>
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<
|
|
47
|
-
|
|
41
|
+
<template v-else>
|
|
42
|
+
<div class="feature-actions index-result-views" role="group" :aria-label="t('features.resultView')">
|
|
43
|
+
<button type="button" class="btn-mini" :aria-pressed="indexResultView === 'messages'" @click="setIndexResultView('messages')">{{ t('features.byMessage') }}</button>
|
|
44
|
+
<button type="button" class="btn-mini" :aria-pressed="indexResultView === 'sessions'" @click="setIndexResultView('sessions')">{{ t('features.bySession') }}</button>
|
|
45
|
+
</div>
|
|
46
|
+
<p v-if="indexResultView === 'sessions' && indexResults.truncated" class="feature-hint">{{ t('features.groupedTruncated') }}</p>
|
|
47
|
+
<component v-for="row in indexResultRows" :key="row.key" :is="indexResultView === 'sessions' ? 'details' : 'div'" :class="indexResultView === 'sessions' ? 'feature-disclosure index-result-group' : 'index-message-row'">
|
|
48
|
+
<summary v-if="indexResultView === 'sessions'">
|
|
49
|
+
<strong>{{ row.session.title || row.session.sessionId }}</strong>
|
|
50
|
+
<span class="feature-source">{{ row.session.source }}</span>
|
|
51
|
+
<span class="feature-meta">{{ t('features.returnedMatches', { count: row.hits.length }) }}</span>
|
|
52
|
+
<span v-if="row.session.cwd" class="index-group-path" :title="row.session.cwd">{{ row.session.cwd }}</span>
|
|
53
|
+
</summary>
|
|
54
|
+
<article v-for="result in row.hits" :key="result.nodeId" class="feature-record">
|
|
55
|
+
<template v-if="indexResultView === 'messages'">
|
|
56
|
+
<header class="feature-record-heading"><h4>{{ result.session.title || result.session.sessionId }}</h4><span class="feature-source">{{ result.session.source }}</span></header>
|
|
57
|
+
<small class="feature-path" :title="result.session.cwd">{{ result.session.cwd }}</small>
|
|
58
|
+
</template>
|
|
59
|
+
<pre class="feature-excerpt">{{ result.snippet }}</pre>
|
|
60
|
+
<div class="feature-record-actions"><button type="button" class="btn-mini" @click="openIndexedMessage(result)">{{ t('features.source') }}</button><label class="evidence-select"><input type="checkbox" :checked="isEvidenceSelected(result)" @change="toggleEvidence(result)">{{ t('evidence.select') }}</label></div>
|
|
61
|
+
<details class="feature-disclosure"><summary>{{ t('features.context') }}</summary><pre>{{ result.before }}</pre><pre>{{ result.after }}</pre></details>
|
|
62
|
+
</article>
|
|
63
|
+
</component>
|
|
64
|
+
</template>
|
|
48
65
|
</template>
|
|
49
66
|
</div>
|
|
50
67
|
<details class="feature-disclosure evidence-collections" :open="collectionsOpen" @toggle="toggleCollections($event)">
|