codexmate 0.1.31 → 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 +8 -3
- package/README.vi.md +8 -3
- package/README.zh.md +8 -3
- package/cli/agents-files.js +18 -4
- package/cli/claude-proxy.js +2 -2
- package/cli/plugin-config.js +64 -0
- package/cli/prompt-history.js +19 -4
- package/cli/system-prompt-files.js +7 -2
- package/cli.js +200 -214
- package/lib/cli-config-engine.js +15 -4
- 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 +102 -0
- package/lib/session-context-records.js +153 -0
- 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/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 +32 -1
- package/web-ui/index.html +2 -0
- package/web-ui/logic.context-health.mjs +144 -0
- package/web-ui/logic.context-window.mjs +15 -0
- package/web-ui/modules/api.mjs +72 -39
- package/web-ui/modules/app.computed.prompts.mjs +11 -0
- package/web-ui/modules/app.methods.agents.mjs +25 -3
- 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.index.mjs +4 -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/app.methods.system-prompt.mjs +17 -2
- package/web-ui/modules/config-change-actions.mjs +9 -0
- package/web-ui/modules/context-health.methods.mjs +70 -0
- package/web-ui/modules/i18n/locales/en.mjs +164 -4
- package/web-ui/modules/i18n/locales/ja.mjs +164 -4
- package/web-ui/modules/i18n/locales/vi.mjs +164 -4
- package/web-ui/modules/i18n/locales/zh-tw.mjs +164 -4
- package/web-ui/modules/i18n/locales/zh.mjs +164 -4
- package/web-ui/modules/plugins.methods.mjs +2 -0
- package/web-ui/modules/prompt-ecosystem.methods.mjs +136 -0
- 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-health.html +45 -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-prompt-invocation.html +17 -0
- 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 +37 -10
- package/web-ui/partials/index/panel-prompts.html +18 -3
- package/web-ui/partials/index/panel-sessions.html +23 -11
- 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 +1863 -271
- package/web-ui/styles/config-changes.css +30 -0
- package/web-ui/styles/context-health.css +107 -0
- package/web-ui/styles/openclaw-structured.css +205 -189
- package/web-ui/styles/prompts-editor.css +23 -0
- package/web-ui/styles/session-features.css +148 -0
- package/web-ui/styles/sessions-preview.css +21 -0
- package/web-ui/styles/sub-tabs.css +181 -0
- package/web-ui/styles.css +5 -1
|
@@ -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">
|