codexmate 0.1.31 → 0.1.32
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 +3 -3
- package/README.vi.md +3 -3
- package/README.zh.md +3 -3
- package/cli/agents-files.js +18 -4
- package/cli/plugin-config.js +64 -0
- package/cli/prompt-history.js +17 -4
- package/cli/system-prompt-files.js +7 -2
- package/cli.js +36 -2
- package/lib/cli-config-engine.js +9 -3
- package/lib/session-context-health.js +82 -0
- package/lib/session-context-records.js +153 -0
- package/lib/web-startup-auth.js +5 -1
- package/package.json +1 -1
- package/plugins/prompt-templates/computed.mjs +3 -3
- package/plugins/prompt-templates/invocation.mjs +73 -0
- package/plugins/prompt-templates/methods.mjs +48 -3
- package/plugins/prompt-templates/overview.mjs +2 -0
- package/web-ui/app.js +25 -0
- package/web-ui/index.html +1 -0
- package/web-ui/logic.context-health.mjs +144 -0
- package/web-ui/modules/app.computed.prompts.mjs +11 -0
- package/web-ui/modules/app.methods.agents.mjs +20 -3
- package/web-ui/modules/app.methods.index.mjs +4 -0
- package/web-ui/modules/app.methods.system-prompt.mjs +17 -2
- package/web-ui/modules/context-health.methods.mjs +70 -0
- package/web-ui/modules/i18n/locales/en.mjs +33 -0
- package/web-ui/modules/i18n/locales/ja.mjs +33 -0
- package/web-ui/modules/i18n/locales/vi.mjs +33 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +33 -0
- package/web-ui/modules/i18n/locales/zh.mjs +33 -0
- package/web-ui/modules/plugins.methods.mjs +2 -0
- package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
- package/web-ui/partials/index/context-health.html +45 -0
- package/web-ui/partials/index/modal-prompt-invocation.html +17 -0
- package/web-ui/partials/index/panel-plugins.html +37 -9
- package/web-ui/partials/index/panel-prompts.html +18 -2
- package/web-ui/partials/index/panel-sessions.html +14 -11
- package/web-ui/res/web-ui-render.precompiled.js +682 -32
- package/web-ui/styles/context-health.css +107 -0
- package/web-ui/styles/prompts-editor.css +23 -0
- package/web-ui/styles/sessions-preview.css +21 -0
- package/web-ui/styles/sub-tabs.css +181 -0
- package/web-ui/styles.css +2 -0
|
@@ -118,8 +118,16 @@
|
|
|
118
118
|
<div v-if="promptHistoryLoading" class="state-message">{{ t('diff.generating') }}</div>
|
|
119
119
|
<div v-else-if="promptHistoryError" class="state-message error">{{ promptHistoryError }}</div>
|
|
120
120
|
<div v-else-if="!promptHistoryItems.length" class="state-message">{{ t('toast.history.empty') }}</div>
|
|
121
|
-
<div v-if="
|
|
121
|
+
<div v-if="promptHistoryPreviewId && !promptHistoryLoading && !promptHistoryError" class="prompt-history-preview-wrap">
|
|
122
122
|
<pre class="prompt-history-preview">{{ promptHistoryPreviewContent }}</pre>
|
|
123
|
+
<div class="form-hint">{{ t('ecosystem.historyCompare') }} · +{{ promptHistoryComparison.stats.added }} / −{{ promptHistoryComparison.stats.removed }}</div>
|
|
124
|
+
<div class="agents-diff-view prompt-history-diff" role="region" :aria-label="t('ecosystem.historyCompare')" tabindex="0">
|
|
125
|
+
<div v-for="(line, index) in promptHistoryComparison.lines" :key="index" :class="['agents-diff-line', line.type]">
|
|
126
|
+
<span class="agents-diff-line-sign">{{ line.type === 'add' ? '+' : (line.type === 'del' ? '−' : ' ') }}</span>
|
|
127
|
+
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<button type="button" class="btn-mini btn-confirm-mini" @click="rollbackPromptHistory('agents')" :disabled="agentsSaving || promptHistoryLoading || agentsDiffVisible">{{ t('ecosystem.rollback') }}</button>
|
|
123
131
|
<button type="button" class="btn-mini btn-confirm-mini" @click="applyPromptHistoryToEditor" :disabled="agentsSaving || agentsDiffVisible">{{ t('common.restoreToEditor') }}</button>
|
|
124
132
|
</div>
|
|
125
133
|
</div>
|
|
@@ -347,8 +355,16 @@
|
|
|
347
355
|
<div v-if="sysHistoryLoading" class="state-message">{{ t('diff.generating') }}</div>
|
|
348
356
|
<div v-else-if="sysHistoryError" class="state-message error">{{ sysHistoryError }}</div>
|
|
349
357
|
<div v-else-if="!sysHistoryItems.length" class="state-message">{{ t('toast.history.empty') }}</div>
|
|
350
|
-
<div v-if="
|
|
358
|
+
<div v-if="sysHistoryPreviewId && !sysHistoryLoading && !sysHistoryError" class="prompt-history-preview-wrap">
|
|
351
359
|
<pre class="prompt-history-preview">{{ sysHistoryPreviewContent }}</pre>
|
|
360
|
+
<div class="form-hint">{{ t('ecosystem.historyCompare') }} · +{{ sysHistoryComparison.stats.added }} / −{{ sysHistoryComparison.stats.removed }}</div>
|
|
361
|
+
<div class="agents-diff-view prompt-history-diff" role="region" :aria-label="t('ecosystem.historyCompare')" tabindex="0">
|
|
362
|
+
<div v-for="(line, index) in sysHistoryComparison.lines" :key="index" :class="['agents-diff-line', line.type]">
|
|
363
|
+
<span class="agents-diff-line-sign">{{ line.type === 'add' ? '+' : (line.type === 'del' ? '−' : ' ') }}</span>
|
|
364
|
+
<span class="agents-diff-line-text">{{ line.value }}</span>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
<button type="button" class="btn-mini btn-confirm-mini" @click="rollbackPromptHistory('sys')" :disabled="sysPromptSaving || sysHistoryLoading || sysPromptDiffVisible">{{ t('ecosystem.rollback') }}</button>
|
|
352
368
|
<button type="button" class="btn-mini btn-confirm-mini" @click="applySysHistoryToEditor" :disabled="sysPromptSaving || sysPromptDiffVisible">{{ t('common.restoreToEditor') }}</button>
|
|
353
369
|
</div>
|
|
354
370
|
</div>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
{{ sessionStandaloneTitle }}
|
|
18
18
|
<span v-if="sessionStandaloneSourceLabel"> · {{ sessionStandaloneSourceLabel }}</span>
|
|
19
19
|
</div>
|
|
20
|
+
<!-- @include ./context-health.html -->
|
|
20
21
|
<pre class="session-standalone-text">{{ sessionStandaloneText }}</pre>
|
|
21
22
|
</div>
|
|
22
23
|
</div>
|
|
@@ -254,11 +255,11 @@
|
|
|
254
255
|
</div>
|
|
255
256
|
<div class="session-actions session-preview-actions">
|
|
256
257
|
<div class="session-secondary-actions">
|
|
257
|
-
<button class="btn-session-refresh has-label session-action-optional-label" @click="loadActiveSessionDetail" :disabled="sessionDetailLoading || !activeSession"
|
|
258
|
+
<button class="btn-session-refresh has-label session-action-optional-label" data-icon-only="true" @click="loadActiveSessionDetail" :disabled="sessionDetailLoading || !activeSession"
|
|
258
259
|
:title="sessionDetailLoading ? t('sessions.preview.loading') : t('sessions.preview.refresh')"
|
|
259
260
|
:aria-label="sessionDetailLoading ? t('sessions.preview.loading') : t('sessions.preview.refresh')">
|
|
260
|
-
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 8a5.5 5.5 0 0 1 9.4-3.8"/><path d="M13.5 8a5.5 5.5 0 0 1-9.4 3.8"/><polyline points="2.5 2 2.5 5 5.5 5"/><polyline points="13.5 14 13.5 11 10.5 11"/></svg>
|
|
261
|
-
<span class="session-action-label session-action-optional-text">{{ t('sessions.preview.refresh') }}</span>
|
|
261
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 8a5.5 5.5 0 0 1 9.4-3.8"/><path d="M13.5 8a5.5 5.5 0 0 1-9.4 3.8"/><polyline points="2.5 2 2.5 5 5.5 5"/><polyline points="13.5 14 13.5 11 10.5 11"/></svg>
|
|
262
|
+
<span class="session-action-label session-action-optional-text" hidden aria-hidden="true">{{ t('sessions.preview.refresh') }}</span>
|
|
262
263
|
</button>
|
|
263
264
|
<div class="session-link-group"><button
|
|
264
265
|
class="btn-session-open"
|
|
@@ -276,37 +277,39 @@
|
|
|
276
277
|
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2h-8.5A1.5 1.5 0 0 0 2 3.5v8A1.5 1.5 0 0 0 3.5 13h8a1.5 1.5 0 0 0 1.5-1.5v-3"/><path d="M13 2v4h-4"/><path d="M13 2L7 8"/></svg>
|
|
277
278
|
</button></div>
|
|
278
279
|
<button
|
|
279
|
-
class="btn-session-open has-label session-action-optional-label"
|
|
280
|
+
class="btn-session-open has-label session-action-optional-label" data-icon-only="true"
|
|
280
281
|
@click="copySessionPath(activeSession)"
|
|
281
282
|
:disabled="!activeSession || !getSessionFilePath(activeSession)"
|
|
282
283
|
:title="t('sessions.preview.copyPath')"
|
|
283
284
|
:aria-label="t('sessions.preview.copyPath')">
|
|
284
|
-
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2 5.5V12.5a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7.5a1 1 0 0 0-1-1H8L6.5 5H3a1 1 0 0 0-1 1z"/></svg>
|
|
285
|
-
<span class="session-action-label session-action-optional-text">{{ t('sessions.preview.copyPath') }}</span>
|
|
285
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2 5.5V12.5a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7.5a1 1 0 0 0-1-1H8L6.5 5H3a1 1 0 0 0-1 1z"/></svg>
|
|
286
|
+
<span class="session-action-label session-action-optional-text" hidden aria-hidden="true">{{ t('sessions.preview.copyPath') }}</span>
|
|
286
287
|
</button>
|
|
287
288
|
</div>
|
|
288
289
|
<div class="session-primary-actions">
|
|
289
290
|
<button
|
|
290
|
-
class="btn-session-export has-label"
|
|
291
|
+
class="btn-session-export has-label" data-icon-only="true"
|
|
291
292
|
@click="exportSession(activeSession)"
|
|
292
293
|
:disabled="!activeSession || sessionExporting[getSessionExportKey(activeSession)]"
|
|
293
294
|
:title="(activeSession && sessionExporting[getSessionExportKey(activeSession)]) ? t('sessions.preview.exporting') : t('sessions.preview.export')"
|
|
294
295
|
:aria-label="(activeSession && sessionExporting[getSessionExportKey(activeSession)]) ? t('sessions.preview.exporting') : t('sessions.preview.export')">
|
|
295
|
-
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v8"/><polyline points="4 7 8 10.5 12 7"/><path d="M2.5 12v1.5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V12"/></svg>
|
|
296
|
-
<span class="session-action-label">{{ (activeSession && sessionExporting[getSessionExportKey(activeSession)]) ? t('sessions.preview.exporting') : t('sessions.preview.export') }}</span>
|
|
296
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v8"/><polyline points="4 7 8 10.5 12 7"/><path d="M2.5 12v1.5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V12"/></svg>
|
|
297
|
+
<span class="session-action-label" hidden aria-hidden="true">{{ (activeSession && sessionExporting[getSessionExportKey(activeSession)]) ? t('sessions.preview.exporting') : t('sessions.preview.export') }}</span>
|
|
297
298
|
</button>
|
|
298
299
|
<button
|
|
299
300
|
v-if="isDeleteAvailable(activeSession)"
|
|
300
|
-
class="btn-session-delete has-label session-delete-text-button"
|
|
301
|
+
class="btn-session-delete has-label session-delete-text-button" data-icon-only="true"
|
|
301
302
|
@click="deleteSession(activeSession)"
|
|
302
303
|
:disabled="!activeSession || sessionsLoading || sessionDeleting[getSessionExportKey(activeSession)]"
|
|
303
304
|
:title="(activeSession && sessionDeleting[getSessionExportKey(activeSession)]) ? (sessionTrashEnabled === false ? t('sessions.preview.deleting') : t('sessions.preview.moving')) : (sessionTrashEnabled === false ? t('sessions.preview.deleteHard') : t('sessions.preview.moveToTrash'))"
|
|
304
305
|
:aria-label="(activeSession && sessionDeleting[getSessionExportKey(activeSession)]) ? (sessionTrashEnabled === false ? t('sessions.preview.deleting') : t('sessions.preview.moving')) : (sessionTrashEnabled === false ? t('sessions.preview.deleteHard') : t('sessions.preview.moveToTrash'))">
|
|
305
|
-
<
|
|
306
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M2.5 4.5h11M6 4.5V2.5h4v2"/><path d="m4 4.5 .5 9h7l.5-9M6.5 7v4M9.5 7v4"/></svg>
|
|
307
|
+
<span class="session-action-label" hidden aria-hidden="true">{{ (activeSession && sessionDeleting[getSessionExportKey(activeSession)]) ? (sessionTrashEnabled === false ? t('sessions.preview.deleting') : t('sessions.preview.moving')) : (sessionTrashEnabled === false ? t('sessions.preview.deleteHard') : t('sessions.preview.moveToTrash')) }}</span>
|
|
306
308
|
</button>
|
|
307
309
|
</div>
|
|
308
310
|
</div>
|
|
309
311
|
</div>
|
|
312
|
+
<!-- @include ./context-health.html -->
|
|
310
313
|
<div class="session-export-feedback">
|
|
311
314
|
<p v-if="sessionExportNotice && sessionExportNotice.key === getSessionExportKey(activeSession)" class="session-export-notice" role="status">{{ t('sessions.export.truncated') }}</p>
|
|
312
315
|
</div>
|