codexmate 0.0.40 → 0.0.41
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 -156
- package/README.zh.md +168 -156
- 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 +16458 -16341
- 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 +591 -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 +1140 -1140
- package/web-ui/modules/i18n/locales/ja.mjs +1130 -1130
- package/web-ui/modules/i18n/locales/vi.mjs +239 -239
- package/web-ui/modules/i18n/locales/zh.mjs +1143 -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 +319 -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 +7666 -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,263 +1,263 @@
|
|
|
1
|
-
<!-- 添加提供商模态框 -->
|
|
2
|
-
<div v-if="showAddModal" class="modal-overlay" @click.self="closeAddModal">
|
|
3
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-provider-modal-title">
|
|
4
|
-
<div class="modal-title" id="add-provider-modal-title">{{ t('modal.providerAdd.title') }}</div>
|
|
5
|
-
|
|
6
|
-
<div class="form-group">
|
|
7
|
-
<label class="form-label">{{ t('field.name') }}</label>
|
|
8
|
-
<input
|
|
9
|
-
v-model="newProvider.name"
|
|
10
|
-
:class="['form-input', { invalid: !!providerFieldError('add', 'name') }]"
|
|
11
|
-
:placeholder="t('placeholder.providerNameExample')"
|
|
12
|
-
autocomplete="off"
|
|
13
|
-
spellcheck="false"
|
|
14
|
-
@blur="normalizeProviderDraft('add')">
|
|
15
|
-
<div v-if="providerFieldError('add', 'name')" class="form-hint form-error">{{ providerFieldError('add', 'name') }}</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="form-group">
|
|
18
|
-
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
19
|
-
<input
|
|
20
|
-
v-model="newProvider.url"
|
|
21
|
-
:class="['form-input', { invalid: !!providerFieldError('add', 'url') }]"
|
|
22
|
-
:placeholder="t('placeholder.apiEndpointExample')"
|
|
23
|
-
autocomplete="off"
|
|
24
|
-
spellcheck="false"
|
|
25
|
-
@blur="normalizeProviderDraft('add')">
|
|
26
|
-
<div v-if="providerFieldError('add', 'url')" class="form-hint form-error">{{ providerFieldError('add', 'url') }}</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="form-group">
|
|
29
|
-
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
30
|
-
<input
|
|
31
|
-
v-model="newProvider.model"
|
|
32
|
-
:class="['form-input', { invalid: !!providerFieldError('add', 'model') }]"
|
|
33
|
-
:placeholder="t('placeholder.modelExample')"
|
|
34
|
-
autocomplete="off"
|
|
35
|
-
spellcheck="false"
|
|
36
|
-
@blur="normalizeProviderDraft('add')">
|
|
37
|
-
<div v-if="providerFieldError('add', 'model')" class="form-hint form-error">{{ providerFieldError('add', 'model') }}</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="form-group">
|
|
40
|
-
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
41
|
-
<div class="input-with-toggle">
|
|
42
|
-
<input v-model="newProvider.key" :class="['form-input', { invalid: !!providerFieldError('add', 'key') }]" :type="showAddProviderKey ? 'text' : 'password'" placeholder="sk-..." autocomplete="off" spellcheck="false" @blur="normalizeProviderDraft('add')">
|
|
43
|
-
<button type="button" class="input-toggle-btn" @click="toggleAddProviderKey" :title="showAddProviderKey ? t('common.hide') : t('common.show')" :aria-label="showAddProviderKey ? t('common.hide') : t('common.show')">
|
|
44
|
-
<svg v-if="!showAddProviderKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
45
|
-
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
46
|
-
</button>
|
|
47
|
-
</div>
|
|
48
|
-
<div v-if="providerFieldError('add', 'key')" class="form-hint form-error">{{ providerFieldError('add', 'key') }}</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="form-group">
|
|
51
|
-
<label class="form-label">
|
|
52
|
-
<input type="checkbox" v-model="newProvider.useTransform">
|
|
53
|
-
{{ t('field.useBuiltinTransform') }}
|
|
54
|
-
</label>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div class="btn-group">
|
|
58
|
-
<button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
|
|
59
|
-
<button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<!-- 编辑提供商模态框 -->
|
|
65
|
-
<div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
|
|
66
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
|
|
67
|
-
<div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
|
|
68
|
-
|
|
69
|
-
<div class="form-group">
|
|
70
|
-
<label class="form-label">{{ t('field.name') }}</label>
|
|
71
|
-
<input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="form-group">
|
|
74
|
-
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
75
|
-
<input
|
|
76
|
-
v-model="editingProvider.url"
|
|
77
|
-
:class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
|
|
78
|
-
:placeholder="t('placeholder.apiEndpointExample')"
|
|
79
|
-
autocomplete="off"
|
|
80
|
-
spellcheck="false"
|
|
81
|
-
@blur="normalizeProviderDraft('edit')">
|
|
82
|
-
<div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="form-group">
|
|
85
|
-
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
86
|
-
<div class="input-with-toggle">
|
|
87
|
-
<input v-model="editingProvider.key" class="form-input" :type="showEditProviderKey ? 'text' : 'password'" placeholder="sk-..." autocomplete="off" spellcheck="false">
|
|
88
|
-
<button type="button" class="input-toggle-btn" @click="toggleEditProviderKey" :title="showEditProviderKey ? t('common.hide') : t('common.show')" :aria-label="showEditProviderKey ? t('common.hide') : t('common.show')">
|
|
89
|
-
<svg v-if="!showEditProviderKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
90
|
-
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
91
|
-
</button>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<div class="btn-group">
|
|
96
|
-
<button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
|
|
97
|
-
<button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<!-- 添加模型模态框 -->
|
|
103
|
-
<div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
|
|
104
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
|
|
105
|
-
<div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
|
|
106
|
-
|
|
107
|
-
<div class="form-group">
|
|
108
|
-
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
109
|
-
<input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
<div class="btn-group">
|
|
113
|
-
<button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
|
|
114
|
-
<button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<!-- 模型列表模态框 -->
|
|
120
|
-
<div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
|
|
121
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
|
|
122
|
-
<div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
|
|
123
|
-
|
|
124
|
-
<div class="model-list">
|
|
125
|
-
<div v-for="model in models" :key="model" class="model-item">
|
|
126
|
-
<span>{{ model }}</span>
|
|
127
|
-
<button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div class="btn-group">
|
|
132
|
-
<button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<!-- 添加Claude配置模态框 -->
|
|
138
|
-
<div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
|
|
139
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
|
|
140
|
-
<div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
|
|
141
|
-
|
|
142
|
-
<div class="form-group">
|
|
143
|
-
<label class="form-label">{{ t('field.configName') }}</label>
|
|
144
|
-
<input v-model="newClaudeConfig.name" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'name') }]" :placeholder="t('placeholder.configNameExample')">
|
|
145
|
-
<div v-if="claudeConfigFieldError('add', 'name')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'name') }}</div>
|
|
146
|
-
</div>
|
|
147
|
-
<div class="form-group">
|
|
148
|
-
<label class="form-label">API Key</label>
|
|
149
|
-
<div class="input-with-toggle">
|
|
150
|
-
<input v-model="newClaudeConfig.apiKey" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'apiKey') }]" :type="showAddClaudeConfigKey ? 'text' : 'password'" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
151
|
-
<button type="button" class="input-toggle-btn" @click="toggleAddClaudeConfigKey" :title="showAddClaudeConfigKey ? t('common.hide') : t('common.show')" :aria-label="showAddClaudeConfigKey ? t('common.hide') : t('common.show')">
|
|
152
|
-
<svg v-if="!showAddClaudeConfigKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
153
|
-
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
154
|
-
</button>
|
|
155
|
-
</div>
|
|
156
|
-
<div v-if="claudeConfigFieldError('add', 'apiKey')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'apiKey') }}</div>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="form-group">
|
|
159
|
-
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
160
|
-
<input v-model="newClaudeConfig.baseUrl" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'baseUrl') }]" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
161
|
-
<div v-if="claudeConfigFieldError('add', 'baseUrl')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'baseUrl') }}</div>
|
|
162
|
-
</div>
|
|
163
|
-
<div class="form-group">
|
|
164
|
-
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
165
|
-
<input v-model="newClaudeConfig.model" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'model') }]" :placeholder="t('placeholder.modelExample')" autocomplete="off" spellcheck="false">
|
|
166
|
-
<div v-if="claudeConfigFieldError('add', 'model')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'model') }}</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<div class="btn-group">
|
|
170
|
-
<button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
|
|
171
|
-
<button class="btn btn-confirm" @click="addClaudeConfig" :disabled="!canSubmitClaudeConfig('add')">{{ t('common.add') }}</button>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
|
|
176
|
-
<!-- 编辑Claude配置模态框 -->
|
|
177
|
-
<div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
|
|
178
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
|
|
179
|
-
<div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
|
|
180
|
-
|
|
181
|
-
<div class="form-group">
|
|
182
|
-
<label class="form-label">{{ t('field.configName') }}</label>
|
|
183
|
-
<input v-model="editingConfig.name" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'name') }]" :placeholder="t('field.configName')" readonly>
|
|
184
|
-
<div v-if="claudeConfigFieldError('edit', 'name')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'name') }}</div>
|
|
185
|
-
</div>
|
|
186
|
-
<div class="form-group">
|
|
187
|
-
<label class="form-label">API Key</label>
|
|
188
|
-
<div class="input-with-toggle">
|
|
189
|
-
<input v-model="editingConfig.apiKey" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'apiKey') }]" :type="showEditClaudeConfigKey ? 'text' : 'password'" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
190
|
-
<button type="button" class="input-toggle-btn" @click="toggleEditClaudeConfigKey" :title="showEditClaudeConfigKey ? t('common.hide') : t('common.show')" :aria-label="showEditClaudeConfigKey ? t('common.hide') : t('common.show')">
|
|
191
|
-
<svg v-if="!showEditClaudeConfigKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
192
|
-
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
193
|
-
</button>
|
|
194
|
-
</div>
|
|
195
|
-
<div v-if="claudeConfigFieldError('edit', 'apiKey')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'apiKey') }}</div>
|
|
196
|
-
</div>
|
|
197
|
-
<div class="form-group">
|
|
198
|
-
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
199
|
-
<input v-model="editingConfig.baseUrl" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'baseUrl') }]" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
200
|
-
<div v-if="claudeConfigFieldError('edit', 'baseUrl')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'baseUrl') }}</div>
|
|
201
|
-
</div>
|
|
202
|
-
<div class="form-group">
|
|
203
|
-
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
204
|
-
<input v-model="editingConfig.model" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'model') }]" :placeholder="t('placeholder.modelExample')" autocomplete="off" spellcheck="false">
|
|
205
|
-
<div v-if="claudeConfigFieldError('edit', 'model')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'model') }}</div>
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<div class="btn-group">
|
|
209
|
-
<button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
|
|
210
|
-
<button class="btn btn-confirm" @click="saveAndApplyConfig" :disabled="!canSubmitClaudeConfig('edit')">{{ t('common.saveApply') }}</button>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<!-- Codex bridge pool modal -->
|
|
216
|
-
<div v-if="showCodexBridgePoolModal" class="modal-overlay" @click.self="showCodexBridgePoolModal = false">
|
|
217
|
-
<div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="codex-bridge-pool-modal-title">
|
|
218
|
-
<div class="modal-title" id="codex-bridge-pool-modal-title">
|
|
219
|
-
<svg class="modal-title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><circle cx="6" cy="6" r="2"/><circle cx="18" cy="6" r="2"/><circle cx="12" cy="18" r="2"/><path d="M6 8v4h6v4"/><path d="M18 8v4h-6v4"/></svg>
|
|
220
|
-
{{ t('config.localBridge.poolSettings') }}
|
|
221
|
-
</div>
|
|
222
|
-
<div class="bridge-pool-modal-hint">{{ t('config.localBridge.poolHint') }}</div>
|
|
223
|
-
<div v-if="localBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
|
|
224
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/></svg>
|
|
225
|
-
<span>{{ t('config.localBridge.noProviders') }}</span>
|
|
226
|
-
</div>
|
|
227
|
-
<div v-else class="bridge-pool-list">
|
|
228
|
-
<label v-for="cp in localBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
|
|
229
|
-
<span class="bridge-pool-item-name">{{ cp.name }}</span>
|
|
230
|
-
<span class="bridge-pool-item-status" :class="{ active: !isLocalBridgeExcluded(cp.name) }">{{ isLocalBridgeExcluded(cp.name) ? t('common.disabled') : t('common.enabled') }}</span>
|
|
231
|
-
<input type="checkbox" :checked="!isLocalBridgeExcluded(cp.name)" @change="toggleLocalBridgeExcluded(cp.name)" />
|
|
232
|
-
</label>
|
|
233
|
-
</div>
|
|
234
|
-
<div class="btn-group">
|
|
235
|
-
<button class="btn btn-confirm" @click="showCodexBridgePoolModal = false">{{ t('common.close') }}</button>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
<div v-if="showClaudeBridgePoolModal" class="modal-overlay" @click.self="showClaudeBridgePoolModal = false">
|
|
241
|
-
<div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="claude-bridge-pool-modal-title">
|
|
242
|
-
<div class="modal-title" id="claude-bridge-pool-modal-title">
|
|
243
|
-
<svg class="modal-title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><circle cx="6" cy="6" r="2"/><circle cx="18" cy="6" r="2"/><circle cx="12" cy="18" r="2"/><path d="M6 8v4h6v4"/><path d="M18 8v4h-6v4"/></svg>
|
|
244
|
-
{{ t('claude.localBridge.poolTitle') }}
|
|
245
|
-
</div>
|
|
246
|
-
<div class="bridge-pool-modal-hint">{{ t('claude.localBridge.poolHint') }}</div>
|
|
247
|
-
<div v-if="claudeLocalBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
|
|
248
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/></svg>
|
|
249
|
-
<span>{{ t('claude.localBridge.noProviders') }}</span>
|
|
250
|
-
</div>
|
|
251
|
-
<div v-else class="bridge-pool-list">
|
|
252
|
-
<label v-for="cp in claudeLocalBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
|
|
253
|
-
<span class="bridge-pool-item-name">{{ cp.name }}</span>
|
|
254
|
-
<span class="bridge-pool-item-status" :class="{ active: !isClaudeLocalBridgeExcluded(cp.name) }">{{ isClaudeLocalBridgeExcluded(cp.name) ? t('claude.localBridge.disabled') : t('claude.localBridge.enabled') }}</span>
|
|
255
|
-
<input type="checkbox" :checked="!isClaudeLocalBridgeExcluded(cp.name)" @change="toggleClaudeLocalBridgeExcluded(cp.name)" />
|
|
256
|
-
</label>
|
|
257
|
-
</div>
|
|
258
|
-
<div class="btn-group">
|
|
259
|
-
<button class="btn btn-confirm" @click="showClaudeBridgePoolModal = false">{{ t('common.close') }}</button>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
|
|
1
|
+
<!-- 添加提供商模态框 -->
|
|
2
|
+
<div v-if="showAddModal" class="modal-overlay" @click.self="closeAddModal">
|
|
3
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-provider-modal-title">
|
|
4
|
+
<div class="modal-title" id="add-provider-modal-title">{{ t('modal.providerAdd.title') }}</div>
|
|
5
|
+
|
|
6
|
+
<div class="form-group">
|
|
7
|
+
<label class="form-label">{{ t('field.name') }}</label>
|
|
8
|
+
<input
|
|
9
|
+
v-model="newProvider.name"
|
|
10
|
+
:class="['form-input', { invalid: !!providerFieldError('add', 'name') }]"
|
|
11
|
+
:placeholder="t('placeholder.providerNameExample')"
|
|
12
|
+
autocomplete="off"
|
|
13
|
+
spellcheck="false"
|
|
14
|
+
@blur="normalizeProviderDraft('add')">
|
|
15
|
+
<div v-if="providerFieldError('add', 'name')" class="form-hint form-error">{{ providerFieldError('add', 'name') }}</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="form-group">
|
|
18
|
+
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
19
|
+
<input
|
|
20
|
+
v-model="newProvider.url"
|
|
21
|
+
:class="['form-input', { invalid: !!providerFieldError('add', 'url') }]"
|
|
22
|
+
:placeholder="t('placeholder.apiEndpointExample')"
|
|
23
|
+
autocomplete="off"
|
|
24
|
+
spellcheck="false"
|
|
25
|
+
@blur="normalizeProviderDraft('add')">
|
|
26
|
+
<div v-if="providerFieldError('add', 'url')" class="form-hint form-error">{{ providerFieldError('add', 'url') }}</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="form-group">
|
|
29
|
+
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
30
|
+
<input
|
|
31
|
+
v-model="newProvider.model"
|
|
32
|
+
:class="['form-input', { invalid: !!providerFieldError('add', 'model') }]"
|
|
33
|
+
:placeholder="t('placeholder.modelExample')"
|
|
34
|
+
autocomplete="off"
|
|
35
|
+
spellcheck="false"
|
|
36
|
+
@blur="normalizeProviderDraft('add')">
|
|
37
|
+
<div v-if="providerFieldError('add', 'model')" class="form-hint form-error">{{ providerFieldError('add', 'model') }}</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="form-group">
|
|
40
|
+
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
41
|
+
<div class="input-with-toggle">
|
|
42
|
+
<input v-model="newProvider.key" :class="['form-input', { invalid: !!providerFieldError('add', 'key') }]" :type="showAddProviderKey ? 'text' : 'password'" placeholder="sk-..." autocomplete="off" spellcheck="false" @blur="normalizeProviderDraft('add')">
|
|
43
|
+
<button type="button" class="input-toggle-btn" @click="toggleAddProviderKey" :title="showAddProviderKey ? t('common.hide') : t('common.show')" :aria-label="showAddProviderKey ? t('common.hide') : t('common.show')">
|
|
44
|
+
<svg v-if="!showAddProviderKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
45
|
+
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
<div v-if="providerFieldError('add', 'key')" class="form-hint form-error">{{ providerFieldError('add', 'key') }}</div>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="form-group">
|
|
51
|
+
<label class="form-label">
|
|
52
|
+
<input type="checkbox" v-model="newProvider.useTransform">
|
|
53
|
+
{{ t('field.useBuiltinTransform') }}
|
|
54
|
+
</label>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="btn-group">
|
|
58
|
+
<button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
|
|
59
|
+
<button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<!-- 编辑提供商模态框 -->
|
|
65
|
+
<div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
|
|
66
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
|
|
67
|
+
<div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
|
|
68
|
+
|
|
69
|
+
<div class="form-group">
|
|
70
|
+
<label class="form-label">{{ t('field.name') }}</label>
|
|
71
|
+
<input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="form-group">
|
|
74
|
+
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
75
|
+
<input
|
|
76
|
+
v-model="editingProvider.url"
|
|
77
|
+
:class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
|
|
78
|
+
:placeholder="t('placeholder.apiEndpointExample')"
|
|
79
|
+
autocomplete="off"
|
|
80
|
+
spellcheck="false"
|
|
81
|
+
@blur="normalizeProviderDraft('edit')">
|
|
82
|
+
<div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="form-group">
|
|
85
|
+
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
86
|
+
<div class="input-with-toggle">
|
|
87
|
+
<input v-model="editingProvider.key" class="form-input" :type="showEditProviderKey ? 'text' : 'password'" placeholder="sk-..." autocomplete="off" spellcheck="false">
|
|
88
|
+
<button type="button" class="input-toggle-btn" @click="toggleEditProviderKey" :title="showEditProviderKey ? t('common.hide') : t('common.show')" :aria-label="showEditProviderKey ? t('common.hide') : t('common.show')">
|
|
89
|
+
<svg v-if="!showEditProviderKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
90
|
+
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div class="btn-group">
|
|
96
|
+
<button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
|
|
97
|
+
<button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<!-- 添加模型模态框 -->
|
|
103
|
+
<div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
|
|
104
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
|
|
105
|
+
<div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
|
|
106
|
+
|
|
107
|
+
<div class="form-group">
|
|
108
|
+
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
109
|
+
<input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div class="btn-group">
|
|
113
|
+
<button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
|
|
114
|
+
<button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<!-- 模型列表模态框 -->
|
|
120
|
+
<div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
|
|
121
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
|
|
122
|
+
<div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
|
|
123
|
+
|
|
124
|
+
<div class="model-list">
|
|
125
|
+
<div v-for="model in models" :key="model" class="model-item">
|
|
126
|
+
<span>{{ model }}</span>
|
|
127
|
+
<button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="btn-group">
|
|
132
|
+
<button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<!-- 添加Claude配置模态框 -->
|
|
138
|
+
<div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
|
|
139
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
|
|
140
|
+
<div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
|
|
141
|
+
|
|
142
|
+
<div class="form-group">
|
|
143
|
+
<label class="form-label">{{ t('field.configName') }}</label>
|
|
144
|
+
<input v-model="newClaudeConfig.name" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'name') }]" :placeholder="t('placeholder.configNameExample')">
|
|
145
|
+
<div v-if="claudeConfigFieldError('add', 'name')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'name') }}</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="form-group">
|
|
148
|
+
<label class="form-label">API Key</label>
|
|
149
|
+
<div class="input-with-toggle">
|
|
150
|
+
<input v-model="newClaudeConfig.apiKey" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'apiKey') }]" :type="showAddClaudeConfigKey ? 'text' : 'password'" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
151
|
+
<button type="button" class="input-toggle-btn" @click="toggleAddClaudeConfigKey" :title="showAddClaudeConfigKey ? t('common.hide') : t('common.show')" :aria-label="showAddClaudeConfigKey ? t('common.hide') : t('common.show')">
|
|
152
|
+
<svg v-if="!showAddClaudeConfigKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
153
|
+
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
154
|
+
</button>
|
|
155
|
+
</div>
|
|
156
|
+
<div v-if="claudeConfigFieldError('add', 'apiKey')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'apiKey') }}</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="form-group">
|
|
159
|
+
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
160
|
+
<input v-model="newClaudeConfig.baseUrl" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'baseUrl') }]" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
161
|
+
<div v-if="claudeConfigFieldError('add', 'baseUrl')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'baseUrl') }}</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="form-group">
|
|
164
|
+
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
165
|
+
<input v-model="newClaudeConfig.model" :class="['form-input', { invalid: !!claudeConfigFieldError('add', 'model') }]" :placeholder="t('placeholder.modelExample')" autocomplete="off" spellcheck="false">
|
|
166
|
+
<div v-if="claudeConfigFieldError('add', 'model')" class="form-hint form-error">{{ claudeConfigFieldError('add', 'model') }}</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div class="btn-group">
|
|
170
|
+
<button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
|
|
171
|
+
<button class="btn btn-confirm" @click="addClaudeConfig" :disabled="!canSubmitClaudeConfig('add')">{{ t('common.add') }}</button>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<!-- 编辑Claude配置模态框 -->
|
|
177
|
+
<div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
|
|
178
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
|
|
179
|
+
<div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
|
|
180
|
+
|
|
181
|
+
<div class="form-group">
|
|
182
|
+
<label class="form-label">{{ t('field.configName') }}</label>
|
|
183
|
+
<input v-model="editingConfig.name" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'name') }]" :placeholder="t('field.configName')" readonly>
|
|
184
|
+
<div v-if="claudeConfigFieldError('edit', 'name')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'name') }}</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="form-group">
|
|
187
|
+
<label class="form-label">API Key</label>
|
|
188
|
+
<div class="input-with-toggle">
|
|
189
|
+
<input v-model="editingConfig.apiKey" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'apiKey') }]" :type="showEditClaudeConfigKey ? 'text' : 'password'" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
190
|
+
<button type="button" class="input-toggle-btn" @click="toggleEditClaudeConfigKey" :title="showEditClaudeConfigKey ? t('common.hide') : t('common.show')" :aria-label="showEditClaudeConfigKey ? t('common.hide') : t('common.show')">
|
|
191
|
+
<svg v-if="!showEditClaudeConfigKey" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M10 4C5 4 1.73 8.11 1 10c.73 1.89 4 6 9 6s8.27-4.11 9-6c-.73-1.89-4-6-9-6z"/><circle cx="10" cy="10" r="3"/></svg>
|
|
192
|
+
<svg v-else viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M2 2l16 16M8.2 4.2A9.9 9.9 0 0 1 10 4c5 0 8.27 4.11 9 6-.44.94-1.5 2.7-3.2 4.2M14.5 14.5A5.9 5.9 0 0 1 10 16c-5 0-8.27-4.11-9-6 .76-1.66 2.2-3.6 4.3-5"/></svg>
|
|
193
|
+
</button>
|
|
194
|
+
</div>
|
|
195
|
+
<div v-if="claudeConfigFieldError('edit', 'apiKey')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'apiKey') }}</div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="form-group">
|
|
198
|
+
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
199
|
+
<input v-model="editingConfig.baseUrl" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'baseUrl') }]" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
200
|
+
<div v-if="claudeConfigFieldError('edit', 'baseUrl')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'baseUrl') }}</div>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="form-group">
|
|
203
|
+
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
204
|
+
<input v-model="editingConfig.model" :class="['form-input', { invalid: !!claudeConfigFieldError('edit', 'model') }]" :placeholder="t('placeholder.modelExample')" autocomplete="off" spellcheck="false">
|
|
205
|
+
<div v-if="claudeConfigFieldError('edit', 'model')" class="form-hint form-error">{{ claudeConfigFieldError('edit', 'model') }}</div>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<div class="btn-group">
|
|
209
|
+
<button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
|
|
210
|
+
<button class="btn btn-confirm" @click="saveAndApplyConfig" :disabled="!canSubmitClaudeConfig('edit')">{{ t('common.saveApply') }}</button>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<!-- Codex bridge pool modal -->
|
|
216
|
+
<div v-if="showCodexBridgePoolModal" class="modal-overlay" @click.self="showCodexBridgePoolModal = false">
|
|
217
|
+
<div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="codex-bridge-pool-modal-title">
|
|
218
|
+
<div class="modal-title" id="codex-bridge-pool-modal-title">
|
|
219
|
+
<svg class="modal-title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><circle cx="6" cy="6" r="2"/><circle cx="18" cy="6" r="2"/><circle cx="12" cy="18" r="2"/><path d="M6 8v4h6v4"/><path d="M18 8v4h-6v4"/></svg>
|
|
220
|
+
{{ t('config.localBridge.poolSettings') }}
|
|
221
|
+
</div>
|
|
222
|
+
<div class="bridge-pool-modal-hint">{{ t('config.localBridge.poolHint') }}</div>
|
|
223
|
+
<div v-if="localBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
|
|
224
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/></svg>
|
|
225
|
+
<span>{{ t('config.localBridge.noProviders') }}</span>
|
|
226
|
+
</div>
|
|
227
|
+
<div v-else class="bridge-pool-list">
|
|
228
|
+
<label v-for="cp in localBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
|
|
229
|
+
<span class="bridge-pool-item-name">{{ cp.name }}</span>
|
|
230
|
+
<span class="bridge-pool-item-status" :class="{ active: !isLocalBridgeExcluded(cp.name) }">{{ isLocalBridgeExcluded(cp.name) ? t('common.disabled') : t('common.enabled') }}</span>
|
|
231
|
+
<input type="checkbox" :checked="!isLocalBridgeExcluded(cp.name)" @change="toggleLocalBridgeExcluded(cp.name)" />
|
|
232
|
+
</label>
|
|
233
|
+
</div>
|
|
234
|
+
<div class="btn-group">
|
|
235
|
+
<button class="btn btn-confirm" @click="showCodexBridgePoolModal = false">{{ t('common.close') }}</button>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<div v-if="showClaudeBridgePoolModal" class="modal-overlay" @click.self="showClaudeBridgePoolModal = false">
|
|
241
|
+
<div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="claude-bridge-pool-modal-title">
|
|
242
|
+
<div class="modal-title" id="claude-bridge-pool-modal-title">
|
|
243
|
+
<svg class="modal-title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"><circle cx="6" cy="6" r="2"/><circle cx="18" cy="6" r="2"/><circle cx="12" cy="18" r="2"/><path d="M6 8v4h6v4"/><path d="M18 8v4h-6v4"/></svg>
|
|
244
|
+
{{ t('claude.localBridge.poolTitle') }}
|
|
245
|
+
</div>
|
|
246
|
+
<div class="bridge-pool-modal-hint">{{ t('claude.localBridge.poolHint') }}</div>
|
|
247
|
+
<div v-if="claudeLocalBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
|
|
248
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16"><path d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"/></svg>
|
|
249
|
+
<span>{{ t('claude.localBridge.noProviders') }}</span>
|
|
250
|
+
</div>
|
|
251
|
+
<div v-else class="bridge-pool-list">
|
|
252
|
+
<label v-for="cp in claudeLocalBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
|
|
253
|
+
<span class="bridge-pool-item-name">{{ cp.name }}</span>
|
|
254
|
+
<span class="bridge-pool-item-status" :class="{ active: !isClaudeLocalBridgeExcluded(cp.name) }">{{ isClaudeLocalBridgeExcluded(cp.name) ? t('claude.localBridge.disabled') : t('claude.localBridge.enabled') }}</span>
|
|
255
|
+
<input type="checkbox" :checked="!isClaudeLocalBridgeExcluded(cp.name)" @change="toggleClaudeLocalBridgeExcluded(cp.name)" />
|
|
256
|
+
</label>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="btn-group">
|
|
259
|
+
<button class="btn btn-confirm" @click="showClaudeBridgePoolModal = false">{{ t('common.close') }}</button>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
|