codexmate 0.0.24 → 0.0.26
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 +416 -391
- package/README.zh.md +349 -324
- 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 +1079 -1044
- package/cli/claude-proxy.js +1022 -998
- package/cli/config-bootstrap.js +384 -384
- package/cli/config-health.js +338 -338
- package/cli/doctor-core.js +903 -903
- package/cli/import-skills-url.js +356 -334
- package/cli/openai-bridge.js +997 -950
- package/cli/openclaw-config.js +629 -629
- package/cli/session-convert-args.js +65 -0
- package/cli/session-convert-io.js +82 -0
- package/cli/session-convert.js +43 -0
- package/cli/session-usage.concurrent.js +28 -28
- package/cli/session-usage.js +118 -112
- package/cli/session-usage.models.js +176 -176
- package/cli/skills.js +1141 -1141
- package/cli/zip-commands.js +510 -510
- package/cli.js +15218 -13310
- package/lib/automation.js +404 -0
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +379 -379
- package/lib/cli-network-utils.js +190 -190
- package/lib/cli-path-utils.js +85 -69
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +417 -386
- package/lib/cli-utils.js +155 -155
- package/lib/download-artifacts.js +92 -77
- package/lib/mcp-stdio.js +453 -440
- package/lib/task-orchestrator.js +869 -869
- package/lib/text-diff.js +303 -303
- package/lib/workflow-engine.js +340 -340
- package/package.json +74 -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 +253 -253
- package/plugins/prompt-templates/index.mjs +8 -8
- package/plugins/prompt-templates/manifest.mjs +15 -15
- package/plugins/prompt-templates/methods.mjs +619 -619
- package/plugins/prompt-templates/overview.mjs +90 -90
- 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 +625 -609
- package/web-ui/index.html +35 -35
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +168 -168
- package/web-ui/logic.mjs +5 -5
- package/web-ui/logic.runtime.mjs +128 -128
- package/web-ui/logic.session-convert.mjs +70 -0
- package/web-ui/logic.sessions.mjs +709 -614
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +171 -126
- 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 +946 -653
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +632 -632
- package/web-ui/modules/app.methods.claude-config.mjs +179 -174
- package/web-ui/modules/app.methods.codex-config.mjs +860 -784
- package/web-ui/modules/app.methods.index.mjs +92 -92
- package/web-ui/modules/app.methods.install.mjs +205 -177
- package/web-ui/modules/app.methods.navigation.mjs +743 -695
- 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 +404 -404
- package/web-ui/modules/app.methods.runtime.mjs +345 -345
- package/web-ui/modules/app.methods.session-actions.mjs +596 -537
- package/web-ui/modules/app.methods.session-browser.mjs +985 -698
- package/web-ui/modules/app.methods.session-timeline.mjs +479 -448
- package/web-ui/modules/app.methods.session-trash.mjs +424 -422
- package/web-ui/modules/app.methods.startup-claude.mjs +522 -417
- package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
- 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 +2113 -2039
- package/web-ui/modules/i18n.mjs +56 -56
- 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/sessions-filters-url.mjs +85 -85
- package/web-ui/modules/skills.computed.mjs +107 -107
- package/web-ui/modules/skills.methods.mjs +481 -481
- package/web-ui/partials/index/layout-footer.html +13 -13
- package/web-ui/partials/index/layout-header.html +475 -465
- package/web-ui/partials/index/modal-config-template-agents.html +174 -174
- 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 +165 -165
- package/web-ui/partials/index/panel-config-claude.html +184 -179
- package/web-ui/partials/index/panel-config-codex.html +283 -283
- package/web-ui/partials/index/panel-config-openclaw.html +83 -83
- package/web-ui/partials/index/panel-dashboard.html +186 -186
- package/web-ui/partials/index/panel-docs.html +147 -147
- 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 +279 -279
- package/web-ui/partials/index/panel-sessions.html +326 -301
- package/web-ui/partials/index/panel-settings.html +258 -258
- package/web-ui/partials/index/panel-usage.html +342 -354
- package/{res → web-ui/res}/json5.min.js +1 -1
- package/{res → web-ui/res}/vue.global.prod.js +13 -13
- package/web-ui/session-helpers.mjs +576 -573
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +268 -264
- package/web-ui/styles/controls-forms.css +423 -376
- package/web-ui/styles/dashboard.css +274 -274
- package/web-ui/styles/docs-panel.css +247 -247
- 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 +603 -602
- package/web-ui/styles/modals-core.css +464 -464
- package/web-ui/styles/navigation-panels.css +390 -390
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/plugins-panel.css +523 -523
- package/web-ui/styles/responsive.css +454 -456
- package/web-ui/styles/sessions-list.css +415 -400
- package/web-ui/styles/sessions-preview.css +411 -411
- package/web-ui/styles/sessions-toolbar-trash.css +330 -268
- package/web-ui/styles/sessions-usage.css +945 -888
- package/web-ui/styles/settings-panel.css +166 -166
- package/web-ui/styles/skills-list.css +303 -303
- package/web-ui/styles/skills-market.css +406 -406
- package/web-ui/styles/task-orchestration.css +822 -822
- package/web-ui/styles/titles-cards.css +408 -408
- package/web-ui/styles.css +21 -21
- package/web-ui.html +17 -17
- /package/{res → web-ui/res}/logo-pack.webp +0 -0
|
@@ -1,165 +1,165 @@
|
|
|
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.apiKey') }}</label>
|
|
30
|
-
<input v-model="newProvider.key" class="form-input" type="password" placeholder="sk-...">
|
|
31
|
-
</div>
|
|
32
|
-
<div class="form-group">
|
|
33
|
-
<label class="form-label">
|
|
34
|
-
<input type="checkbox" v-model="newProvider.useTransform">
|
|
35
|
-
{{ t('field.useBuiltinTransform') }}
|
|
36
|
-
</label>
|
|
37
|
-
<div class="form-hint">
|
|
38
|
-
{{ t('hint.useBuiltinTransform') }}
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<div class="btn-group">
|
|
43
|
-
<button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
|
|
44
|
-
<button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<!-- 编辑提供商模态框 -->
|
|
50
|
-
<div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
|
|
51
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
|
|
52
|
-
<div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
|
|
53
|
-
|
|
54
|
-
<div class="form-group">
|
|
55
|
-
<label class="form-label">{{ t('field.name') }}</label>
|
|
56
|
-
<input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="form-group">
|
|
59
|
-
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
60
|
-
<input
|
|
61
|
-
v-model="editingProvider.url"
|
|
62
|
-
:class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
|
|
63
|
-
:placeholder="t('placeholder.apiEndpointExample')"
|
|
64
|
-
autocomplete="off"
|
|
65
|
-
spellcheck="false"
|
|
66
|
-
@blur="normalizeProviderDraft('edit')">
|
|
67
|
-
<div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="form-group">
|
|
70
|
-
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
71
|
-
<input v-model="editingProvider.key" class="form-input" type="password" :placeholder="t('placeholder.keepUnchanged')">
|
|
72
|
-
<div class="form-hint">{{ t('hint.keepKeyUnchanged') }}</div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<div class="btn-group">
|
|
76
|
-
<button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
|
|
77
|
-
<button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<!-- 添加模型模态框 -->
|
|
83
|
-
<div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
|
|
84
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
|
|
85
|
-
<div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
|
|
86
|
-
|
|
87
|
-
<div class="form-group">
|
|
88
|
-
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
89
|
-
<input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<div class="btn-group">
|
|
93
|
-
<button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
|
|
94
|
-
<button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<!-- 模型列表模态框 -->
|
|
100
|
-
<div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
|
|
101
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
|
|
102
|
-
<div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
|
|
103
|
-
|
|
104
|
-
<div class="model-list">
|
|
105
|
-
<div v-for="model in models" :key="model" class="model-item">
|
|
106
|
-
<span>{{ model }}</span>
|
|
107
|
-
<button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<div class="btn-group">
|
|
112
|
-
<button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<!-- 添加Claude配置模态框 -->
|
|
118
|
-
<div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
|
|
119
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
|
|
120
|
-
<div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
|
|
121
|
-
|
|
122
|
-
<div class="form-group">
|
|
123
|
-
<label class="form-label">{{ t('field.configName') }}</label>
|
|
124
|
-
<input v-model="newClaudeConfig.name" class="form-input" :placeholder="t('placeholder.configNameExample')">
|
|
125
|
-
</div>
|
|
126
|
-
<div class="form-group">
|
|
127
|
-
<label class="form-label">API Key</label>
|
|
128
|
-
<input v-model="newClaudeConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
129
|
-
</div>
|
|
130
|
-
<div class="form-group">
|
|
131
|
-
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
132
|
-
<input v-model="newClaudeConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class="btn-group">
|
|
136
|
-
<button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
|
|
137
|
-
<button class="btn btn-confirm" @click="addClaudeConfig">{{ t('common.add') }}</button>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<!-- 编辑Claude配置模态框 -->
|
|
143
|
-
<div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
|
|
144
|
-
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
|
|
145
|
-
<div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
|
|
146
|
-
|
|
147
|
-
<div class="form-group">
|
|
148
|
-
<label class="form-label">{{ t('field.configName') }}</label>
|
|
149
|
-
<input v-model="editingConfig.name" class="form-input" :placeholder="t('field.configName')" readonly>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="form-group">
|
|
152
|
-
<label class="form-label">API Key</label>
|
|
153
|
-
<input v-model="editingConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
154
|
-
</div>
|
|
155
|
-
<div class="form-group">
|
|
156
|
-
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
157
|
-
<input v-model="editingConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
158
|
-
</div>
|
|
159
|
-
|
|
160
|
-
<div class="btn-group">
|
|
161
|
-
<button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
|
|
162
|
-
<button class="btn btn-confirm" @click="saveAndApplyConfig">{{ t('common.saveApply') }}</button>
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
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.apiKey') }}</label>
|
|
30
|
+
<input v-model="newProvider.key" class="form-input" type="password" placeholder="sk-...">
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form-group">
|
|
33
|
+
<label class="form-label">
|
|
34
|
+
<input type="checkbox" v-model="newProvider.useTransform">
|
|
35
|
+
{{ t('field.useBuiltinTransform') }}
|
|
36
|
+
</label>
|
|
37
|
+
<div class="form-hint">
|
|
38
|
+
{{ t('hint.useBuiltinTransform') }}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div class="btn-group">
|
|
43
|
+
<button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
|
|
44
|
+
<button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- 编辑提供商模态框 -->
|
|
50
|
+
<div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
|
|
51
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
|
|
52
|
+
<div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
|
|
53
|
+
|
|
54
|
+
<div class="form-group">
|
|
55
|
+
<label class="form-label">{{ t('field.name') }}</label>
|
|
56
|
+
<input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="form-group">
|
|
59
|
+
<label class="form-label">{{ t('field.apiEndpoint') }}</label>
|
|
60
|
+
<input
|
|
61
|
+
v-model="editingProvider.url"
|
|
62
|
+
:class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
|
|
63
|
+
:placeholder="t('placeholder.apiEndpointExample')"
|
|
64
|
+
autocomplete="off"
|
|
65
|
+
spellcheck="false"
|
|
66
|
+
@blur="normalizeProviderDraft('edit')">
|
|
67
|
+
<div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="form-group">
|
|
70
|
+
<label class="form-label">{{ t('field.apiKey') }}</label>
|
|
71
|
+
<input v-model="editingProvider.key" class="form-input" type="password" :placeholder="t('placeholder.keepUnchanged')">
|
|
72
|
+
<div class="form-hint">{{ t('hint.keepKeyUnchanged') }}</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="btn-group">
|
|
76
|
+
<button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
|
|
77
|
+
<button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<!-- 添加模型模态框 -->
|
|
83
|
+
<div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
|
|
84
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
|
|
85
|
+
<div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
|
|
86
|
+
|
|
87
|
+
<div class="form-group">
|
|
88
|
+
<label class="form-label">{{ t('field.modelName') }}</label>
|
|
89
|
+
<input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="btn-group">
|
|
93
|
+
<button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
|
|
94
|
+
<button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!-- 模型列表模态框 -->
|
|
100
|
+
<div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
|
|
101
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
|
|
102
|
+
<div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
|
|
103
|
+
|
|
104
|
+
<div class="model-list">
|
|
105
|
+
<div v-for="model in models" :key="model" class="model-item">
|
|
106
|
+
<span>{{ model }}</span>
|
|
107
|
+
<button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="btn-group">
|
|
112
|
+
<button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<!-- 添加Claude配置模态框 -->
|
|
118
|
+
<div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
|
|
119
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
|
|
120
|
+
<div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
|
|
121
|
+
|
|
122
|
+
<div class="form-group">
|
|
123
|
+
<label class="form-label">{{ t('field.configName') }}</label>
|
|
124
|
+
<input v-model="newClaudeConfig.name" class="form-input" :placeholder="t('placeholder.configNameExample')">
|
|
125
|
+
</div>
|
|
126
|
+
<div class="form-group">
|
|
127
|
+
<label class="form-label">API Key</label>
|
|
128
|
+
<input v-model="newClaudeConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
129
|
+
</div>
|
|
130
|
+
<div class="form-group">
|
|
131
|
+
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
132
|
+
<input v-model="newClaudeConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div class="btn-group">
|
|
136
|
+
<button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
|
|
137
|
+
<button class="btn btn-confirm" @click="addClaudeConfig">{{ t('common.add') }}</button>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<!-- 编辑Claude配置模态框 -->
|
|
143
|
+
<div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
|
|
144
|
+
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
|
|
145
|
+
<div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
|
|
146
|
+
|
|
147
|
+
<div class="form-group">
|
|
148
|
+
<label class="form-label">{{ t('field.configName') }}</label>
|
|
149
|
+
<input v-model="editingConfig.name" class="form-input" :placeholder="t('field.configName')" readonly>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="form-group">
|
|
152
|
+
<label class="form-label">API Key</label>
|
|
153
|
+
<input v-model="editingConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
|
|
154
|
+
</div>
|
|
155
|
+
<div class="form-group">
|
|
156
|
+
<label class="form-label">{{ t('field.baseUrl') }}</label>
|
|
157
|
+
<input v-model="editingConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div class="btn-group">
|
|
161
|
+
<button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
|
|
162
|
+
<button class="btn btn-confirm" @click="saveAndApplyConfig">{{ t('common.saveApply') }}</button>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|