codexmate 0.1.32 → 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.
- package/README.md +5 -0
- package/README.vi.md +5 -0
- package/README.zh.md +5 -0
- package/cli/claude-proxy.js +2 -2
- package/cli/prompt-history.js +2 -0
- package/cli.js +165 -213
- package/lib/cli-config-engine.js +6 -1
- package/lib/cli-file-utils.js +6 -1
- package/lib/config-change-fs.js +132 -0
- package/lib/config-changes.js +293 -0
- package/lib/handoff-mcp.js +18 -2
- package/lib/local-feature-store.js +39 -0
- package/lib/session-bookmarks.js +72 -0
- package/lib/session-context-health.js +23 -3
- package/lib/session-diagnostics.js +75 -0
- package/lib/session-feature-settings.js +21 -0
- package/lib/session-features.js +63 -0
- package/lib/session-handoff-draft.js +43 -0
- package/lib/session-projects.js +76 -0
- package/lib/session-search-index.js +188 -0
- package/lib/thread-handoff.js +8 -0
- package/lib/web-server.js +216 -0
- package/package.json +1 -1
- package/web-ui/app.js +7 -1
- package/web-ui/index.html +1 -0
- package/web-ui/logic.context-window.mjs +15 -0
- package/web-ui/modules/api.mjs +72 -39
- package/web-ui/modules/app.methods.agents.mjs +5 -0
- package/web-ui/modules/app.methods.claude-config.mjs +2 -0
- package/web-ui/modules/app.methods.codex-config.mjs +9 -0
- package/web-ui/modules/app.methods.config-changes.mjs +124 -0
- package/web-ui/modules/app.methods.kilocode-config.mjs +2 -0
- package/web-ui/modules/app.methods.openclaw-persist.mjs +2 -0
- package/web-ui/modules/app.methods.opencode-config.mjs +2 -0
- package/web-ui/modules/app.methods.pi-config.mjs +12 -3
- package/web-ui/modules/app.methods.provider-cache.mjs +9 -3
- package/web-ui/modules/app.methods.providers.mjs +6 -0
- package/web-ui/modules/app.methods.startup-claude.mjs +8 -47
- package/web-ui/modules/config-change-actions.mjs +9 -0
- package/web-ui/modules/i18n/locales/en.mjs +131 -4
- package/web-ui/modules/i18n/locales/ja.mjs +131 -4
- package/web-ui/modules/i18n/locales/vi.mjs +131 -4
- package/web-ui/modules/i18n/locales/zh-tw.mjs +131 -4
- package/web-ui/modules/i18n/locales/zh.mjs +131 -4
- package/web-ui/modules/request-deadline.mjs +33 -0
- package/web-ui/modules/session-features.mjs +279 -0
- package/web-ui/modules/thread-handoff.mjs +1 -1
- package/web-ui/partials/index/config-changes.html +25 -0
- package/web-ui/partials/index/context-window-reference.html +17 -0
- package/web-ui/partials/index/layout-header.html +7 -30
- package/web-ui/partials/index/modal-openclaw-config.html +0 -2
- package/web-ui/partials/index/modal-skills.html +0 -1
- package/web-ui/partials/index/modals-basic.html +0 -8
- package/web-ui/partials/index/modals-pi-provider.html +0 -1
- package/web-ui/partials/index/panel-config-codex.html +0 -3
- package/web-ui/partials/index/panel-config-openclaw.html +16 -13
- package/web-ui/partials/index/panel-dashboard.html +0 -2
- package/web-ui/partials/index/panel-plugins.html +0 -1
- package/web-ui/partials/index/panel-prompts.html +0 -1
- package/web-ui/partials/index/panel-sessions.html +9 -0
- package/web-ui/partials/index/panel-settings.html +1 -12
- package/web-ui/partials/index/panel-trash.html +0 -1
- package/web-ui/partials/index/session-diagnostics.html +29 -0
- package/web-ui/partials/index/session-features.html +107 -0
- package/web-ui/partials/index/thread-handoff.html +6 -3
- package/web-ui/res/web-ui-render.precompiled.js +1077 -135
- package/web-ui/styles/config-changes.css +30 -0
- package/web-ui/styles/openclaw-structured.css +205 -189
- package/web-ui/styles/session-features.css +148 -0
- package/web-ui/styles.css +3 -1
|
@@ -28,14 +28,10 @@
|
|
|
28
28
|
</label>
|
|
29
29
|
</section>
|
|
30
30
|
|
|
31
|
-
<section class="settings-card settings-card--wide openclaw-summary-card" aria-
|
|
31
|
+
<section class="settings-card settings-card--wide openclaw-summary-card" aria-labelledby="openclaw-summary-title">
|
|
32
32
|
<div class="settings-card-body">
|
|
33
33
|
<div class="openclaw-summary-header">
|
|
34
|
-
<
|
|
35
|
-
<div class="summary-eyebrow">OPENCLAW</div>
|
|
36
|
-
<div class="summary-title">配置与本地诊断</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="summary-note">配置摘要</div>
|
|
34
|
+
<h2 class="summary-title" id="openclaw-summary-title">{{ t('tab.config.openclaw') }}</h2>
|
|
39
35
|
</div>
|
|
40
36
|
<div class="openclaw-summary-grid">
|
|
41
37
|
<div v-for="item in getOpenclawStatusSummaryItems()" :key="item.key" :class="['openclaw-summary-item', item.tone || '']">
|
|
@@ -51,16 +47,20 @@
|
|
|
51
47
|
|
|
52
48
|
<div class="tool-config-write-scope" :class="{ locked: !isToolConfigWriteAllowed('openclaw') }">
|
|
53
49
|
<div class="tool-config-write-body">
|
|
54
|
-
<section class="settings-card settings-card--wide openclaw-workspace-card">
|
|
50
|
+
<section class="settings-card settings-card--wide openclaw-workspace-card" aria-labelledby="openclaw-workspace-title">
|
|
55
51
|
<div class="settings-card-body">
|
|
52
|
+
<h3 class="openclaw-section-title" id="openclaw-workspace-title">{{ t('openclaw.workspaceFile') }}</h3>
|
|
56
53
|
<div class="openclaw-tools-grid">
|
|
57
54
|
<button class="openclaw-tool-btn" @click="openOpenclawAgentsEditor" :disabled="loading || !!initError || agentsLoading || !isToolConfigWriteAllowed('openclaw')">
|
|
58
|
-
<
|
|
55
|
+
<svg class="tool-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
|
|
56
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
|
57
|
+
<path d="M14 2v6h6M8 13h8M8 17h6"/>
|
|
58
|
+
</svg>
|
|
59
59
|
<div class="tool-content">
|
|
60
60
|
<div class="tool-title">AGENTS.md</div>
|
|
61
|
-
<div class="tool-meta">{{
|
|
61
|
+
<div v-if="agentsLoading" class="tool-meta">{{ t('config.modelLoading') }}</div>
|
|
62
62
|
</div>
|
|
63
|
-
<svg class="tool-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
63
|
+
<svg class="tool-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
64
64
|
<path d="M9 18l6-6-6-6"/>
|
|
65
65
|
</svg>
|
|
66
66
|
</button>
|
|
@@ -72,12 +72,14 @@
|
|
|
72
72
|
class="openclaw-tool-btn"
|
|
73
73
|
@click="openOpenclawQuickWorkspaceFile(fileName)"
|
|
74
74
|
:disabled="loading || !!initError || agentsLoading || !isToolConfigWriteAllowed('openclaw')">
|
|
75
|
-
<
|
|
75
|
+
<svg class="tool-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
|
|
76
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
|
77
|
+
<path d="M14 2v6h6M8 13h8M8 17h6"/>
|
|
78
|
+
</svg>
|
|
76
79
|
<div class="tool-content">
|
|
77
80
|
<div class="tool-title">{{ fileName }}</div>
|
|
78
|
-
<div class="tool-meta">Workspace file</div>
|
|
79
81
|
</div>
|
|
80
|
-
<svg class="tool-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
82
|
+
<svg class="tool-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
81
83
|
<path d="M9 18l6-6-6-6"/>
|
|
82
84
|
</svg>
|
|
83
85
|
</button>
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
|
|
88
90
|
<section class="settings-card settings-card--wide openclaw-configs-card" aria-labelledby="openclaw-configs-title">
|
|
89
91
|
<div class="settings-card-body">
|
|
92
|
+
<h3 class="openclaw-section-title" id="openclaw-configs-title">{{ t('tab.config') }}</h3>
|
|
90
93
|
<div class="card-list openclaw-card-list">
|
|
91
94
|
<div v-for="(config, name) in openclawConfigs" :key="name"
|
|
92
95
|
:class="['card', { active: currentOpenclawConfig === name, disabled: !isToolConfigWriteAllowed('openclaw') }]"
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
<header class="workflow-header">
|
|
9
9
|
<div>
|
|
10
10
|
<h2 class="workflow-title">{{ t('workflow.title') }}</h2>
|
|
11
|
-
<p class="workflow-description">{{ t('workflow.tagline') }}</p>
|
|
12
11
|
</div>
|
|
13
12
|
<button type="button" class="btn-tool btn-tool-compact workflow-refresh" @click="refreshWorkflowRuns" :disabled="workflowBusy">{{ t('workflow.refresh') }}</button>
|
|
14
13
|
</header>
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
<summary class="workflow-history-title">{{ t('workflow.runs') }} <span class="workflow-count">{{ workflowRuns.length }}</span></summary>
|
|
40
39
|
<div v-if="!workflowRuns.length" class="workflow-empty">
|
|
41
40
|
<p>{{ t('workflow.empty') }}</p>
|
|
42
|
-
<p class="form-hint">{{ t('workflow.emptyHint') }}</p>
|
|
43
41
|
</div>
|
|
44
42
|
<article v-for="run in workflowRuns" :key="run.id" class="workflow-run">
|
|
45
43
|
<div class="workflow-run-header">
|
|
@@ -231,7 +231,6 @@
|
|
|
231
231
|
<div class="prompt-vars-head">
|
|
232
232
|
<div>
|
|
233
233
|
<div class="prompt-vars-title">{{ t('plugins.promptTemplates.vars.title') }}</div>
|
|
234
|
-
<div class="plugins-panel-note">{{ t('plugins.promptTemplates.vars.hint') }}</div>
|
|
235
234
|
</div>
|
|
236
235
|
<div v-if="!promptTemplateDraft.isBuiltin" class="prompt-editor-actions">
|
|
237
236
|
<button type="button" class="btn-mini" @click="resetPromptVariableValues" :disabled="pluginsLoading || pluginConfigSaving">{{ t('plugins.promptTemplates.vars.reset') }}</button>
|
|
@@ -165,7 +165,6 @@
|
|
|
165
165
|
<details class="prompt-presets-panel">
|
|
166
166
|
<summary class="prompt-presets-summary">
|
|
167
167
|
<span>{{ t('prompts.presets.title') }}</span>
|
|
168
|
-
<small>{{ t('prompts.presets.hint') }}</small>
|
|
169
168
|
</summary>
|
|
170
169
|
<div class="form-group prompt-presets-body">
|
|
171
170
|
<div class="editor-frame prompt-presets-frame">
|
|
@@ -18,10 +18,12 @@
|
|
|
18
18
|
<span v-if="sessionStandaloneSourceLabel"> · {{ sessionStandaloneSourceLabel }}</span>
|
|
19
19
|
</div>
|
|
20
20
|
<!-- @include ./context-health.html -->
|
|
21
|
+
<!-- @include ./context-window-reference.html -->
|
|
21
22
|
<pre class="session-standalone-text">{{ sessionStandaloneText }}</pre>
|
|
22
23
|
</div>
|
|
23
24
|
</div>
|
|
24
25
|
<div v-else>
|
|
26
|
+
<!-- @include ./session-features.html -->
|
|
25
27
|
<div class="selector-section session-selector-section">
|
|
26
28
|
<div class="selector-header" style="display:none">
|
|
27
29
|
<span class="selector-title">{{ t('sessions.sourceTitle') }}</span>
|
|
@@ -310,6 +312,12 @@
|
|
|
310
312
|
</div>
|
|
311
313
|
</div>
|
|
312
314
|
<!-- @include ./context-health.html -->
|
|
315
|
+
<!-- @include ./context-window-reference.html -->
|
|
316
|
+
<article v-if="featureFocus" ref="featureFocus" class="feature-focus" tabindex="-1">
|
|
317
|
+
<div class="feature-actions"><strong>{{ t('features.source') }} · {{ featureFocus.id }}</strong><button type="button" class="btn-mini" @click="featureFocus = null">{{ t('features.close') }}</button></div>
|
|
318
|
+
<pre>{{ featureFocus.text }}</pre>
|
|
319
|
+
<div class="feature-actions"><button type="button" class="btn-mini" @click="bookmarkMessage(featureFocus)" :disabled="featureBusy">{{ t('features.bookmark') }}</button><button type="button" class="btn-mini" @click="toggleHandoffMessage(featureFocus)">{{ t('features.selectMessage') }}</button></div>
|
|
320
|
+
</article>
|
|
313
321
|
<div class="session-export-feedback">
|
|
314
322
|
<p v-if="sessionExportNotice && sessionExportNotice.key === getSessionExportKey(activeSession)" class="session-export-notice" role="status">{{ t('sessions.export.truncated') }}</p>
|
|
315
323
|
</div>
|
|
@@ -415,6 +423,7 @@
|
|
|
415
423
|
:ref="getSessionMessageRefBinder(getRecordRenderKey(msg, idx))"
|
|
416
424
|
:class="['session-msg', msg.normalizedRole === 'user' ? 'user' : (msg.normalizedRole === 'system' ? 'system' : 'assistant')]">
|
|
417
425
|
<div class="session-msg-header">
|
|
426
|
+
<session-message-actions :message="msg"></session-message-actions>
|
|
418
427
|
<div class="session-msg-meta">
|
|
419
428
|
<span class="session-msg-role">{{ msg.roleLabel || (msg.normalizedRole === 'user' ? t('sessions.roleLabel.user') : (msg.normalizedRole === 'system' ? t('sessions.roleLabel.system') : t('sessions.roleLabel.assistant'))) }}</span>
|
|
420
429
|
<span class="session-msg-time">{{ msg.timestamp || '' }}</span>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
role="tabpanel"
|
|
7
7
|
:aria-labelledby="'tab-settings'">
|
|
8
8
|
|
|
9
|
+
<!-- @include ./session-diagnostics.html -->
|
|
9
10
|
<div class="settings-tab-header">
|
|
10
11
|
<div
|
|
11
12
|
class="segmented-control"
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
<div class="settings-card-main">
|
|
45
46
|
<div class="settings-card-content">
|
|
46
47
|
<div class="settings-card-title">{{ t('settings.language.title') }}</div>
|
|
47
|
-
<p class="settings-card-desc">{{ t('settings.language.meta') }}</p>
|
|
48
48
|
<label class="selector-label" for="settings-language-select">{{ t('settings.language.label') }}</label>
|
|
49
49
|
<select
|
|
50
50
|
id="settings-language-select"
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
:key="option.code"
|
|
57
57
|
:value="option.code">{{ option.nativeName }} · {{ option.englishName }}</option>
|
|
58
58
|
</select>
|
|
59
|
-
<p class="settings-card-hint">{{ t('settings.language.hint') }}</p>
|
|
60
59
|
</div>
|
|
61
60
|
</div>
|
|
62
61
|
</section>
|
|
@@ -65,7 +64,6 @@
|
|
|
65
64
|
<div class="settings-card-main">
|
|
66
65
|
<div class="settings-card-content">
|
|
67
66
|
<div class="settings-card-title">{{ t('settings.theme.title') }}</div>
|
|
68
|
-
<p class="settings-card-desc">{{ t('settings.theme.meta') }}</p>
|
|
69
67
|
<div class="settings-toggle-group">
|
|
70
68
|
<button
|
|
71
69
|
type="button"
|
|
@@ -86,7 +84,6 @@
|
|
|
86
84
|
{{ t('settings.theme.ocean') }}
|
|
87
85
|
</button>
|
|
88
86
|
</div>
|
|
89
|
-
<p class="settings-card-hint">{{ t('settings.theme.hint') }}</p>
|
|
90
87
|
</div>
|
|
91
88
|
</div>
|
|
92
89
|
</section>
|
|
@@ -95,7 +92,6 @@
|
|
|
95
92
|
<div class="settings-card-main">
|
|
96
93
|
<div class="settings-card-content">
|
|
97
94
|
<div class="settings-card-title">{{ t('settings.sharePrefix.title') }}</div>
|
|
98
|
-
<p class="settings-card-desc">{{ t('settings.sharePrefix.meta') }}</p>
|
|
99
95
|
<label class="selector-label" for="settings-share-prefix">{{ t('settings.sharePrefix.label') }}</label>
|
|
100
96
|
<select
|
|
101
97
|
id="settings-share-prefix"
|
|
@@ -114,7 +110,6 @@
|
|
|
114
110
|
<div class="settings-card-main">
|
|
115
111
|
<div class="settings-card-content">
|
|
116
112
|
<div class="settings-card-title">{{ t('settings.templateConfirm.title') }}</div>
|
|
117
|
-
<p class="settings-card-desc">{{ t('settings.templateConfirm.meta') }}</p>
|
|
118
113
|
<label class="settings-toggle-row">
|
|
119
114
|
<input type="checkbox" :checked="configTemplateDiffConfirmEnabled" @change="setConfigTemplateDiffConfirmEnabled($event.target.checked)">
|
|
120
115
|
<span class="toggle-track">
|
|
@@ -149,7 +144,6 @@
|
|
|
149
144
|
<div class="settings-card-main">
|
|
150
145
|
<div class="settings-card-content">
|
|
151
146
|
<div class="settings-card-title">{{ t('settings.timeline.style.title') }}</div>
|
|
152
|
-
<p class="settings-card-desc">{{ t('settings.timeline.style.meta') }}</p>
|
|
153
147
|
<div class="settings-toggle-group">
|
|
154
148
|
<button
|
|
155
149
|
type="button"
|
|
@@ -164,7 +158,6 @@
|
|
|
164
158
|
{{ t('settings.timeline.style.bar') }}
|
|
165
159
|
</button>
|
|
166
160
|
</div>
|
|
167
|
-
<p class="settings-card-hint">{{ t('settings.timeline.style.hint') }}</p>
|
|
168
161
|
</div>
|
|
169
162
|
</div>
|
|
170
163
|
</section>
|
|
@@ -173,7 +166,6 @@
|
|
|
173
166
|
<div class="settings-card-main">
|
|
174
167
|
<div class="settings-card-content">
|
|
175
168
|
<div class="settings-card-title">{{ t('settings.configTabs.title') }}</div>
|
|
176
|
-
<p class="settings-card-desc">{{ t('settings.configTabs.meta') }}</p>
|
|
177
169
|
<div class="settings-toggle-grid">
|
|
178
170
|
<label class="settings-toggle-row">
|
|
179
171
|
<input type="checkbox" :checked="configModeVisibility.codex" @change="setConfigModeVisibility('codex', $event.target.checked)">
|
|
@@ -223,7 +215,6 @@
|
|
|
223
215
|
<div class="settings-card-main">
|
|
224
216
|
<div class="settings-card-content">
|
|
225
217
|
<div class="settings-card-title">{{ t('settings.backup.title') }}</div>
|
|
226
|
-
<p class="settings-card-desc">{{ t('settings.backup.meta') }}</p>
|
|
227
218
|
</div>
|
|
228
219
|
</div>
|
|
229
220
|
<div class="settings-card-actions">
|
|
@@ -242,7 +233,6 @@
|
|
|
242
233
|
<div class="settings-card-main">
|
|
243
234
|
<div class="settings-card-content">
|
|
244
235
|
<div class="settings-card-title">{{ t('settings.providerCache.title') }}</div>
|
|
245
|
-
<p class="settings-card-desc">{{ t('settings.providerCache.meta') }}</p>
|
|
246
236
|
<p class="settings-card-hint">{{ t('settings.providerCache.hint') }}</p>
|
|
247
237
|
<p v-if="providerCacheSyncMessage" class="settings-card-hint provider-cache-sync-message">{{ providerCacheSyncMessage }}</p>
|
|
248
238
|
<p v-if="providerCacheError" class="settings-card-hint form-error">{{ providerCacheError }}</p>
|
|
@@ -261,7 +251,6 @@
|
|
|
261
251
|
<div class="settings-card-main">
|
|
262
252
|
<div class="settings-card-content">
|
|
263
253
|
<div class="settings-card-title">{{ t('settings.reset.title') }}</div>
|
|
264
|
-
<p class="settings-card-desc">{{ t('settings.reset.meta') }}</p>
|
|
265
254
|
<p class="settings-card-hint">{{ t('settings.reset.hint') }}</p>
|
|
266
255
|
</div>
|
|
267
256
|
</div>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
<div class="settings-card-main">
|
|
12
12
|
<div class="settings-card-content">
|
|
13
13
|
<div class="settings-card-title">{{ t('settings.trashConfig.title') }}</div>
|
|
14
|
-
<p class="settings-card-desc">{{ t('settings.trashConfig.meta') }}</p>
|
|
15
14
|
<label class="settings-toggle-row">
|
|
16
15
|
<input type="checkbox" :checked="sessionTrashEnabled" @change="setSessionTrashEnabled($event.target.checked)">
|
|
17
16
|
<span class="toggle-track">
|
|
@@ -0,0 +1,29 @@
|
|
|
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>
|
|
3
|
+
<div class="feature-content">
|
|
4
|
+
<p class="feature-hint">{{ t('features.diagnosticScope') }}</p>
|
|
5
|
+
<p v-if="featureError" class="form-error feature-feedback" role="alert">{{ featureError }}</p>
|
|
6
|
+
<div class="feature-diagnostic-options">
|
|
7
|
+
<label><input type="checkbox" v-model="diagnosticsRemote" :disabled="diagnosticsReport?.status === 'running'"><span>{{ t('features.remoteProbe') }}</span></label>
|
|
8
|
+
<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
|
+
</div>
|
|
10
|
+
<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>
|
|
13
|
+
<span v-if="diagnosticsReport" class="feature-status" :data-status="diagnosticsReport.status" role="status">{{ t('features.status.' + diagnosticsReport.status) }}</span>
|
|
14
|
+
</div>
|
|
15
|
+
<template v-if="diagnosticsReport">
|
|
16
|
+
<article v-for="item in diagnosticsReport.items" :key="item.id" class="feature-record feature-diagnostic-row">
|
|
17
|
+
<header class="feature-record-heading">
|
|
18
|
+
<strong>{{ item.id === 'local' ? t('features.localCheck') : item.id === 'provider' ? t('features.providerCheck') : item.id }}</strong>
|
|
19
|
+
<span class="feature-status" :data-status="item.status">{{ t('features.status.' + item.status) }}</span>
|
|
20
|
+
</header>
|
|
21
|
+
<small class="feature-meta">{{ item.checkedAt }}<template v-if="item.durationMs !== undefined"> · {{ item.durationMs }} ms</template></small>
|
|
22
|
+
<p v-for="issue in item.evidence?.issues || []" :key="issue.id || issue.code" class="feature-issue">{{ issue.problem || issue.code }}</p>
|
|
23
|
+
<p v-if="item.errorCode" class="form-error">{{ t('features.error.' + item.errorCode) }}</p>
|
|
24
|
+
<details class="feature-disclosure"><summary>{{ t('features.technicalDetails') }}</summary><pre class="feature-code">{{ JSON.stringify(item.evidence || {}, null, 2) }}</pre></details>
|
|
25
|
+
</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>
|
|
27
|
+
</template>
|
|
28
|
+
</div>
|
|
29
|
+
</details>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<section class="session-features" :aria-label="t('features.title')">
|
|
2
|
+
<header class="feature-toolbar">
|
|
3
|
+
<div class="feature-tabs" role="group" :aria-label="t('features.title')">
|
|
4
|
+
<button type="button" :aria-expanded="featureView === 'bookmarks'" @click="openFeatureView('bookmarks')">{{ t('features.bookmarks') }}</button>
|
|
5
|
+
<button type="button" :aria-expanded="featureView === 'search'" @click="openFeatureView('search')">{{ t('features.index') }}</button>
|
|
6
|
+
<button type="button" :aria-expanded="featureView === 'projects'" @click="openFeatureView('projects')">{{ t('features.projects') }}</button>
|
|
7
|
+
</div>
|
|
8
|
+
<button v-if="selectedContextIds.length" type="button" class="btn-mini" @click="generateSelectedHandoff" :disabled="featureBusy">{{ t('features.generateDraft', { count: selectedContextIds.length }) }}</button>
|
|
9
|
+
</header>
|
|
10
|
+
<p v-if="featureError" class="form-error feature-feedback" role="alert">{{ featureError }}</p>
|
|
11
|
+
<div v-if="featureView === 'search'" class="feature-content">
|
|
12
|
+
<div class="feature-section-heading">
|
|
13
|
+
<h3>{{ t('features.index') }}</h3>
|
|
14
|
+
<div class="feature-actions">
|
|
15
|
+
<button type="button" class="btn-mini" @click="refreshSessionIndex(false)" :disabled="indexReport?.job.status === 'running'">{{ t('features.refreshIndex') }}</button>
|
|
16
|
+
<button type="button" class="btn-mini feature-quiet" @click="refreshSessionIndex(true)" :disabled="indexReport?.job.status === 'running'">{{ t('features.rebuildIndex') }}</button>
|
|
17
|
+
<button v-if="indexReport?.job.status === 'running'" type="button" class="btn-mini" @click="cancelSessionIndex">{{ t('features.cancel') }}</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-if="indexReport" class="feature-meta" role="status">
|
|
21
|
+
<span class="feature-status" :data-status="indexReport.job.status">{{ t('features.status.' + indexReport.job.status) }}</span>
|
|
22
|
+
<span>{{ t('features.indexStatus', { count: indexReport.indexed, processed: indexReport.job.processed, total: indexReport.job.candidates }) }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<form class="feature-actions feature-search-form" @submit.prevent="searchSessionIndex">
|
|
25
|
+
<input v-model="indexQuery" :aria-label="t('features.search')" :placeholder="t('features.search')">
|
|
26
|
+
<button class="btn-mini feature-primary" :disabled="featureBusy || !indexQuery.trim() || !indexReport?.updatedAt">{{ t('features.search') }}</button>
|
|
27
|
+
</form>
|
|
28
|
+
<details class="feature-disclosure"><summary>{{ t('features.searchScope') }}</summary><p class="feature-hint">{{ t('features.indexScope') }}</p></details>
|
|
29
|
+
<p v-if="indexReport?.failures.length" class="form-error" role="alert">{{ t('features.indexFailures', { count: indexReport.failures.length }) }}</p>
|
|
30
|
+
<p v-if="featureBusy" class="feature-loading" role="status">{{ t('features.loading') }}</p>
|
|
31
|
+
<template v-if="indexResults">
|
|
32
|
+
<p class="feature-meta">{{ t('features.coverage', { scanned: indexResults.scanned, total: indexResults.candidates }) }}</p>
|
|
33
|
+
<p v-if="!indexResults.complete" class="feature-hint">{{ t('features.partial') }}</p>
|
|
34
|
+
<p v-if="!indexResults.results.length" class="feature-empty">{{ t('features.empty') }}</p>
|
|
35
|
+
<article v-for="result in indexResults.results" :key="result.session.key + result.nodeId" class="feature-record">
|
|
36
|
+
<header class="feature-record-heading"><h4>{{ result.session.title || result.session.sessionId }}</h4><span class="feature-source">{{ result.session.source }}</span></header>
|
|
37
|
+
<small class="feature-path" :title="result.session.cwd">{{ result.session.cwd }}</small>
|
|
38
|
+
<pre class="feature-excerpt">{{ result.snippet }}</pre>
|
|
39
|
+
<div class="feature-record-actions"><button type="button" class="btn-mini" @click="openIndexedMessage(result)">{{ t('features.source') }}</button></div>
|
|
40
|
+
<details class="feature-disclosure"><summary>{{ t('features.context') }}</summary><pre>{{ result.before }}</pre><pre>{{ result.after }}</pre></details>
|
|
41
|
+
</article>
|
|
42
|
+
</template>
|
|
43
|
+
</div>
|
|
44
|
+
<div v-if="featureView === 'projects'" class="feature-content">
|
|
45
|
+
<div class="feature-section-heading"><h3>{{ t('features.projects') }}</h3><small v-if="projectReport" class="feature-meta">{{ t('features.readAt', { time: projectReport.readAt }) }}</small></div>
|
|
46
|
+
<p class="feature-hint">{{ t('features.projectHistory') }}</p>
|
|
47
|
+
<p v-if="featureBusy" class="feature-loading" role="status">{{ t('features.loading') }}</p>
|
|
48
|
+
<template v-if="projectReport">
|
|
49
|
+
<p v-if="projectReport.failures.length" class="form-error">{{ t('features.indexFailures', { count: projectReport.failures.length }) }}</p>
|
|
50
|
+
<div class="feature-project-picker" role="group" :aria-label="t('features.projects')">
|
|
51
|
+
<button v-for="project in projectReport.projects" :key="project.key" type="button" @click="loadProjectWorkspace(project.key)" :disabled="featureBusy" :aria-pressed="projectSelected === project.key && !!projectReport.detail">
|
|
52
|
+
<span class="feature-project-label"><strong>{{ project.cwd.split(/[\\/]/).filter(Boolean).pop() || project.cwd || t('features.unassigned') }}</strong><small class="feature-path" :title="project.cwd">{{ project.cwd || t('features.unassigned') }}</small></span>
|
|
53
|
+
<span class="feature-count">{{ project.sessionCount }}</span>
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
56
|
+
<template v-if="projectReport.detail">
|
|
57
|
+
<div class="feature-section-heading feature-project-heading"><h4 class="feature-path" :title="projectReport.detail.cwd">{{ projectReport.detail.cwd || t('features.unassigned') }}</h4></div>
|
|
58
|
+
<p v-if="projectReport.detail.truncated" class="feature-hint">{{ t('features.partial') }}</p>
|
|
59
|
+
<div class="feature-project-sessions">
|
|
60
|
+
<article v-for="session in projectReport.detail.sessions" :key="session.source + session.sessionId" class="feature-session-row">
|
|
61
|
+
<button type="button" @click="selectSession(session)">{{ session.title || session.sessionId }}</button>
|
|
62
|
+
<small class="feature-meta">{{ session.source }} · {{ session.timestamp }}</small>
|
|
63
|
+
</article>
|
|
64
|
+
</div>
|
|
65
|
+
<details class="feature-disclosure" :open="!!projectReport.detail.bookmarks.length"><summary>{{ t('features.bookmarks') }} <span class="feature-count">{{ projectReport.detail.bookmarks.length }}</span></summary>
|
|
66
|
+
<div class="feature-link-list"><button v-for="item in projectReport.detail.bookmarks" :key="item.id" type="button" @click="locateBookmark(item)">{{ item.note || item.excerpt.slice(0, 80) }}</button></div>
|
|
67
|
+
</details>
|
|
68
|
+
<details class="feature-disclosure"><summary>{{ t('features.prompts') }} <span class="feature-count">{{ projectReport.detail.prompts.length }}</span></summary>
|
|
69
|
+
<div class="feature-link-list"><button v-for="file in projectReport.detail.prompts" :key="file" type="button" @click="openProjectPrompt(file)">{{ file }}</button></div>
|
|
70
|
+
<pre v-if="projectPrompt" class="feature-code">{{ projectPrompt.content }}</pre>
|
|
71
|
+
</details>
|
|
72
|
+
<details class="feature-disclosure"><summary>{{ t('features.handoffs') }} <span class="feature-count">{{ projectReport.detail.handoffs.length }}</span></summary>
|
|
73
|
+
<p v-for="record in projectReport.detail.handoffs" :key="record.source + record.id" class="feature-meta">{{ record.source }} · {{ record.target }} · {{ record.createdAt }} · {{ handoffStatusLabel(record.status) }}</p>
|
|
74
|
+
</details>
|
|
75
|
+
<details v-if="projectSelected" class="feature-disclosure"><summary>{{ t('features.projectMapping') }}</summary><form class="feature-actions feature-search-form" @submit.prevent="mapProjectWorkspace"><input v-model="projectAlias" :aria-label="t('features.projectPath')" :placeholder="t('features.projectPath')"><button class="btn-mini" :disabled="featureBusy">{{ t('features.saveMapping') }}</button></form></details>
|
|
76
|
+
</template>
|
|
77
|
+
</template>
|
|
78
|
+
</div>
|
|
79
|
+
<div v-if="featureView === 'bookmarks'" class="feature-content">
|
|
80
|
+
<div class="feature-section-heading"><h3>{{ t('features.bookmarks') }}</h3><span class="feature-count">{{ bookmarks.length }}</span></div>
|
|
81
|
+
<form @submit.prevent="loadBookmarks">
|
|
82
|
+
<div class="feature-actions feature-search-form"><input v-model="bookmarkQuery" :aria-label="t('features.search')" :placeholder="t('features.search')"><button class="btn-mini feature-primary" :disabled="featureBusy">{{ t('features.search') }}</button></div>
|
|
83
|
+
<details class="feature-disclosure"><summary>{{ t('features.moreFilters') }} <span v-if="bookmarkTag || bookmarkProject" class="feature-count">{{ (bookmarkTag ? 1 : 0) + (bookmarkProject ? 1 : 0) }}</span></summary>
|
|
84
|
+
<div class="feature-filter-fields"><label>{{ t('features.tag') }}<input v-model="bookmarkTag" :aria-label="t('features.tag')"></label><label>{{ t('features.projectPath') }}<input v-model="bookmarkProject" :aria-label="t('features.projectPath')"></label></div>
|
|
85
|
+
</details>
|
|
86
|
+
</form>
|
|
87
|
+
<p v-if="featureBusy" class="feature-loading" role="status">{{ t('features.loading') }}</p>
|
|
88
|
+
<div v-else-if="!bookmarks.length" class="feature-empty"><p>{{ t('features.empty') }}</p></div>
|
|
89
|
+
<article v-for="item in bookmarks" :key="item.id" class="feature-record">
|
|
90
|
+
<header class="feature-record-heading"><span class="feature-source">{{ item.source }}</span><small class="feature-meta">{{ item.updatedAt }}</small></header>
|
|
91
|
+
<small class="feature-path" :title="item.cwd">{{ item.cwd }}</small>
|
|
92
|
+
<pre class="feature-excerpt">{{ item.excerpt }}</pre>
|
|
93
|
+
<p v-if="item.note" class="feature-note">{{ item.note }}</p>
|
|
94
|
+
<div v-if="item.tags.length" class="feature-tags"><span v-for="tag in item.tags" :key="tag" class="feature-tag">{{ tag }}</span></div>
|
|
95
|
+
<div class="feature-record-actions">
|
|
96
|
+
<button type="button" class="btn-mini" @click="locateBookmark(item)" :disabled="featureBusy">{{ t('features.source') }}</button>
|
|
97
|
+
<button type="button" class="btn-mini feature-quiet" @click="bookmarkEditor = { ...item, tagsText: item.tags.join(', ') }" :disabled="featureBusy">{{ t('features.edit') }}</button>
|
|
98
|
+
<button type="button" class="btn-mini feature-quiet" @click="removeBookmark(item)" :disabled="featureBusy">{{ t('features.unbookmark') }}</button>
|
|
99
|
+
</div>
|
|
100
|
+
</article>
|
|
101
|
+
<form v-if="bookmarkEditor" @submit.prevent="saveBookmark" class="feature-editor">
|
|
102
|
+
<label>{{ t('features.note') }}<textarea v-model="bookmarkEditor.note" maxlength="4000"></textarea></label>
|
|
103
|
+
<label>{{ t('features.tags') }}<input v-model="bookmarkEditor.tagsText"></label>
|
|
104
|
+
<div class="feature-actions"><button class="btn-mini feature-primary" :disabled="featureBusy">{{ t('features.save') }}</button><button type="button" class="btn-mini feature-quiet" @click="bookmarkEditor = null" :disabled="featureBusy">{{ t('features.cancel') }}</button></div>
|
|
105
|
+
</form>
|
|
106
|
+
</div>
|
|
107
|
+
</section>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<summary class="thread-handoff-summary"><span>会话交接</span><span class="thread-handoff-summary-hint">{{ handoffExpanded ? '收起' : '填写交接 · 查看历史' }}</span></summary>
|
|
3
3
|
<div v-if="handoffExpanded" class="thread-handoff-body">
|
|
4
4
|
<div class="session-workspace-header session-workspace-card-wide">
|
|
5
|
-
<p class="session-workspace-subtitle"
|
|
5
|
+
<p class="session-workspace-subtitle">草稿在切换会话后保留,刷新后清空。</p>
|
|
6
6
|
<button class="btn-mini" type="button" @click="loadThreadHandoffs" :disabled="handoffLoading || handoffBusy">{{ handoffLoading ? '刷新中…' : '刷新历史' }}</button>
|
|
7
7
|
</div>
|
|
8
8
|
<form @submit.prevent="createThreadHandoff" class="thread-handoff-form">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<textarea v-model="handoffDraft.goal" class="session-query-input" rows="3" required :disabled="handoffBusy" placeholder="描述下一步任务、预期结果或验收标准"></textarea>
|
|
16
16
|
</label>
|
|
17
17
|
<details class="thread-handoff-optional">
|
|
18
|
-
<summary class="thread-handoff-optional-summary"
|
|
18
|
+
<summary class="thread-handoff-optional-summary">补充上下文</summary>
|
|
19
19
|
<div class="session-workspace-grid">
|
|
20
20
|
<label v-for="field in handoffFields" :key="field.key" class="thread-handoff-field">
|
|
21
21
|
<span class="session-workspace-card-title">{{ field.label }}(可选)</span>
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</details>
|
|
26
26
|
<div class="thread-handoff-actions">
|
|
27
|
-
<span class="session-workspace-subtitle">生成后可复制到目标会话</span>
|
|
28
27
|
<button class="btn-mini thread-handoff-submit" type="submit" :disabled="handoffBusy || handoffLoading || !handoffDraft.target.trim() || !handoffDraft.goal.trim()">{{ handoffBusy ? '处理中…' : '生成交接' }}</button>
|
|
29
28
|
</div>
|
|
30
29
|
</form>
|
|
@@ -35,6 +34,10 @@
|
|
|
35
34
|
<textarea class="session-query-input" rows="6" readonly :value="handoffCopyText" @focus="$event.target.select()"></textarea>
|
|
36
35
|
</label>
|
|
37
36
|
<p class="session-workspace-subtitle session-workspace-card-wide">复制不会自动发送。读取确认由目标代理通过 CLI ack 提交。</p>
|
|
37
|
+
<div class="feature-actions"><button type="button" class="btn-mini" @click="generateSelectedHandoff" :disabled="featureBusy || !selectedContextIds.length">{{ t('features.generateDraft', { count: selectedContextIds.length }) }}</button></div>
|
|
38
|
+
<p v-if="handoffDraftEvidence.length">{{ t('features.draftReview') }}</p>
|
|
39
|
+
<details v-if="handoffUnverified.length"><summary>{{ t('features.unverified', { count: handoffUnverified.length }) }}</summary><pre v-for="(text, index) in handoffUnverified" :key="index">{{ text }}</pre></details>
|
|
40
|
+
<ul v-if="handoffDraftEvidence.length"><li v-for="item in handoffDraftEvidence" :key="item.nodeId"><button type="button" class="btn-mini" @click="locateDraftEvidence(item)">{{ item.nodeId }} · {{ t('features.evidence.' + item.status) }}</button></li></ul>
|
|
38
41
|
<p v-if="handoffLoading" class="session-workspace-card-wide" role="status">正在加载交接历史…</p>
|
|
39
42
|
<p v-else-if="!handoffError && !handoffRecords.length" class="session-workspace-empty session-workspace-card-wide">暂无交接记录</p>
|
|
40
43
|
<ol v-if="handoffRecords.length" class="session-workspace-list session-workspace-card-wide">
|