codexmate 0.0.41 → 0.0.42
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 +168 -168
- package/README.zh.md +168 -168
- package/cli/agents-files.js +230 -230
- package/cli/analytics-export-args.js +68 -68
- package/cli/archive-helpers.js +453 -453
- package/cli/auth-profiles.js +375 -375
- package/cli/builtin-proxy.js +2144 -2144
- package/cli/claude-proxy.js +1022 -1022
- package/cli/config-bootstrap.js +407 -407
- package/cli/config-health.js +454 -454
- package/cli/doctor-core.js +903 -903
- package/cli/import-skills-url.js +356 -356
- package/cli/local-bridge.js +556 -556
- package/cli/openai-bridge.js +1984 -1984
- package/cli/openclaw-config.js +629 -629
- package/cli/session-convert-args.js +69 -69
- package/cli/session-convert-io.js +82 -82
- package/cli/session-convert.js +150 -150
- package/cli/session-usage.concurrent.js +28 -28
- package/cli/session-usage.js +304 -304
- package/cli/session-usage.models.js +176 -176
- package/cli/skills.js +1141 -1141
- package/cli/update.js +171 -171
- package/cli/zip-commands.js +510 -510
- package/cli.js +16494 -16458
- package/lib/automation.js +404 -404
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +440 -440
- package/lib/cli-network-utils.js +190 -190
- package/lib/cli-path-utils.js +85 -85
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +427 -427
- package/lib/cli-utils.js +155 -155
- package/lib/cli-webhook.js +154 -154
- package/lib/download-artifacts.js +92 -92
- package/lib/mcp-stdio.js +453 -453
- package/lib/task-orchestrator.js +869 -869
- package/lib/text-diff.js +303 -303
- package/lib/win-tray.js +119 -119
- package/lib/workflow-engine.js +340 -340
- package/package.json +77 -77
- package/plugins/README.md +20 -20
- package/plugins/README.zh-CN.md +20 -20
- package/plugins/prompt-templates/comment-polish/index.mjs +25 -25
- package/plugins/prompt-templates/computed.mjs +311 -311
- package/plugins/prompt-templates/index.mjs +8 -8
- package/plugins/prompt-templates/manifest.mjs +18 -18
- package/plugins/prompt-templates/methods.mjs +553 -553
- package/plugins/prompt-templates/overview.mjs +91 -91
- package/plugins/prompt-templates/ownership.mjs +19 -19
- package/plugins/prompt-templates/rule-ack/index.mjs +21 -21
- package/plugins/prompt-templates/storage.mjs +64 -64
- package/plugins/registry.mjs +16 -16
- package/web-ui/app.js +695 -695
- package/web-ui/index.html +37 -37
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +172 -172
- package/web-ui/logic.codex.mjs +69 -69
- package/web-ui/logic.mjs +5 -5
- package/web-ui/logic.runtime.mjs +128 -128
- package/web-ui/logic.session-convert.mjs +70 -70
- package/web-ui/logic.sessions.mjs +782 -782
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +252 -252
- package/web-ui/modules/app.computed.index.mjs +17 -17
- package/web-ui/modules/app.computed.main-tabs.mjs +214 -214
- package/web-ui/modules/app.computed.session.mjs +876 -876
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +651 -651
- package/web-ui/modules/app.methods.claude-config.mjs +412 -412
- package/web-ui/modules/app.methods.codex-config.mjs +869 -869
- package/web-ui/modules/app.methods.index.mjs +96 -96
- package/web-ui/modules/app.methods.install.mjs +205 -205
- package/web-ui/modules/app.methods.navigation.mjs +804 -804
- package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
- package/web-ui/modules/app.methods.openclaw-editing.mjs +420 -420
- package/web-ui/modules/app.methods.openclaw-persist.mjs +375 -375
- package/web-ui/modules/app.methods.providers.mjs +601 -601
- package/web-ui/modules/app.methods.runtime.mjs +420 -420
- package/web-ui/modules/app.methods.session-actions.mjs +617 -591
- package/web-ui/modules/app.methods.session-browser.mjs +1018 -1018
- package/web-ui/modules/app.methods.session-timeline.mjs +479 -479
- package/web-ui/modules/app.methods.session-trash.mjs +468 -468
- package/web-ui/modules/app.methods.startup-claude.mjs +554 -554
- package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
- package/web-ui/modules/app.methods.tool-config-permissions.mjs +87 -87
- package/web-ui/modules/app.methods.webhook.mjs +87 -87
- package/web-ui/modules/config-mode.computed.mjs +124 -124
- package/web-ui/modules/config-template-confirm-pref.mjs +33 -33
- package/web-ui/modules/i18n/locales/en.mjs +1141 -1140
- package/web-ui/modules/i18n/locales/ja.mjs +1132 -1130
- package/web-ui/modules/i18n/locales/vi.mjs +239 -239
- package/web-ui/modules/i18n/locales/zh.mjs +1144 -1143
- package/web-ui/modules/i18n.dict.mjs +14 -14
- package/web-ui/modules/i18n.mjs +111 -111
- package/web-ui/modules/plugins.computed.mjs +3 -3
- package/web-ui/modules/plugins.methods.mjs +3 -3
- package/web-ui/modules/plugins.storage.mjs +11 -11
- package/web-ui/modules/provider-url-display.mjs +17 -17
- package/web-ui/modules/sessions-filters-url.mjs +138 -138
- package/web-ui/modules/skills.computed.mjs +107 -107
- package/web-ui/modules/skills.methods.mjs +513 -513
- package/web-ui/partials/index/layout-footer.html +13 -13
- package/web-ui/partials/index/layout-header.html +478 -478
- package/web-ui/partials/index/modal-config-template-agents.html +185 -185
- package/web-ui/partials/index/modal-confirm-toast.html +32 -32
- package/web-ui/partials/index/modal-health-check.html +45 -45
- package/web-ui/partials/index/modal-openclaw-config.html +344 -344
- package/web-ui/partials/index/modal-skills.html +200 -200
- package/web-ui/partials/index/modal-webhook.html +42 -42
- package/web-ui/partials/index/modals-basic.html +263 -263
- package/web-ui/partials/index/panel-config-claude.html +187 -187
- package/web-ui/partials/index/panel-config-codex.html +205 -205
- package/web-ui/partials/index/panel-config-openclaw.html +89 -89
- package/web-ui/partials/index/panel-dashboard.html +171 -171
- package/web-ui/partials/index/panel-docs.html +114 -114
- package/web-ui/partials/index/panel-market.html +104 -104
- package/web-ui/partials/index/panel-orchestration.html +391 -391
- package/web-ui/partials/index/panel-plugins.html +253 -253
- package/web-ui/partials/index/panel-sessions.html +325 -319
- package/web-ui/partials/index/panel-settings.html +181 -181
- package/web-ui/partials/index/panel-trash.html +82 -82
- package/web-ui/partials/index/panel-usage.html +181 -181
- package/web-ui/res/json5.min.js +1 -1
- package/web-ui/res/vue.global.prod.js +13 -13
- package/web-ui/res/vue.runtime.global.prod.js +7 -7
- package/web-ui/res/web-ui-render.precompiled.js +7671 -7666
- package/web-ui/session-helpers.mjs +602 -602
- package/web-ui/source-bundle.cjs +305 -305
- package/web-ui/styles/base-theme.css +291 -291
- package/web-ui/styles/bridge-pool.css +266 -266
- package/web-ui/styles/controls-forms.css +532 -532
- package/web-ui/styles/dashboard.css +438 -438
- package/web-ui/styles/docs-panel.css +245 -245
- package/web-ui/styles/feedback.css +108 -108
- package/web-ui/styles/health-check-dialog.css +144 -144
- package/web-ui/styles/layout-shell.css +711 -711
- package/web-ui/styles/modals-core.css +499 -499
- package/web-ui/styles/navigation-panels.css +399 -399
- package/web-ui/styles/openclaw-structured.css +616 -616
- package/web-ui/styles/plugins-panel.css +564 -564
- package/web-ui/styles/responsive.css +501 -501
- package/web-ui/styles/sessions-list.css +683 -683
- package/web-ui/styles/sessions-preview.css +407 -407
- package/web-ui/styles/sessions-toolbar-trash.css +518 -518
- package/web-ui/styles/sessions-usage.css +849 -849
- package/web-ui/styles/settings-panel.css +419 -419
- package/web-ui/styles/skills-list.css +305 -305
- package/web-ui/styles/skills-market.css +723 -723
- package/web-ui/styles/task-orchestration.css +822 -822
- package/web-ui/styles/titles-cards.css +486 -486
- package/web-ui/styles/trash-panel.css +90 -90
- package/web-ui/styles/webhook.css +115 -115
- package/web-ui/styles.css +24 -24
- package/web-ui.html +17 -17
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
<!-- 设置面板 -->
|
|
2
|
-
<div
|
|
3
|
-
v-show="mainTab === 'settings'"
|
|
4
|
-
class="mode-content"
|
|
5
|
-
id="panel-settings"
|
|
6
|
-
role="tabpanel"
|
|
7
|
-
:aria-labelledby="'tab-settings'">
|
|
8
|
-
|
|
9
|
-
<div class="settings-tab-header">
|
|
10
|
-
<div
|
|
11
|
-
class="segmented-control"
|
|
12
|
-
role="tablist"
|
|
13
|
-
:aria-label="t('settings.tabs.aria')">
|
|
14
|
-
<button
|
|
15
|
-
id="settings-tab-general"
|
|
16
|
-
type="button"
|
|
17
|
-
role="tab"
|
|
18
|
-
aria-controls="settings-panel-general"
|
|
19
|
-
:aria-selected="settingsTab === 'general'"
|
|
20
|
-
:tabindex="settingsTab === 'general' ? 0 : -1"
|
|
21
|
-
:class="['segmented-option', { active: settingsTab === 'general' }]"
|
|
22
|
-
@click="onSettingsTabClick('general')"
|
|
23
|
-
@keydown="onSettingsTabKeydown($event, 'general')">{{ t('settings.tab.general') }}</button>
|
|
24
|
-
<button
|
|
25
|
-
id="settings-tab-data"
|
|
26
|
-
type="button"
|
|
27
|
-
role="tab"
|
|
28
|
-
aria-controls="settings-panel-data"
|
|
29
|
-
:aria-selected="settingsTab === 'data'"
|
|
30
|
-
:tabindex="settingsTab === 'data' ? 0 : -1"
|
|
31
|
-
:class="['segmented-option', { active: settingsTab === 'data' }]"
|
|
32
|
-
@click="onSettingsTabClick('data')"
|
|
33
|
-
@keydown="onSettingsTabKeydown($event, 'data')">{{ t('settings.tab.data') }}</button>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div
|
|
38
|
-
v-show="settingsTab === 'general'"
|
|
39
|
-
id="settings-panel-general"
|
|
40
|
-
role="tabpanel"
|
|
41
|
-
aria-labelledby="settings-tab-general">
|
|
42
|
-
<div class="settings-grid">
|
|
43
|
-
<section id="settings-language" class="settings-card" :aria-label="t('settings.language.title')">
|
|
44
|
-
<div class="settings-card-main">
|
|
45
|
-
<div class="settings-card-content">
|
|
46
|
-
<div class="settings-card-title">{{ t('settings.language.title') }}</div>
|
|
47
|
-
<p class="settings-card-desc">{{ t('settings.language.meta') }}</p>
|
|
48
|
-
<label class="selector-label" for="settings-language-select">{{ t('settings.language.label') }}</label>
|
|
49
|
-
<select
|
|
50
|
-
id="settings-language-select"
|
|
51
|
-
class="model-select settings-language-select"
|
|
52
|
-
:value="lang"
|
|
53
|
-
@change="setLang($event.target.value)">
|
|
54
|
-
<option
|
|
55
|
-
v-for="option in languageOptions()"
|
|
56
|
-
:key="option.code"
|
|
57
|
-
:value="option.code">{{ option.nativeName }} · {{ option.englishName }}</option>
|
|
58
|
-
</select>
|
|
59
|
-
<p class="settings-card-hint">{{ t('settings.language.hint') }}</p>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</section>
|
|
63
|
-
|
|
64
|
-
<section class="settings-card" :aria-label="t('settings.sharePrefix.title')">
|
|
65
|
-
<div class="settings-card-main">
|
|
66
|
-
<div class="settings-card-content">
|
|
67
|
-
<div class="settings-card-title">{{ t('settings.sharePrefix.title') }}</div>
|
|
68
|
-
<p class="settings-card-desc">{{ t('settings.sharePrefix.meta') }}</p>
|
|
69
|
-
<label class="selector-label" for="settings-share-prefix">{{ t('settings.sharePrefix.label') }}</label>
|
|
70
|
-
<select
|
|
71
|
-
id="settings-share-prefix"
|
|
72
|
-
class="model-select"
|
|
73
|
-
:value="shareCommandPrefix"
|
|
74
|
-
@change="setShareCommandPrefix($event.target.value)">
|
|
75
|
-
<option value="npm start">npm start</option>
|
|
76
|
-
<option value="codexmate">codexmate</option>
|
|
77
|
-
</select>
|
|
78
|
-
<p class="settings-card-hint">{{ t('settings.sharePrefix.hint') }}</p>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</section>
|
|
82
|
-
|
|
83
|
-
<section class="settings-card" :aria-label="t('settings.templateConfirm.title')">
|
|
84
|
-
<div class="settings-card-main">
|
|
85
|
-
<div class="settings-card-content">
|
|
86
|
-
<div class="settings-card-title">{{ t('settings.templateConfirm.title') }}</div>
|
|
87
|
-
<p class="settings-card-desc">{{ t('settings.templateConfirm.meta') }}</p>
|
|
88
|
-
<label class="settings-toggle-row">
|
|
89
|
-
<input type="checkbox" :checked="configTemplateDiffConfirmEnabled" @change="setConfigTemplateDiffConfirmEnabled($event.target.checked)">
|
|
90
|
-
<span class="toggle-track">
|
|
91
|
-
<span class="toggle-thumb"></span>
|
|
92
|
-
</span>
|
|
93
|
-
<span>{{ t('settings.templateConfirm.toggle') }}</span>
|
|
94
|
-
</label>
|
|
95
|
-
<p class="settings-card-hint">{{ t('settings.templateConfirm.hint') }}</p>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</section>
|
|
99
|
-
|
|
100
|
-
<section class="settings-card" :aria-label="t('settings.webhook.title')">
|
|
101
|
-
<div class="settings-card-main">
|
|
102
|
-
<div class="settings-card-content">
|
|
103
|
-
<div class="settings-card-title">{{ t('settings.webhook.title') }}</div>
|
|
104
|
-
<p class="settings-card-desc">{{ t('settings.webhook.meta') }}</p>
|
|
105
|
-
<div class="webhook-status">
|
|
106
|
-
<span class="webhook-status-dot" :class="{ active: webhookConfig.enabled }"></span>
|
|
107
|
-
<span class="webhook-status-label">{{ webhookConfig.enabled ? t('settings.webhook.enabled') : t('settings.webhook.disabled') }}</span>
|
|
108
|
-
<code v-if="webhookConfig.url" class="webhook-url">{{ webhookConfig.url }}</code>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<button class="settings-card-action" @click="openWebhookModal" :class="{ 'settings-card-action--active': webhookConfig.enabled }">
|
|
113
|
-
<span v-if="webhookConfig.enabled">{{ webhookConfig.url ? t('settings.webhook.edit') : t('settings.webhook.configure') }}</span>
|
|
114
|
-
<span v-else>{{ t('settings.webhook.enable') }}</span>
|
|
115
|
-
</button>
|
|
116
|
-
</section>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
|
|
120
|
-
<div
|
|
121
|
-
v-show="settingsTab === 'data'"
|
|
122
|
-
id="settings-panel-data"
|
|
123
|
-
role="tabpanel"
|
|
124
|
-
aria-labelledby="settings-tab-data">
|
|
125
|
-
<div class="settings-grid">
|
|
126
|
-
<section class="settings-card" :aria-label="t('settings.backup.title')">
|
|
127
|
-
<div class="settings-card-main">
|
|
128
|
-
<div class="settings-card-content">
|
|
129
|
-
<div class="settings-card-title">{{ t('settings.backup.title') }}</div>
|
|
130
|
-
<p class="settings-card-desc">{{ t('settings.backup.meta') }}</p>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
<div class="settings-card-actions">
|
|
134
|
-
<button class="settings-card-action" @click="downloadClaudeDirectory" :disabled="claudeDownloadLoading">
|
|
135
|
-
<span>{{ claudeDownloadLoading ? t('settings.importing') : t('settings.backup.oneClickClaude') }}</span>
|
|
136
|
-
</button>
|
|
137
|
-
<button class="settings-card-action" @click="downloadCodexDirectory" :disabled="codexDownloadLoading">
|
|
138
|
-
<span>{{ codexDownloadLoading ? t('settings.importing') : t('settings.backup.oneClickCodex') }}</span>
|
|
139
|
-
</button>
|
|
140
|
-
</div>
|
|
141
|
-
<input ref="claudeImportInput" class="sr-only" type="file" accept=".zip" @change="handleClaudeImportChange">
|
|
142
|
-
<input ref="codexImportInput" class="sr-only" type="file" accept=".zip" @change="handleCodexImportChange">
|
|
143
|
-
</section>
|
|
144
|
-
|
|
145
|
-
<section class="settings-card" :aria-label="t('settings.trashConfig.title')">
|
|
146
|
-
<div class="settings-card-main">
|
|
147
|
-
<div class="settings-card-content">
|
|
148
|
-
<div class="settings-card-title">{{ t('settings.trashConfig.title') }}</div>
|
|
149
|
-
<p class="settings-card-desc">{{ t('settings.trashConfig.meta') }}</p>
|
|
150
|
-
<label class="settings-toggle-row">
|
|
151
|
-
<input type="checkbox" :checked="sessionTrashEnabled" @change="setSessionTrashEnabled($event.target.checked)">
|
|
152
|
-
<span class="toggle-track">
|
|
153
|
-
<span class="toggle-thumb"></span>
|
|
154
|
-
</span>
|
|
155
|
-
<span>{{ t('settings.deleteBehavior.toggle') }}</span>
|
|
156
|
-
</label>
|
|
157
|
-
<div class="settings-retention">
|
|
158
|
-
<label for="settings-trash-retention-days">{{ t('settings.trash.retentionLabel') }}</label>
|
|
159
|
-
<input id="settings-trash-retention-days" type="number" min="1" max="365" :value="sessionTrashRetentionDays" @change="setSessionTrashRetentionDays(Number($event.target.value))" class="settings-retention-input" />
|
|
160
|
-
<span>{{ t('settings.trash.retentionUnit') }}</span>
|
|
161
|
-
</div>
|
|
162
|
-
<p class="settings-card-hint">{{ t('settings.trash.retentionHint') }}</p>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</section>
|
|
166
|
-
|
|
167
|
-
<section class="settings-card settings-card--destructive" :aria-label="t('settings.reset.title')">
|
|
168
|
-
<div class="settings-card-main">
|
|
169
|
-
<div class="settings-card-content">
|
|
170
|
-
<div class="settings-card-title">{{ t('settings.reset.title') }}</div>
|
|
171
|
-
<p class="settings-card-desc">{{ t('settings.reset.meta') }}</p>
|
|
172
|
-
<p class="settings-card-hint">{{ t('settings.reset.hint') }}</p>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
<button class="settings-card-action settings-card-action--danger" @click="resetConfig" :disabled="resetConfigLoading || loading || !!initError">
|
|
176
|
-
{{ resetConfigLoading ? t('settings.reset.loading') : t('settings.reset.button') }}
|
|
177
|
-
</button>
|
|
178
|
-
</section>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
1
|
+
<!-- 设置面板 -->
|
|
2
|
+
<div
|
|
3
|
+
v-show="mainTab === 'settings'"
|
|
4
|
+
class="mode-content"
|
|
5
|
+
id="panel-settings"
|
|
6
|
+
role="tabpanel"
|
|
7
|
+
:aria-labelledby="'tab-settings'">
|
|
8
|
+
|
|
9
|
+
<div class="settings-tab-header">
|
|
10
|
+
<div
|
|
11
|
+
class="segmented-control"
|
|
12
|
+
role="tablist"
|
|
13
|
+
:aria-label="t('settings.tabs.aria')">
|
|
14
|
+
<button
|
|
15
|
+
id="settings-tab-general"
|
|
16
|
+
type="button"
|
|
17
|
+
role="tab"
|
|
18
|
+
aria-controls="settings-panel-general"
|
|
19
|
+
:aria-selected="settingsTab === 'general'"
|
|
20
|
+
:tabindex="settingsTab === 'general' ? 0 : -1"
|
|
21
|
+
:class="['segmented-option', { active: settingsTab === 'general' }]"
|
|
22
|
+
@click="onSettingsTabClick('general')"
|
|
23
|
+
@keydown="onSettingsTabKeydown($event, 'general')">{{ t('settings.tab.general') }}</button>
|
|
24
|
+
<button
|
|
25
|
+
id="settings-tab-data"
|
|
26
|
+
type="button"
|
|
27
|
+
role="tab"
|
|
28
|
+
aria-controls="settings-panel-data"
|
|
29
|
+
:aria-selected="settingsTab === 'data'"
|
|
30
|
+
:tabindex="settingsTab === 'data' ? 0 : -1"
|
|
31
|
+
:class="['segmented-option', { active: settingsTab === 'data' }]"
|
|
32
|
+
@click="onSettingsTabClick('data')"
|
|
33
|
+
@keydown="onSettingsTabKeydown($event, 'data')">{{ t('settings.tab.data') }}</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div
|
|
38
|
+
v-show="settingsTab === 'general'"
|
|
39
|
+
id="settings-panel-general"
|
|
40
|
+
role="tabpanel"
|
|
41
|
+
aria-labelledby="settings-tab-general">
|
|
42
|
+
<div class="settings-grid">
|
|
43
|
+
<section id="settings-language" class="settings-card" :aria-label="t('settings.language.title')">
|
|
44
|
+
<div class="settings-card-main">
|
|
45
|
+
<div class="settings-card-content">
|
|
46
|
+
<div class="settings-card-title">{{ t('settings.language.title') }}</div>
|
|
47
|
+
<p class="settings-card-desc">{{ t('settings.language.meta') }}</p>
|
|
48
|
+
<label class="selector-label" for="settings-language-select">{{ t('settings.language.label') }}</label>
|
|
49
|
+
<select
|
|
50
|
+
id="settings-language-select"
|
|
51
|
+
class="model-select settings-language-select"
|
|
52
|
+
:value="lang"
|
|
53
|
+
@change="setLang($event.target.value)">
|
|
54
|
+
<option
|
|
55
|
+
v-for="option in languageOptions()"
|
|
56
|
+
:key="option.code"
|
|
57
|
+
:value="option.code">{{ option.nativeName }} · {{ option.englishName }}</option>
|
|
58
|
+
</select>
|
|
59
|
+
<p class="settings-card-hint">{{ t('settings.language.hint') }}</p>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</section>
|
|
63
|
+
|
|
64
|
+
<section class="settings-card" :aria-label="t('settings.sharePrefix.title')">
|
|
65
|
+
<div class="settings-card-main">
|
|
66
|
+
<div class="settings-card-content">
|
|
67
|
+
<div class="settings-card-title">{{ t('settings.sharePrefix.title') }}</div>
|
|
68
|
+
<p class="settings-card-desc">{{ t('settings.sharePrefix.meta') }}</p>
|
|
69
|
+
<label class="selector-label" for="settings-share-prefix">{{ t('settings.sharePrefix.label') }}</label>
|
|
70
|
+
<select
|
|
71
|
+
id="settings-share-prefix"
|
|
72
|
+
class="model-select"
|
|
73
|
+
:value="shareCommandPrefix"
|
|
74
|
+
@change="setShareCommandPrefix($event.target.value)">
|
|
75
|
+
<option value="npm start">npm start</option>
|
|
76
|
+
<option value="codexmate">codexmate</option>
|
|
77
|
+
</select>
|
|
78
|
+
<p class="settings-card-hint">{{ t('settings.sharePrefix.hint') }}</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</section>
|
|
82
|
+
|
|
83
|
+
<section class="settings-card" :aria-label="t('settings.templateConfirm.title')">
|
|
84
|
+
<div class="settings-card-main">
|
|
85
|
+
<div class="settings-card-content">
|
|
86
|
+
<div class="settings-card-title">{{ t('settings.templateConfirm.title') }}</div>
|
|
87
|
+
<p class="settings-card-desc">{{ t('settings.templateConfirm.meta') }}</p>
|
|
88
|
+
<label class="settings-toggle-row">
|
|
89
|
+
<input type="checkbox" :checked="configTemplateDiffConfirmEnabled" @change="setConfigTemplateDiffConfirmEnabled($event.target.checked)">
|
|
90
|
+
<span class="toggle-track">
|
|
91
|
+
<span class="toggle-thumb"></span>
|
|
92
|
+
</span>
|
|
93
|
+
<span>{{ t('settings.templateConfirm.toggle') }}</span>
|
|
94
|
+
</label>
|
|
95
|
+
<p class="settings-card-hint">{{ t('settings.templateConfirm.hint') }}</p>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</section>
|
|
99
|
+
|
|
100
|
+
<section class="settings-card" :aria-label="t('settings.webhook.title')">
|
|
101
|
+
<div class="settings-card-main">
|
|
102
|
+
<div class="settings-card-content">
|
|
103
|
+
<div class="settings-card-title">{{ t('settings.webhook.title') }}</div>
|
|
104
|
+
<p class="settings-card-desc">{{ t('settings.webhook.meta') }}</p>
|
|
105
|
+
<div class="webhook-status">
|
|
106
|
+
<span class="webhook-status-dot" :class="{ active: webhookConfig.enabled }"></span>
|
|
107
|
+
<span class="webhook-status-label">{{ webhookConfig.enabled ? t('settings.webhook.enabled') : t('settings.webhook.disabled') }}</span>
|
|
108
|
+
<code v-if="webhookConfig.url" class="webhook-url">{{ webhookConfig.url }}</code>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<button class="settings-card-action" @click="openWebhookModal" :class="{ 'settings-card-action--active': webhookConfig.enabled }">
|
|
113
|
+
<span v-if="webhookConfig.enabled">{{ webhookConfig.url ? t('settings.webhook.edit') : t('settings.webhook.configure') }}</span>
|
|
114
|
+
<span v-else>{{ t('settings.webhook.enable') }}</span>
|
|
115
|
+
</button>
|
|
116
|
+
</section>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div
|
|
121
|
+
v-show="settingsTab === 'data'"
|
|
122
|
+
id="settings-panel-data"
|
|
123
|
+
role="tabpanel"
|
|
124
|
+
aria-labelledby="settings-tab-data">
|
|
125
|
+
<div class="settings-grid">
|
|
126
|
+
<section class="settings-card" :aria-label="t('settings.backup.title')">
|
|
127
|
+
<div class="settings-card-main">
|
|
128
|
+
<div class="settings-card-content">
|
|
129
|
+
<div class="settings-card-title">{{ t('settings.backup.title') }}</div>
|
|
130
|
+
<p class="settings-card-desc">{{ t('settings.backup.meta') }}</p>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="settings-card-actions">
|
|
134
|
+
<button class="settings-card-action" @click="downloadClaudeDirectory" :disabled="claudeDownloadLoading">
|
|
135
|
+
<span>{{ claudeDownloadLoading ? t('settings.importing') : t('settings.backup.oneClickClaude') }}</span>
|
|
136
|
+
</button>
|
|
137
|
+
<button class="settings-card-action" @click="downloadCodexDirectory" :disabled="codexDownloadLoading">
|
|
138
|
+
<span>{{ codexDownloadLoading ? t('settings.importing') : t('settings.backup.oneClickCodex') }}</span>
|
|
139
|
+
</button>
|
|
140
|
+
</div>
|
|
141
|
+
<input ref="claudeImportInput" class="sr-only" type="file" accept=".zip" @change="handleClaudeImportChange">
|
|
142
|
+
<input ref="codexImportInput" class="sr-only" type="file" accept=".zip" @change="handleCodexImportChange">
|
|
143
|
+
</section>
|
|
144
|
+
|
|
145
|
+
<section class="settings-card" :aria-label="t('settings.trashConfig.title')">
|
|
146
|
+
<div class="settings-card-main">
|
|
147
|
+
<div class="settings-card-content">
|
|
148
|
+
<div class="settings-card-title">{{ t('settings.trashConfig.title') }}</div>
|
|
149
|
+
<p class="settings-card-desc">{{ t('settings.trashConfig.meta') }}</p>
|
|
150
|
+
<label class="settings-toggle-row">
|
|
151
|
+
<input type="checkbox" :checked="sessionTrashEnabled" @change="setSessionTrashEnabled($event.target.checked)">
|
|
152
|
+
<span class="toggle-track">
|
|
153
|
+
<span class="toggle-thumb"></span>
|
|
154
|
+
</span>
|
|
155
|
+
<span>{{ t('settings.deleteBehavior.toggle') }}</span>
|
|
156
|
+
</label>
|
|
157
|
+
<div class="settings-retention">
|
|
158
|
+
<label for="settings-trash-retention-days">{{ t('settings.trash.retentionLabel') }}</label>
|
|
159
|
+
<input id="settings-trash-retention-days" type="number" min="1" max="365" :value="sessionTrashRetentionDays" @change="setSessionTrashRetentionDays(Number($event.target.value))" class="settings-retention-input" />
|
|
160
|
+
<span>{{ t('settings.trash.retentionUnit') }}</span>
|
|
161
|
+
</div>
|
|
162
|
+
<p class="settings-card-hint">{{ t('settings.trash.retentionHint') }}</p>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</section>
|
|
166
|
+
|
|
167
|
+
<section class="settings-card settings-card--destructive" :aria-label="t('settings.reset.title')">
|
|
168
|
+
<div class="settings-card-main">
|
|
169
|
+
<div class="settings-card-content">
|
|
170
|
+
<div class="settings-card-title">{{ t('settings.reset.title') }}</div>
|
|
171
|
+
<p class="settings-card-desc">{{ t('settings.reset.meta') }}</p>
|
|
172
|
+
<p class="settings-card-hint">{{ t('settings.reset.hint') }}</p>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
<button class="settings-card-action settings-card-action--danger" @click="resetConfig" :disabled="resetConfigLoading || loading || !!initError">
|
|
176
|
+
{{ resetConfigLoading ? t('settings.reset.loading') : t('settings.reset.button') }}
|
|
177
|
+
</button>
|
|
178
|
+
</section>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
<!-- Trash panel -->
|
|
2
|
-
<div
|
|
3
|
-
v-show="mainTab === 'trash'"
|
|
4
|
-
class="mode-content"
|
|
5
|
-
id="panel-trash"
|
|
6
|
-
role="tabpanel"
|
|
7
|
-
aria-labelledby="tab-trash">
|
|
8
|
-
<div v-if="!loading" class="trash-panel-shell">
|
|
9
|
-
<!-- Empty state -->
|
|
10
|
-
<div v-if="getSessionTrashViewState() === 'empty'" class="trash-empty-state">
|
|
11
|
-
<svg class="trash-empty-svg" viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="1.2">
|
|
12
|
-
<path d="M20 22l4 32h16l4-32"/>
|
|
13
|
-
<path d="M14 22h36"/>
|
|
14
|
-
<path d="M24 22v-4a4 4 0 014-4h8a4 4 0 014 4v4"/>
|
|
15
|
-
<path d="M28 30v16M36 30v16" stroke-width="1.6" stroke-linecap="round"/>
|
|
16
|
-
</svg>
|
|
17
|
-
<div class="trash-empty-title">{{ t('settings.trash.empty') }}</div>
|
|
18
|
-
<div class="trash-empty-hint">{{ t('settings.trash.emptyHint', { days: sessionTrashRetentionDays }) }}</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<!-- Loading state -->
|
|
22
|
-
<div v-else-if="getSessionTrashViewState() === 'loading'" class="trash-empty-state">
|
|
23
|
-
<div class="trash-spinner"></div>
|
|
24
|
-
<div class="trash-empty-title">{{ t('settings.trash.loading') }}</div>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<!-- Error state -->
|
|
28
|
-
<div v-else-if="getSessionTrashViewState() === 'retry'" class="trash-empty-state">
|
|
29
|
-
<svg class="trash-empty-svg" viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="1.2">
|
|
30
|
-
<circle cx="32" cy="32" r="22"/>
|
|
31
|
-
<path d="M32 20v16M32 44v2" stroke-width="2" stroke-linecap="round"/>
|
|
32
|
-
</svg>
|
|
33
|
-
<div class="trash-empty-title">{{ t('settings.trash.retry') }}</div>
|
|
34
|
-
<button class="btn-tool" @click="loadSessionTrash({ forceRefresh: true })">{{ t('common.retry') }}</button>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<!-- List state -->
|
|
38
|
-
<template v-else>
|
|
39
|
-
<div class="trash-toolbar">
|
|
40
|
-
<div class="trash-toolbar-left">
|
|
41
|
-
<span class="trash-toolbar-count">{{ t('settings.trash.count', { count: sessionTrashCount }) }}</span>
|
|
42
|
-
<span class="trash-toolbar-retention">{{ t('settings.trash.retentionShort', { days: sessionTrashRetentionDays }) }}</span>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="trash-toolbar-right">
|
|
45
|
-
<button class="btn-mini" @click="loadSessionTrash({ forceRefresh: true })" :disabled="sessionTrashLoading" :aria-label="t('sessions.refresh')" :title="t('sessions.refresh')">
|
|
46
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="btn-icon-sm"><path d="M21 2v6h-6M3 12a9 9 0 0115-6.7L21 8M3 22v-6h6M21 12a9 9 0 01-15 6.7L3 16"/></svg>
|
|
47
|
-
</button>
|
|
48
|
-
<button class="btn-mini delete" @click="clearSessionTrash" :disabled="sessionTrashClearing || sessionTrashLoading || !(Number(sessionTrashCount) > 0)">
|
|
49
|
-
{{ sessionTrashClearing ? t('settings.trash.clearing') : t('settings.trash.clearShort') }}
|
|
50
|
-
</button>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div class="trash-list">
|
|
55
|
-
<div v-for="item in visibleSessionTrashItems" :key="item.trashId" class="trash-item">
|
|
56
|
-
<div class="trash-item-body">
|
|
57
|
-
<div class="trash-item-main">
|
|
58
|
-
<div class="trash-item-title">{{ item.title || item.sessionId }}</div>
|
|
59
|
-
<div class="trash-item-meta">
|
|
60
|
-
<span class="session-source" :data-source="item.source">{{ item.sourceLabel }}</span>
|
|
61
|
-
<span class="trash-item-time">{{ item.deletedAt || item.updatedAt || t('sessions.unknownTime') }}</span>
|
|
62
|
-
<span v-if="item.cwd" class="trash-item-cwd">{{ item.cwd }}</span>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="trash-item-actions">
|
|
66
|
-
<button class="trash-action-btn restore" @click="restoreSessionTrash(item)" :disabled="sessionTrashLoading || sessionTrashClearing || isSessionTrashActionBusy(item)" :aria-label="sessionTrashRestoring[getSessionTrashActionKey(item)] ? t('settings.trash.restoring') : t('settings.trash.restore')" :title="sessionTrashRestoring[getSessionTrashActionKey(item)] ? t('settings.trash.restoring') : t('settings.trash.restore')">
|
|
67
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 119 9"/><path d="M3 4v6h6"/></svg>
|
|
68
|
-
</button>
|
|
69
|
-
<button class="trash-action-btn delete" @click="purgeSessionTrash(item)" :disabled="sessionTrashLoading || sessionTrashClearing || isSessionTrashActionBusy(item)" :aria-label="sessionTrashPurging[getSessionTrashActionKey(item)] ? t('settings.trash.purging') : t('settings.trash.purge')" :title="sessionTrashPurging[getSessionTrashActionKey(item)] ? t('settings.trash.purging') : t('settings.trash.purge')">
|
|
70
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6M10 11v6M14 11v6"/></svg>
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<div v-if="sessionTrashHasMoreItems" class="trash-list-footer">
|
|
76
|
-
<button class="btn-tool btn-tool-compact" @click="loadMoreSessionTrashItems" :disabled="sessionTrashLoading || sessionTrashClearing">
|
|
77
|
-
{{ t('settings.trash.loadMoreItems', { count: sessionTrashHiddenCount }) }}
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</template>
|
|
82
|
-
</div>
|
|
1
|
+
<!-- Trash panel -->
|
|
2
|
+
<div
|
|
3
|
+
v-show="mainTab === 'trash'"
|
|
4
|
+
class="mode-content"
|
|
5
|
+
id="panel-trash"
|
|
6
|
+
role="tabpanel"
|
|
7
|
+
aria-labelledby="tab-trash">
|
|
8
|
+
<div v-if="!loading" class="trash-panel-shell">
|
|
9
|
+
<!-- Empty state -->
|
|
10
|
+
<div v-if="getSessionTrashViewState() === 'empty'" class="trash-empty-state">
|
|
11
|
+
<svg class="trash-empty-svg" viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="1.2">
|
|
12
|
+
<path d="M20 22l4 32h16l4-32"/>
|
|
13
|
+
<path d="M14 22h36"/>
|
|
14
|
+
<path d="M24 22v-4a4 4 0 014-4h8a4 4 0 014 4v4"/>
|
|
15
|
+
<path d="M28 30v16M36 30v16" stroke-width="1.6" stroke-linecap="round"/>
|
|
16
|
+
</svg>
|
|
17
|
+
<div class="trash-empty-title">{{ t('settings.trash.empty') }}</div>
|
|
18
|
+
<div class="trash-empty-hint">{{ t('settings.trash.emptyHint', { days: sessionTrashRetentionDays }) }}</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- Loading state -->
|
|
22
|
+
<div v-else-if="getSessionTrashViewState() === 'loading'" class="trash-empty-state">
|
|
23
|
+
<div class="trash-spinner"></div>
|
|
24
|
+
<div class="trash-empty-title">{{ t('settings.trash.loading') }}</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Error state -->
|
|
28
|
+
<div v-else-if="getSessionTrashViewState() === 'retry'" class="trash-empty-state">
|
|
29
|
+
<svg class="trash-empty-svg" viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="1.2">
|
|
30
|
+
<circle cx="32" cy="32" r="22"/>
|
|
31
|
+
<path d="M32 20v16M32 44v2" stroke-width="2" stroke-linecap="round"/>
|
|
32
|
+
</svg>
|
|
33
|
+
<div class="trash-empty-title">{{ t('settings.trash.retry') }}</div>
|
|
34
|
+
<button class="btn-tool" @click="loadSessionTrash({ forceRefresh: true })">{{ t('common.retry') }}</button>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- List state -->
|
|
38
|
+
<template v-else>
|
|
39
|
+
<div class="trash-toolbar">
|
|
40
|
+
<div class="trash-toolbar-left">
|
|
41
|
+
<span class="trash-toolbar-count">{{ t('settings.trash.count', { count: sessionTrashCount }) }}</span>
|
|
42
|
+
<span class="trash-toolbar-retention">{{ t('settings.trash.retentionShort', { days: sessionTrashRetentionDays }) }}</span>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="trash-toolbar-right">
|
|
45
|
+
<button class="btn-mini" @click="loadSessionTrash({ forceRefresh: true })" :disabled="sessionTrashLoading" :aria-label="t('sessions.refresh')" :title="t('sessions.refresh')">
|
|
46
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="btn-icon-sm"><path d="M21 2v6h-6M3 12a9 9 0 0115-6.7L21 8M3 22v-6h6M21 12a9 9 0 01-15 6.7L3 16"/></svg>
|
|
47
|
+
</button>
|
|
48
|
+
<button class="btn-mini delete" @click="clearSessionTrash" :disabled="sessionTrashClearing || sessionTrashLoading || !(Number(sessionTrashCount) > 0)">
|
|
49
|
+
{{ sessionTrashClearing ? t('settings.trash.clearing') : t('settings.trash.clearShort') }}
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="trash-list">
|
|
55
|
+
<div v-for="item in visibleSessionTrashItems" :key="item.trashId" class="trash-item">
|
|
56
|
+
<div class="trash-item-body">
|
|
57
|
+
<div class="trash-item-main">
|
|
58
|
+
<div class="trash-item-title">{{ item.title || item.sessionId }}</div>
|
|
59
|
+
<div class="trash-item-meta">
|
|
60
|
+
<span class="session-source" :data-source="item.source">{{ item.sourceLabel }}</span>
|
|
61
|
+
<span class="trash-item-time">{{ item.deletedAt || item.updatedAt || t('sessions.unknownTime') }}</span>
|
|
62
|
+
<span v-if="item.cwd" class="trash-item-cwd">{{ item.cwd }}</span>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="trash-item-actions">
|
|
66
|
+
<button class="trash-action-btn restore" @click="restoreSessionTrash(item)" :disabled="sessionTrashLoading || sessionTrashClearing || isSessionTrashActionBusy(item)" :aria-label="sessionTrashRestoring[getSessionTrashActionKey(item)] ? t('settings.trash.restoring') : t('settings.trash.restore')" :title="sessionTrashRestoring[getSessionTrashActionKey(item)] ? t('settings.trash.restoring') : t('settings.trash.restore')">
|
|
67
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 12a9 9 0 119 9"/><path d="M3 4v6h6"/></svg>
|
|
68
|
+
</button>
|
|
69
|
+
<button class="trash-action-btn delete" @click="purgeSessionTrash(item)" :disabled="sessionTrashLoading || sessionTrashClearing || isSessionTrashActionBusy(item)" :aria-label="sessionTrashPurging[getSessionTrashActionKey(item)] ? t('settings.trash.purging') : t('settings.trash.purge')" :title="sessionTrashPurging[getSessionTrashActionKey(item)] ? t('settings.trash.purging') : t('settings.trash.purge')">
|
|
70
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2M19 6l-1 14a2 2 0 01-2 2H8a2 2 0 01-2-2L5 6M10 11v6M14 11v6"/></svg>
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div v-if="sessionTrashHasMoreItems" class="trash-list-footer">
|
|
76
|
+
<button class="btn-tool btn-tool-compact" @click="loadMoreSessionTrashItems" :disabled="sessionTrashLoading || sessionTrashClearing">
|
|
77
|
+
{{ t('settings.trash.loadMoreItems', { count: sessionTrashHiddenCount }) }}
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</template>
|
|
82
|
+
</div>
|
|
83
83
|
</div>
|