codexmate 0.0.32 → 0.0.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 +147 -363
- package/README.zh.md +147 -371
- package/cli/agents-files.js +224 -224
- package/cli/archive-helpers.js +446 -446
- package/cli/auth-profiles.js +375 -375
- package/cli/builtin-proxy.js +1725 -1725
- package/cli/claude-proxy.js +1022 -1022
- package/cli/config-bootstrap.js +402 -402
- 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 +551 -324
- package/cli/openai-bridge.js +1653 -1653
- 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 +118 -118
- package/cli/session-usage.models.js +176 -176
- package/cli/skills.js +1141 -1141
- package/cli/update.js +162 -0
- package/cli/zip-commands.js +510 -510
- package/cli.js +16023 -15829
- 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 -426
- package/lib/cli-utils.js +155 -155
- package/lib/cli-webhook.js +126 -126
- 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 -0
- package/lib/workflow-engine.js +340 -340
- package/package.json +76 -76
- 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 +253 -253
- package/plugins/prompt-templates/index.mjs +8 -8
- package/plugins/prompt-templates/manifest.mjs +15 -15
- 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 +650 -647
- package/web-ui/index.html +36 -36
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +168 -168
- 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 +781 -781
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +248 -248
- package/web-ui/modules/app.computed.index.mjs +17 -17
- package/web-ui/modules/app.computed.main-tabs.mjs +205 -205
- package/web-ui/modules/app.computed.session.mjs +735 -693
- 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 +269 -200
- package/web-ui/modules/app.methods.codex-config.mjs +861 -861
- package/web-ui/modules/app.methods.index.mjs +94 -94
- package/web-ui/modules/app.methods.install.mjs +205 -205
- package/web-ui/modules/app.methods.navigation.mjs +774 -774
- package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
- package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -372
- package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -369
- package/web-ui/modules/app.methods.providers.mjs +575 -529
- package/web-ui/modules/app.methods.runtime.mjs +345 -345
- package/web-ui/modules/app.methods.session-actions.mjs +591 -591
- package/web-ui/modules/app.methods.session-browser.mjs +1012 -1012
- package/web-ui/modules/app.methods.session-timeline.mjs +479 -479
- package/web-ui/modules/app.methods.session-trash.mjs +438 -438
- package/web-ui/modules/app.methods.startup-claude.mjs +538 -537
- package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
- package/web-ui/modules/app.methods.webhook.mjs +79 -79
- 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.dict.mjs +3192 -3177
- package/web-ui/modules/i18n.mjs +62 -62
- 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 +85 -85
- package/web-ui/modules/skills.computed.mjs +107 -107
- package/web-ui/modules/skills.methods.mjs +482 -482
- package/web-ui/partials/index/layout-footer.html +13 -13
- package/web-ui/partials/index/layout-header.html +499 -503
- 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 +280 -280
- package/web-ui/partials/index/modal-skills.html +200 -200
- package/web-ui/partials/index/modals-basic.html +173 -162
- package/web-ui/partials/index/panel-config-claude.html +166 -136
- package/web-ui/partials/index/panel-config-codex.html +190 -196
- package/web-ui/partials/index/panel-config-codex.html.bak +337 -0
- package/web-ui/partials/index/panel-config-openclaw.html +83 -83
- package/web-ui/partials/index/panel-dashboard.html +186 -219
- package/web-ui/partials/index/panel-docs.html +114 -114
- package/web-ui/partials/index/panel-market.html +177 -177
- 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 +319 -313
- package/web-ui/partials/index/panel-settings.html +190 -190
- package/web-ui/partials/index/panel-trash.html +82 -82
- package/web-ui/partials/index/panel-usage.html +137 -137
- package/web-ui/res/json5.min.js +1 -1
- package/web-ui/res/vue.global.prod.js +13 -13
- package/web-ui/session-helpers.mjs +591 -591
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +281 -281
- package/web-ui/styles/bridge-pool.css +197 -197
- package/web-ui/styles/controls-forms.css +433 -433
- package/web-ui/styles/dashboard.css +406 -406
- 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 +628 -638
- package/web-ui/styles/modals-core.css +499 -466
- package/web-ui/styles/navigation-panels.css +391 -391
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/plugins-panel.css +564 -564
- package/web-ui/styles/responsive.css +392 -392
- package/web-ui/styles/sessions-list.css +683 -647
- 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 +588 -588
- package/web-ui/styles/settings-panel.css +349 -349
- package/web-ui/styles/skills-list.css +305 -305
- package/web-ui/styles/skills-market.css +429 -429
- package/web-ui/styles/task-orchestration.css +822 -822
- package/web-ui/styles/titles-cards.css +472 -472
- package/web-ui/styles/trash-panel.css +90 -90
- package/web-ui/styles/webhook.css +81 -81
- package/web-ui/styles.css +24 -24
- package/web-ui.html +17 -17
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
<!-- Provider 配置模式(Codex) -->
|
|
2
|
+
<div
|
|
3
|
+
v-show="mainTab === 'config' && isProviderConfigMode"
|
|
4
|
+
class="mode-content mode-cards"
|
|
5
|
+
id="panel-config-provider"
|
|
6
|
+
role="tabpanel"
|
|
7
|
+
:aria-labelledby="forceCompactLayout ? 'tab-config' : ('side-tab-config-' + configMode)">
|
|
8
|
+
<div v-if="forceCompactLayout && !sessionStandalone" class="segmented-control">
|
|
9
|
+
<button type="button" :class="['segment', { active: configMode === 'codex' }]" @click="switchConfigMode('codex')">{{ t('tab.config.codex') }}</button>
|
|
10
|
+
<button type="button" :class="['segment', { active: configMode === 'claude' }]" @click="switchConfigMode('claude')">{{ t('tab.config.claude') }}</button>
|
|
11
|
+
<button type="button" :class="['segment', { active: configMode === 'openclaw' }]" @click="switchConfigMode('openclaw')">{{ t('tab.config.openclaw') }}</button>
|
|
12
|
+
</div>
|
|
13
|
+
<template v-if="isCodexConfigMode && shouldShowCliInstallPlaceholder('codex')">
|
|
14
|
+
<div class="selector-section">
|
|
15
|
+
<div class="empty-state">
|
|
16
|
+
<div class="empty-state-title">{{ t('cli.missing.title', { name: 'Codex' }) }}</div>
|
|
17
|
+
<div class="empty-state-subtitle">{{ t('cli.missing.subtitle', { name: 'Codex' }) }}</div>
|
|
18
|
+
<div class="docs-command-row">
|
|
19
|
+
<div class="docs-command-box" role="group" :aria-label="t('cli.missing.commandAria', { name: 'Codex' })">
|
|
20
|
+
<code class="install-command">{{ getInstallCommand('codex', 'install') }}</code>
|
|
21
|
+
<button
|
|
22
|
+
type="button"
|
|
23
|
+
class="btn-mini docs-copy-btn"
|
|
24
|
+
:disabled="!getInstallCommand('codex', 'install')"
|
|
25
|
+
@click="copyInstallCommand(getInstallCommand('codex', 'install'))">{{ t('common.copy') }}</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<button type="button" class="btn-tool btn-tool-compact" @click="mainTab = 'docs'; setInstallCommandAction('install')">{{ t('cli.missing.openDocs') }}</button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
<template v-else>
|
|
33
|
+
<!-- 添加提供商按钮 -->
|
|
34
|
+
<button class="btn-add" @click="showAddModal = true" v-if="!loading && !initError">
|
|
35
|
+
<svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
|
|
36
|
+
<path d="M10 4v12M4 10h12"/>
|
|
37
|
+
</svg>
|
|
38
|
+
{{ t('config.addProvider') }}
|
|
39
|
+
</button>
|
|
40
|
+
|
|
41
|
+
<!-- 服务预设 -->
|
|
42
|
+
<div class="selector-section" v-if="isCodexConfigMode && codexProviderTemplates.length">
|
|
43
|
+
<div class="selector-header">
|
|
44
|
+
<span class="selector-title">{{ t('config.providerTemplate.title') }}</span>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="btn-group" style="flex-wrap: wrap; gap: 8px; margin-top: 0;">
|
|
47
|
+
<button
|
|
48
|
+
v-for="tpl in codexProviderTemplates"
|
|
49
|
+
:key="tpl.name"
|
|
50
|
+
type="button"
|
|
51
|
+
class="btn-mini"
|
|
52
|
+
@click="newProvider.name = tpl.name;
|
|
53
|
+
newProvider.url = tpl.url;
|
|
54
|
+
newProvider._suggestedModel = tpl.model || '';
|
|
55
|
+
newProvider.useTransform = !!tpl.useTransform;
|
|
56
|
+
showAddModal = true">
|
|
57
|
+
{{ tpl.label }}
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<!-- 模型选择器 -->
|
|
63
|
+
<div class="selector-section">
|
|
64
|
+
<div class="selector-header">
|
|
65
|
+
<span class="selector-title">{{ t('config.models') }}</span>
|
|
66
|
+
<div class="selector-actions">
|
|
67
|
+
<button class="btn-icon" @click="showModelModal = true" :aria-label="t('modal.modelAdd.title')" :title="t('modal.modelAdd.title')" v-if="modelsSource === 'legacy'">+</button>
|
|
68
|
+
<button class="btn-icon" @click="showModelListModal = true" :aria-label="t('modal.modelManage.title')" :title="t('modal.modelManage.title')" v-if="modelsSource === 'legacy'">≡</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<select
|
|
72
|
+
v-if="codexModelsLoading || modelsSource === 'remote'"
|
|
73
|
+
class="model-select"
|
|
74
|
+
v-model="currentModel"
|
|
75
|
+
@change="onModelChange"
|
|
76
|
+
:disabled="codexModelsLoading"
|
|
77
|
+
>
|
|
78
|
+
<option v-if="codexModelsLoading" value="">{{ t('config.modelLoading') }}</option>
|
|
79
|
+
<option v-else v-for="model in codexModelOptions" :key="model" :value="model">{{ model }}</option>
|
|
80
|
+
</select>
|
|
81
|
+
<input
|
|
82
|
+
v-if="!codexModelsLoading && (modelsSource !== 'remote' || !modelsHasCurrent)"
|
|
83
|
+
class="model-input"
|
|
84
|
+
v-model="currentModel"
|
|
85
|
+
@blur="onModelChange"
|
|
86
|
+
@keyup.enter="onModelChange"
|
|
87
|
+
:placeholder="activeProviderModelPlaceholder"
|
|
88
|
+
:list="codexModelHasList ? 'codex-model-options' : null"
|
|
89
|
+
>
|
|
90
|
+
<datalist v-if="codexModelHasList" id="codex-model-options">
|
|
91
|
+
<option v-for="model in codexModelOptions" :key="model" :value="model"></option>
|
|
92
|
+
</datalist>
|
|
93
|
+
<div class="config-template-hint" v-if="modelsSource === 'unlimited'">
|
|
94
|
+
{{ t('config.models.unlimited') }}
|
|
95
|
+
</div>
|
|
96
|
+
<div class="config-template-hint" v-if="modelsSource === 'error'">
|
|
97
|
+
{{ t('config.models.error') }}
|
|
98
|
+
</div>
|
|
99
|
+
<div class="config-template-hint" v-if="modelsSource === 'remote' && !modelsHasCurrent">
|
|
100
|
+
{{ isCodexConfigMode ? t('config.models.notInList.codex') : t('config.models.notInList.other') }}
|
|
101
|
+
</div>
|
|
102
|
+
<div class="config-template-hint" v-if="isCodexConfigMode">
|
|
103
|
+
{{ t('config.template.editFirst') }}
|
|
104
|
+
</div>
|
|
105
|
+
<div class="config-template-hint" v-else-if="activeProviderBridgeHint">
|
|
106
|
+
{{ t('config.template.bridgeCodexOnly', { hint: activeProviderBridgeHint }) }}
|
|
107
|
+
</div>
|
|
108
|
+
<button class="btn-tool btn-template-editor" v-if="isCodexConfigMode" @click="openConfigTemplateEditor" :disabled="loading || !!initError">
|
|
109
|
+
{{ t('config.template.openEditor') }}
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<template v-if="isCodexConfigMode">
|
|
114
|
+
<div class="selector-section">
|
|
115
|
+
<div class="selector-header">
|
|
116
|
+
<span class="selector-title">{{ t('config.serviceTier') }}</span>
|
|
117
|
+
</div>
|
|
118
|
+
<select class="model-select" v-model="serviceTier" @change="onServiceTierChange">
|
|
119
|
+
<option value="fast">{{ t('config.serviceTier.fast') }}</option>
|
|
120
|
+
<option value="standard">{{ t('config.serviceTier.standard') }}</option>
|
|
121
|
+
</select>
|
|
122
|
+
<div class="config-template-hint">
|
|
123
|
+
{{ t('config.serviceTier.hint', { field: 'service_tier' }) }}
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="selector-section">
|
|
128
|
+
<div class="selector-header">
|
|
129
|
+
<span class="selector-title">{{ t('config.reasoningEffort') }}</span>
|
|
130
|
+
</div>
|
|
131
|
+
<select class="model-select" v-model="modelReasoningEffort" @change="onReasoningEffortChange">
|
|
132
|
+
<option value="high">high</option>
|
|
133
|
+
<option value="medium">{{ t('config.reasoningEffort.medium') }}</option>
|
|
134
|
+
<option value="low">low</option>
|
|
135
|
+
<option value="xhigh">xhigh</option>
|
|
136
|
+
</select>
|
|
137
|
+
<div class="config-template-hint">
|
|
138
|
+
{{ t('config.reasoningEffort.hint') }}
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<div class="selector-section">
|
|
143
|
+
<div class="selector-header">
|
|
144
|
+
<span class="selector-title">{{ t('config.contextBudget') }}</span>
|
|
145
|
+
<div class="selector-actions">
|
|
146
|
+
<button
|
|
147
|
+
class="btn-tool btn-tool-compact"
|
|
148
|
+
@click="resetCodexContextBudgetDefaults"
|
|
149
|
+
:disabled="loading || !!initError || codexApplying">
|
|
150
|
+
{{ t('config.reset') }}
|
|
151
|
+
</button>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="codex-config-grid">
|
|
155
|
+
<div class="form-group codex-config-field">
|
|
156
|
+
<label class="form-label" for="codex-model-context-window">model_context_window</label>
|
|
157
|
+
<input
|
|
158
|
+
id="codex-model-context-window"
|
|
159
|
+
v-model="modelContextWindowInput"
|
|
160
|
+
class="form-input"
|
|
161
|
+
inputmode="numeric"
|
|
162
|
+
autocomplete="off"
|
|
163
|
+
:placeholder="t('config.example', { value: 190000 })"
|
|
164
|
+
@focus="editingCodexBudgetField = 'modelContextWindowInput'"
|
|
165
|
+
@input="sanitizePositiveIntegerDraft('modelContextWindowInput')"
|
|
166
|
+
@blur="onModelContextWindowBlur"
|
|
167
|
+
@keydown.enter.prevent="onModelContextWindowBlur">
|
|
168
|
+
<div class="form-hint">{{ t('config.contextWindow.hint') }}</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="form-group codex-config-field">
|
|
171
|
+
<label class="form-label" for="codex-model-auto-compact-token-limit">model_auto_compact_token_limit</label>
|
|
172
|
+
<input
|
|
173
|
+
id="codex-model-auto-compact-token-limit"
|
|
174
|
+
v-model="modelAutoCompactTokenLimitInput"
|
|
175
|
+
class="form-input"
|
|
176
|
+
inputmode="numeric"
|
|
177
|
+
autocomplete="off"
|
|
178
|
+
:placeholder="t('config.example', { value: 185000 })"
|
|
179
|
+
@focus="editingCodexBudgetField = 'modelAutoCompactTokenLimitInput'"
|
|
180
|
+
@input="sanitizePositiveIntegerDraft('modelAutoCompactTokenLimitInput')"
|
|
181
|
+
@blur="onModelAutoCompactTokenLimitBlur"
|
|
182
|
+
@keydown.enter.prevent="onModelAutoCompactTokenLimitBlur">
|
|
183
|
+
<div class="form-hint">{{ t('config.autoCompact.hint') }}</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<div class="selector-section">
|
|
189
|
+
<div class="selector-header">
|
|
190
|
+
<span class="selector-title">AGENTS.md</span>
|
|
191
|
+
</div>
|
|
192
|
+
<button class="btn-tool" @click="openAgentsEditor" :disabled="loading || !!initError || agentsLoading">
|
|
193
|
+
{{ agentsLoading ? t('config.modelLoading') : t('config.agents.open') }}
|
|
194
|
+
</button>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
<div class="selector-section">
|
|
198
|
+
<div class="selector-header">
|
|
199
|
+
<span class="selector-title">{{ t('config.health.title') }}</span>
|
|
200
|
+
</div>
|
|
201
|
+
<button class="btn-tool" @click="runHealthCheck" :disabled="healthCheckLoading || loading || !!initError">
|
|
202
|
+
{{ healthCheckLoading ? t('config.health.running') : t('config.health.run') }}
|
|
203
|
+
</button>
|
|
204
|
+
<div class="config-template-hint">{{ t('config.health.hint') }}</div>
|
|
205
|
+
<div v-if="healthCheckLoading && healthCheckBatchTotal" class="config-template-hint">
|
|
206
|
+
{{ t('config.health.progress', { done: healthCheckBatchDone, total: healthCheckBatchTotal, failed: healthCheckBatchFailed }) }}
|
|
207
|
+
</div>
|
|
208
|
+
<div v-if="healthCheckResult && !healthCheckLoading" class="config-template-hint">
|
|
209
|
+
{{ healthCheckResult.ok ? t('config.health.ok') : t('config.health.fail') }} · {{ t('config.health.issues', { count: (healthCheckResult.issues || []).length }) }}
|
|
210
|
+
</div>
|
|
211
|
+
<button v-if="healthCheckResult && !healthCheckLoading" type="button" class="btn-mini" @click="showHealthCheckModal = true">
|
|
212
|
+
{{ t('common.detail') }}
|
|
213
|
+
</button>
|
|
214
|
+
<div v-if="healthCheckResult && !healthCheckLoading && (healthCheckResult.issues || []).length">
|
|
215
|
+
<div v-for="(issue, index) in healthCheckResult.issues" :key="issue.code || ('issue-' + index)" class="config-template-hint">
|
|
216
|
+
{{ issue.message || issue.code || '' }}<span v-if="issue.suggestion"> · {{ issue.suggestion }}</span>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
</template>
|
|
222
|
+
|
|
223
|
+
<div v-if="!loading && !initError" class="card-list">
|
|
224
|
+
<div v-for="provider in displayProvidersList" :key="provider.name"
|
|
225
|
+
:class="['card', { active: displayCurrentProvider === provider.name }]"
|
|
226
|
+
@click="switchProvider(provider.name)"
|
|
227
|
+
@keydown.enter.self.prevent="switchProvider(provider.name)"
|
|
228
|
+
@keydown.space.self.prevent="switchProvider(provider.name)"
|
|
229
|
+
tabindex="0"
|
|
230
|
+
role="button"
|
|
231
|
+
:aria-current="displayCurrentProvider === provider.name ? 'true' : null">
|
|
232
|
+
<div class="card-leading">
|
|
233
|
+
<div class="card-icon">{{ provider.name.charAt(0).toUpperCase() }}<span v-if="isTransformProvider(provider)" class="card-icon-dot" title="通过内建转换适配"></span></div>
|
|
234
|
+
<div class="card-content">
|
|
235
|
+
<div class="card-title">
|
|
236
|
+
<span>{{ provider.name }}</span>
|
|
237
|
+
<span v-if="provider.readOnly" class="provider-readonly-badge">{{ t('config.badge.system') }}</span>
|
|
238
|
+
</div>
|
|
239
|
+
<div v-if="provider.name !== 'local'" class="card-subtitle card-subtitle-model">
|
|
240
|
+
{{ activeProviderModel(provider.name) || t('config.model.unset') }}
|
|
241
|
+
</div>
|
|
242
|
+
<div v-if="provider.name !== 'local'" class="card-subtitle card-subtitle-url">
|
|
243
|
+
{{ displayProviderUrl(provider) || t('config.url.unset') }}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
<div class="card-trailing">
|
|
248
|
+
<span v-if="speedResults[provider.name]" :class="['latency', speedResults[provider.name].ok ? 'ok' : 'error']">
|
|
249
|
+
{{ formatLatency(speedResults[provider.name]) }}
|
|
250
|
+
</span>
|
|
251
|
+
<span :class="['pill', providerPillConfigured(provider) ? 'configured' : 'empty']">
|
|
252
|
+
{{ providerPillText(provider) }}
|
|
253
|
+
</span>
|
|
254
|
+
<div class="card-actions" @click.stop>
|
|
255
|
+
<button
|
|
256
|
+
class="card-action-btn"
|
|
257
|
+
:class="{ loading: speedLoading[provider.name] }"
|
|
258
|
+
:disabled="!!speedLoading[provider.name]"
|
|
259
|
+
@click="runSpeedTest(provider.name, { silent: true })"
|
|
260
|
+
:aria-label="t('config.availabilityTestAria', { name: provider.name })"
|
|
261
|
+
:title="t('config.availabilityTest')"
|
|
262
|
+
>
|
|
263
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
264
|
+
<path d="M13 2L3 14h7l-1 8 12-14h-7l1-6z"/>
|
|
265
|
+
</svg>
|
|
266
|
+
</button>
|
|
267
|
+
<button
|
|
268
|
+
v-if="!provider.readOnly"
|
|
269
|
+
class="card-action-btn"
|
|
270
|
+
:class="{ loading: providerShareLoading[provider.name], disabled: !shouldAllowProviderShare(provider) }"
|
|
271
|
+
:disabled="providerShareLoading[provider.name] || !shouldAllowProviderShare(provider)"
|
|
272
|
+
@click="copyProviderShareCommand(provider)"
|
|
273
|
+
:title="shouldAllowProviderShare(provider) ? t('config.shareCommand') : t('config.shareDisabled')"
|
|
274
|
+
:aria-label="t('config.shareCommand.aria')">
|
|
275
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
276
|
+
<path d="M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7"/>
|
|
277
|
+
<path d="M16 6l-4-4-4 4"/>
|
|
278
|
+
<path d="M12 2v14"/>
|
|
279
|
+
</svg>
|
|
280
|
+
</button>
|
|
281
|
+
<button
|
|
282
|
+
v-if="!provider.readOnly"
|
|
283
|
+
class="card-action-btn"
|
|
284
|
+
:class="{ disabled: !shouldShowProviderEdit(provider) }"
|
|
285
|
+
:disabled="!shouldShowProviderEdit(provider)"
|
|
286
|
+
@click="openEditModal(provider)"
|
|
287
|
+
:aria-label="t('config.provider.edit.aria', { name: provider.name })"
|
|
288
|
+
:title="shouldShowProviderEdit(provider) ? t('common.edit') : t('common.notEditable')">
|
|
289
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
290
|
+
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
|
291
|
+
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
|
292
|
+
</svg>
|
|
293
|
+
</button>
|
|
294
|
+
<button
|
|
295
|
+
v-if="!provider.readOnly"
|
|
296
|
+
class="card-action-btn"
|
|
297
|
+
@click="openCloneProviderModal(provider)"
|
|
298
|
+
:aria-label="t('config.provider.clone.aria', { name: provider.name })"
|
|
299
|
+
:title="t('config.provider.clone')">
|
|
300
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
301
|
+
<rect x="9" y="9" width="13" height="13" rx="2"/>
|
|
302
|
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
|
|
303
|
+
</svg>
|
|
304
|
+
</button>
|
|
305
|
+
<button
|
|
306
|
+
v-if="!provider.readOnly"
|
|
307
|
+
class="card-action-btn delete"
|
|
308
|
+
:class="{ disabled: !shouldShowProviderDelete(provider) }"
|
|
309
|
+
:disabled="!shouldShowProviderDelete(provider)"
|
|
310
|
+
@click="deleteProvider(provider.name)"
|
|
311
|
+
:aria-label="t('config.provider.delete.aria', { name: provider.name })"
|
|
312
|
+
:title="shouldShowProviderDelete(provider) ? t('common.delete') : t('common.notDeletable')">
|
|
313
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
314
|
+
<path d="M3 6h18"/>
|
|
315
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
|
|
316
|
+
</svg>
|
|
317
|
+
</button>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<div v-if="displayCurrentProvider === 'local'" class="local-bridge-panel" style="margin-top:12px;padding:12px;background:var(--card-bg);border-radius:8px;border:1px solid var(--border-color)">
|
|
324
|
+
<div style="font-size:13px;font-weight:600;margin-bottom:8px;color:var(--text-secondary)">轮询池 — 勾选参与负载均衡的提供商</div>
|
|
325
|
+
<div v-if="localBridgeCandidateProviders().length === 0" style="font-size:12px;color:var(--text-muted)">暂无可用上游 provider,请先添加直连 provider</div>
|
|
326
|
+
<label v-for="cp in localBridgeCandidateProviders()" :key="cp.name"
|
|
327
|
+
style="display:flex;align-items:center;gap:8px;padding:6px 0;cursor:pointer;font-size:13px">
|
|
328
|
+
<input type="checkbox"
|
|
329
|
+
:checked="!isLocalBridgeExcluded(cp.name)"
|
|
330
|
+
@change="toggleLocalBridgeExcluded(cp.name)"
|
|
331
|
+
style="accent-color:var(--accent-color)" />
|
|
332
|
+
<span>{{ cp.name }}</span>
|
|
333
|
+
</label>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
</template>
|
|
337
|
+
</div>
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
<!-- OpenClaw 配置模式 -->
|
|
2
|
-
<div
|
|
3
|
-
v-show="mainTab === 'config' && configMode === 'openclaw'"
|
|
4
|
-
class="mode-content mode-cards"
|
|
5
|
-
id="panel-config-openclaw"
|
|
6
|
-
role="tabpanel"
|
|
7
|
-
:aria-labelledby="forceCompactLayout ? 'tab-config' : 'side-tab-config-openclaw'">
|
|
8
|
-
<div v-if="forceCompactLayout && !sessionStandalone" class="segmented-control">
|
|
9
|
-
<button type="button" :class="['segment', { active: configMode === 'codex' }]" @click="switchConfigMode('codex')">{{ t('tab.config.codex') }}</button>
|
|
10
|
-
<button type="button" :class="['segment', { active: configMode === 'claude' }]" @click="switchConfigMode('claude')">{{ t('tab.config.claude') }}</button>
|
|
11
|
-
<button type="button" :class="['segment', { active: configMode === 'openclaw' }]" @click="switchConfigMode('openclaw')">{{ t('tab.config.openclaw') }}</button>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="config-template-hint">
|
|
14
|
-
{{ t('openclaw.applyHint') }}
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div class="selector-section">
|
|
18
|
-
<div class="selector-header">
|
|
19
|
-
<span class="selector-title">AGENTS.md</span>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="config-template-hint">
|
|
22
|
-
{{ t('openclaw.agents.hint') }}
|
|
23
|
-
</div>
|
|
24
|
-
<button class="btn-tool" @click="openOpenclawAgentsEditor" :disabled="loading || !!initError || agentsLoading">
|
|
25
|
-
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.agents.open') }}
|
|
26
|
-
</button>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div class="selector-section">
|
|
30
|
-
<div class="selector-header">
|
|
31
|
-
<label class="selector-title" for="openclaw-workspace-file">{{ t('openclaw.workspaceFile') }}</label>
|
|
32
|
-
</div>
|
|
33
|
-
<input
|
|
34
|
-
id="openclaw-workspace-file"
|
|
35
|
-
class="form-input"
|
|
36
|
-
v-model="openclawWorkspaceFileName"
|
|
37
|
-
:placeholder="t('openclaw.workspace.placeholder')">
|
|
38
|
-
<div class="config-template-hint">
|
|
39
|
-
{{ t('openclaw.workspace.hint') }}
|
|
40
|
-
</div>
|
|
41
|
-
<button class="btn-tool" @click="openOpenclawWorkspaceEditor" :disabled="loading || !!initError || agentsLoading">
|
|
42
|
-
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.workspace.open') }}
|
|
43
|
-
</button>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="card-list">
|
|
47
|
-
<div v-for="(config, name) in openclawConfigs" :key="name"
|
|
48
|
-
:class="['card', { active: currentOpenclawConfig === name }]"
|
|
49
|
-
@click="applyOpenclawConfig(name)"
|
|
50
|
-
@keydown.enter.self.prevent="applyOpenclawConfig(name)"
|
|
51
|
-
@keydown.space.self.prevent="applyOpenclawConfig(name)"
|
|
52
|
-
tabindex="0"
|
|
53
|
-
role="button"
|
|
54
|
-
:aria-current="currentOpenclawConfig === name ? 'true' : null">
|
|
55
|
-
<div class="card-leading">
|
|
56
|
-
<div class="card-icon">{{ name.charAt(0).toUpperCase() }}</div>
|
|
57
|
-
<div class="card-content">
|
|
58
|
-
<div class="card-title">{{ name }}</div>
|
|
59
|
-
<div class="card-subtitle">{{ openclawSubtitle(config) }}</div>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="card-trailing">
|
|
63
|
-
<span :class="['pill', openclawHasContent(config) ? 'configured' : 'empty']">
|
|
64
|
-
{{ openclawHasContent(config) ? t('openclaw.configured') : t('openclaw.notConfigured') }}
|
|
65
|
-
</span>
|
|
66
|
-
<div class="card-actions" @click.stop>
|
|
67
|
-
<button class="card-action-btn" @click="openOpenclawEditModal(name)" :aria-label="t('openclaw.action.editAria', { name })" :title="t('openclaw.action.edit')">
|
|
68
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
69
|
-
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
|
70
|
-
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
|
71
|
-
</svg>
|
|
72
|
-
</button>
|
|
73
|
-
<button v-if="name !== '默认配置'" class="card-action-btn delete" @click="deleteOpenclawConfig(name)" :aria-label="t('openclaw.action.deleteAria', { name })" :title="t('openclaw.action.delete')">
|
|
74
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
75
|
-
<path d="M3 6h18"/>
|
|
76
|
-
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
|
|
77
|
-
</svg>
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
1
|
+
<!-- OpenClaw 配置模式 -->
|
|
2
|
+
<div
|
|
3
|
+
v-show="mainTab === 'config' && configMode === 'openclaw'"
|
|
4
|
+
class="mode-content mode-cards"
|
|
5
|
+
id="panel-config-openclaw"
|
|
6
|
+
role="tabpanel"
|
|
7
|
+
:aria-labelledby="forceCompactLayout ? 'tab-config' : 'side-tab-config-openclaw'">
|
|
8
|
+
<div v-if="forceCompactLayout && !sessionStandalone" class="segmented-control">
|
|
9
|
+
<button type="button" :class="['segment', { active: configMode === 'codex' }]" @click="switchConfigMode('codex')">{{ t('tab.config.codex') }}</button>
|
|
10
|
+
<button type="button" :class="['segment', { active: configMode === 'claude' }]" @click="switchConfigMode('claude')">{{ t('tab.config.claude') }}</button>
|
|
11
|
+
<button type="button" :class="['segment', { active: configMode === 'openclaw' }]" @click="switchConfigMode('openclaw')">{{ t('tab.config.openclaw') }}</button>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="config-template-hint">
|
|
14
|
+
{{ t('openclaw.applyHint') }}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div class="selector-section">
|
|
18
|
+
<div class="selector-header">
|
|
19
|
+
<span class="selector-title">AGENTS.md</span>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="config-template-hint">
|
|
22
|
+
{{ t('openclaw.agents.hint') }}
|
|
23
|
+
</div>
|
|
24
|
+
<button class="btn-tool" @click="openOpenclawAgentsEditor" :disabled="loading || !!initError || agentsLoading">
|
|
25
|
+
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.agents.open') }}
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="selector-section">
|
|
30
|
+
<div class="selector-header">
|
|
31
|
+
<label class="selector-title" for="openclaw-workspace-file">{{ t('openclaw.workspaceFile') }}</label>
|
|
32
|
+
</div>
|
|
33
|
+
<input
|
|
34
|
+
id="openclaw-workspace-file"
|
|
35
|
+
class="form-input"
|
|
36
|
+
v-model="openclawWorkspaceFileName"
|
|
37
|
+
:placeholder="t('openclaw.workspace.placeholder')">
|
|
38
|
+
<div class="config-template-hint">
|
|
39
|
+
{{ t('openclaw.workspace.hint') }}
|
|
40
|
+
</div>
|
|
41
|
+
<button class="btn-tool" @click="openOpenclawWorkspaceEditor" :disabled="loading || !!initError || agentsLoading">
|
|
42
|
+
{{ agentsLoading ? t('config.modelLoading') : t('openclaw.workspace.open') }}
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="card-list">
|
|
47
|
+
<div v-for="(config, name) in openclawConfigs" :key="name"
|
|
48
|
+
:class="['card', { active: currentOpenclawConfig === name }]"
|
|
49
|
+
@click="applyOpenclawConfig(name)"
|
|
50
|
+
@keydown.enter.self.prevent="applyOpenclawConfig(name)"
|
|
51
|
+
@keydown.space.self.prevent="applyOpenclawConfig(name)"
|
|
52
|
+
tabindex="0"
|
|
53
|
+
role="button"
|
|
54
|
+
:aria-current="currentOpenclawConfig === name ? 'true' : null">
|
|
55
|
+
<div class="card-leading">
|
|
56
|
+
<div class="card-icon">{{ name.charAt(0).toUpperCase() }}</div>
|
|
57
|
+
<div class="card-content">
|
|
58
|
+
<div class="card-title">{{ name }}</div>
|
|
59
|
+
<div class="card-subtitle">{{ openclawSubtitle(config) }}</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="card-trailing">
|
|
63
|
+
<span :class="['pill', openclawHasContent(config) ? 'configured' : 'empty']">
|
|
64
|
+
{{ openclawHasContent(config) ? t('openclaw.configured') : t('openclaw.notConfigured') }}
|
|
65
|
+
</span>
|
|
66
|
+
<div class="card-actions" @click.stop>
|
|
67
|
+
<button class="card-action-btn" @click="openOpenclawEditModal(name)" :aria-label="t('openclaw.action.editAria', { name })" :title="t('openclaw.action.edit')">
|
|
68
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
69
|
+
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
|
|
70
|
+
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
|
|
71
|
+
</svg>
|
|
72
|
+
</button>
|
|
73
|
+
<button v-if="name !== '默认配置'" class="card-action-btn delete" @click="deleteOpenclawConfig(name)" :aria-label="t('openclaw.action.deleteAria', { name })" :title="t('openclaw.action.delete')">
|
|
74
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
75
|
+
<path d="M3 6h18"/>
|
|
76
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
|
|
77
|
+
</svg>
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|