codexmate 0.1.36 → 0.1.38
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 +1 -1
- package/README.vi.md +1 -1
- package/README.zh.md +1 -1
- package/cli/desktop-release.js +73 -0
- package/cli/skills.js +103 -4
- package/cli/update.js +27 -15
- package/cli.js +9 -3
- package/package.json +2 -1
- package/web-ui/app.js +17 -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.install.mjs +38 -2
- package/web-ui/modules/app.methods.prompts-editor.mjs +30 -6
- package/web-ui/modules/app.methods.provider-cache.mjs +3 -0
- package/web-ui/modules/app.methods.startup-claude.mjs +10 -5
- package/web-ui/modules/i18n/locales/en.mjs +25 -0
- package/web-ui/modules/i18n/locales/ja.mjs +26 -1
- package/web-ui/modules/i18n/locales/vi.mjs +25 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +25 -0
- package/web-ui/modules/i18n/locales/zh.mjs +25 -0
- package/web-ui/modules/i18n.mjs +3 -2
- 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 +91 -90
- package/web-ui/partials/index/modals-basic.html +22 -9
- package/web-ui/partials/index/panel-market.html +10 -3
- package/web-ui/partials/index/panel-plugins.html +13 -10
- package/web-ui/partials/index/panel-prompts.html +40 -20
- package/web-ui/partials/index/plugin-file-sharing.html +4 -4
- package/web-ui/partials/index/session-features.html +24 -7
- package/web-ui/res/web-ui-render.precompiled.js +831 -268
- package/web-ui/styles/layout-shell.css +176 -259
- package/web-ui/styles/plugins-panel.css +67 -46
- 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 +16 -14
- package/web-ui/styles/system-prompt.css +9 -4
- package/web-ui/styles/theme-dark-tokens.css +4 -0
- package/web-ui/styles/theme-dark.css +5 -31
- package/web-ui/styles/theme-ocean-tokens.css +3 -0
- package/web-ui/styles/theme-ocean.css +3 -26
- package/web-ui/styles/theme-violet-tokens.css +3 -0
- package/web-ui/styles/theme-violet.css +12 -59
|
@@ -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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div v-else-if="pluginsActiveId === 'file-sharing'" class="plugins-panel" id="plugin-file-sharing">
|
|
2
2
|
<div class="plugins-panel-head">
|
|
3
|
-
<
|
|
3
|
+
<h2 class="plugins-panel-title">{{ t('plugins.fileSharing.title') }}</h2>
|
|
4
4
|
<div class="file-sharing-actions">
|
|
5
5
|
<button type="button" class="btn-mini" :disabled="fileSharingBusy" @click="$refs.fileSharingFiles.click()">{{ t('plugins.fileSharing.chooseFiles') }}</button>
|
|
6
6
|
<button type="button" class="btn-mini" :disabled="fileSharingBusy" @click="$refs.fileSharingFolder.click()">{{ t('plugins.fileSharing.chooseFolder') }}</button>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<li v-for="(file, index) in fileSharingPending.entries" :key="index" dir="auto">{{ file.name }}</li>
|
|
17
17
|
</ul>
|
|
18
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>
|
|
19
|
+
<button type="button" class="btn-mini btn-confirm-mini" id="upload-file-sharing" :disabled="fileSharingBusy" @click="uploadFileSharingItems">{{ t('plugins.fileSharing.upload') }}</button>
|
|
20
20
|
<button type="button" class="btn-mini" id="cancel-file-sharing" :disabled="fileSharingBusy" @click="fileSharingPending = null">{{ t('common.cancel') }}</button>
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
<p v-else-if="!fileSharingBatches.length" class="skills-empty-state">{{ t('plugins.fileSharing.empty') }}</p>
|
|
25
25
|
<ul v-if="fileSharingBatches.length" class="file-sharing-items file-sharing-batches">
|
|
26
26
|
<li v-for="batch in fileSharingBatches" :key="batch.id">
|
|
27
|
-
<div class="file-sharing-row">
|
|
27
|
+
<div class="file-sharing-row file-sharing-batch-head">
|
|
28
28
|
<strong dir="auto">{{ batch.folder || t('plugins.fileSharing.files', { count: batch.files.length }) }}</strong>
|
|
29
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
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
31
|
</button>
|
|
32
32
|
</div>
|
|
33
33
|
<ul class="file-sharing-items">
|
|
34
|
-
<li v-for="(file, index) in batch.files" :key="index" class="file-sharing-row">
|
|
34
|
+
<li v-for="(file, index) in batch.files" :key="index" class="file-sharing-row file-sharing-file">
|
|
35
35
|
<span dir="auto">{{ file.name }}</span>
|
|
36
36
|
<span class="file-sharing-size">{{ t('plugins.fileSharing.bytes', { size: file.size }) }}</span>
|
|
37
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,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)">
|