codexmate 0.0.32 → 0.0.34

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.
Files changed (148) hide show
  1. package/README.md +147 -363
  2. package/README.zh.md +147 -371
  3. package/cli/agents-files.js +230 -224
  4. package/cli/archive-helpers.js +453 -446
  5. package/cli/auth-profiles.js +375 -375
  6. package/cli/builtin-proxy.js +1725 -1725
  7. package/cli/claude-proxy.js +1022 -1022
  8. package/cli/config-bootstrap.js +402 -402
  9. package/cli/config-health.js +454 -454
  10. package/cli/doctor-core.js +903 -903
  11. package/cli/import-skills-url.js +356 -356
  12. package/cli/local-bridge.js +556 -324
  13. package/cli/openai-bridge.js +1653 -1653
  14. package/cli/openclaw-config.js +629 -629
  15. package/cli/session-convert-args.js +69 -69
  16. package/cli/session-convert-io.js +82 -82
  17. package/cli/session-convert.js +150 -150
  18. package/cli/session-usage.concurrent.js +28 -28
  19. package/cli/session-usage.js +118 -118
  20. package/cli/session-usage.models.js +176 -176
  21. package/cli/skills.js +1141 -1141
  22. package/cli/update.js +171 -0
  23. package/cli/zip-commands.js +510 -510
  24. package/cli.js +16079 -15829
  25. package/lib/automation.js +404 -404
  26. package/lib/cli-file-utils.js +151 -151
  27. package/lib/cli-models-utils.js +440 -440
  28. package/lib/cli-network-utils.js +190 -190
  29. package/lib/cli-path-utils.js +85 -85
  30. package/lib/cli-session-utils.js +121 -121
  31. package/lib/cli-sessions.js +427 -426
  32. package/lib/cli-utils.js +155 -155
  33. package/lib/cli-webhook.js +154 -126
  34. package/lib/download-artifacts.js +92 -92
  35. package/lib/mcp-stdio.js +453 -453
  36. package/lib/task-orchestrator.js +869 -869
  37. package/lib/text-diff.js +303 -303
  38. package/lib/win-tray.js +119 -0
  39. package/lib/workflow-engine.js +340 -340
  40. package/package.json +76 -76
  41. package/plugins/README.md +20 -20
  42. package/plugins/README.zh-CN.md +20 -20
  43. package/plugins/prompt-templates/comment-polish/index.mjs +25 -25
  44. package/plugins/prompt-templates/computed.mjs +253 -253
  45. package/plugins/prompt-templates/index.mjs +8 -8
  46. package/plugins/prompt-templates/manifest.mjs +15 -15
  47. package/plugins/prompt-templates/methods.mjs +553 -553
  48. package/plugins/prompt-templates/overview.mjs +91 -91
  49. package/plugins/prompt-templates/ownership.mjs +19 -19
  50. package/plugins/prompt-templates/rule-ack/index.mjs +21 -21
  51. package/plugins/prompt-templates/storage.mjs +64 -64
  52. package/plugins/registry.mjs +16 -16
  53. package/web-ui/app.js +654 -647
  54. package/web-ui/index.html +37 -36
  55. package/web-ui/logic.agents-diff.mjs +386 -386
  56. package/web-ui/logic.claude.mjs +172 -168
  57. package/web-ui/logic.codex.mjs +69 -69
  58. package/web-ui/logic.mjs +5 -5
  59. package/web-ui/logic.runtime.mjs +128 -128
  60. package/web-ui/logic.session-convert.mjs +70 -70
  61. package/web-ui/logic.sessions.mjs +781 -781
  62. package/web-ui/modules/api.mjs +90 -90
  63. package/web-ui/modules/app.computed.dashboard.mjs +248 -248
  64. package/web-ui/modules/app.computed.index.mjs +17 -17
  65. package/web-ui/modules/app.computed.main-tabs.mjs +205 -205
  66. package/web-ui/modules/app.computed.session.mjs +735 -693
  67. package/web-ui/modules/app.constants.mjs +15 -15
  68. package/web-ui/modules/app.methods.agents.mjs +651 -651
  69. package/web-ui/modules/app.methods.claude-config.mjs +306 -200
  70. package/web-ui/modules/app.methods.codex-config.mjs +869 -861
  71. package/web-ui/modules/app.methods.index.mjs +94 -94
  72. package/web-ui/modules/app.methods.install.mjs +205 -205
  73. package/web-ui/modules/app.methods.navigation.mjs +788 -774
  74. package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
  75. package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -372
  76. package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -369
  77. package/web-ui/modules/app.methods.providers.mjs +575 -529
  78. package/web-ui/modules/app.methods.runtime.mjs +345 -345
  79. package/web-ui/modules/app.methods.session-actions.mjs +591 -591
  80. package/web-ui/modules/app.methods.session-browser.mjs +1011 -1012
  81. package/web-ui/modules/app.methods.session-timeline.mjs +479 -479
  82. package/web-ui/modules/app.methods.session-trash.mjs +438 -438
  83. package/web-ui/modules/app.methods.startup-claude.mjs +547 -537
  84. package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
  85. package/web-ui/modules/app.methods.webhook.mjs +87 -79
  86. package/web-ui/modules/config-mode.computed.mjs +124 -124
  87. package/web-ui/modules/config-template-confirm-pref.mjs +33 -33
  88. package/web-ui/modules/i18n.dict.mjs +3195 -3177
  89. package/web-ui/modules/i18n.mjs +62 -62
  90. package/web-ui/modules/plugins.computed.mjs +3 -3
  91. package/web-ui/modules/plugins.methods.mjs +3 -3
  92. package/web-ui/modules/plugins.storage.mjs +11 -11
  93. package/web-ui/modules/provider-url-display.mjs +17 -17
  94. package/web-ui/modules/sessions-filters-url.mjs +85 -85
  95. package/web-ui/modules/skills.computed.mjs +107 -107
  96. package/web-ui/modules/skills.methods.mjs +482 -482
  97. package/web-ui/partials/index/layout-footer.html +13 -13
  98. package/web-ui/partials/index/layout-header.html +499 -503
  99. package/web-ui/partials/index/modal-config-template-agents.html +185 -185
  100. package/web-ui/partials/index/modal-confirm-toast.html +32 -32
  101. package/web-ui/partials/index/modal-health-check.html +45 -45
  102. package/web-ui/partials/index/modal-openclaw-config.html +280 -280
  103. package/web-ui/partials/index/modal-skills.html +200 -200
  104. package/web-ui/partials/index/modal-webhook.html +42 -0
  105. package/web-ui/partials/index/modals-basic.html +223 -162
  106. package/web-ui/partials/index/panel-config-claude.html +155 -136
  107. package/web-ui/partials/index/panel-config-codex.html +176 -196
  108. package/web-ui/partials/index/panel-config-codex.html.bak +337 -0
  109. package/web-ui/partials/index/panel-config-openclaw.html +83 -83
  110. package/web-ui/partials/index/panel-dashboard.html +186 -219
  111. package/web-ui/partials/index/panel-docs.html +114 -114
  112. package/web-ui/partials/index/panel-market.html +177 -177
  113. package/web-ui/partials/index/panel-orchestration.html +391 -391
  114. package/web-ui/partials/index/panel-plugins.html +253 -253
  115. package/web-ui/partials/index/panel-sessions.html +319 -313
  116. package/web-ui/partials/index/panel-settings.html +158 -190
  117. package/web-ui/partials/index/panel-trash.html +82 -82
  118. package/web-ui/partials/index/panel-usage.html +137 -137
  119. package/web-ui/res/json5.min.js +1 -1
  120. package/web-ui/res/vue.global.prod.js +13 -13
  121. package/web-ui/session-helpers.mjs +591 -591
  122. package/web-ui/source-bundle.cjs +233 -233
  123. package/web-ui/styles/base-theme.css +281 -281
  124. package/web-ui/styles/bridge-pool.css +266 -197
  125. package/web-ui/styles/controls-forms.css +433 -433
  126. package/web-ui/styles/dashboard.css +406 -406
  127. package/web-ui/styles/docs-panel.css +245 -245
  128. package/web-ui/styles/feedback.css +108 -108
  129. package/web-ui/styles/health-check-dialog.css +144 -144
  130. package/web-ui/styles/layout-shell.css +628 -638
  131. package/web-ui/styles/modals-core.css +499 -466
  132. package/web-ui/styles/navigation-panels.css +391 -391
  133. package/web-ui/styles/openclaw-structured.css +266 -266
  134. package/web-ui/styles/plugins-panel.css +564 -564
  135. package/web-ui/styles/responsive.css +392 -392
  136. package/web-ui/styles/sessions-list.css +683 -647
  137. package/web-ui/styles/sessions-preview.css +407 -407
  138. package/web-ui/styles/sessions-toolbar-trash.css +518 -518
  139. package/web-ui/styles/sessions-usage.css +588 -588
  140. package/web-ui/styles/settings-panel.css +415 -349
  141. package/web-ui/styles/skills-list.css +305 -305
  142. package/web-ui/styles/skills-market.css +429 -429
  143. package/web-ui/styles/task-orchestration.css +822 -822
  144. package/web-ui/styles/titles-cards.css +472 -472
  145. package/web-ui/styles/trash-panel.css +90 -90
  146. package/web-ui/styles/webhook.css +115 -81
  147. package/web-ui/styles.css +24 -24
  148. package/web-ui.html +17 -17
@@ -1,162 +1,223 @@
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>
38
-
39
- <div class="btn-group">
40
- <button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
41
- <button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
42
- </div>
43
- </div>
44
- </div>
45
-
46
- <!-- 编辑提供商模态框 -->
47
- <div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
48
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
49
- <div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
50
-
51
- <div class="form-group">
52
- <label class="form-label">{{ t('field.name') }}</label>
53
- <input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
54
- </div>
55
- <div class="form-group">
56
- <label class="form-label">{{ t('field.apiEndpoint') }}</label>
57
- <input
58
- v-model="editingProvider.url"
59
- :class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
60
- :placeholder="t('placeholder.apiEndpointExample')"
61
- autocomplete="off"
62
- spellcheck="false"
63
- @blur="normalizeProviderDraft('edit')">
64
- <div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
65
- </div>
66
- <div class="form-group">
67
- <label class="form-label">{{ t('field.apiKey') }}</label>
68
- <input v-model="editingProvider.key" class="form-input" type="password" :placeholder="t('placeholder.keepUnchanged')">
69
- <div class="form-hint">{{ t('hint.keepKeyUnchanged') }}</div>
70
- </div>
71
-
72
- <div class="btn-group">
73
- <button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
74
- <button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
75
- </div>
76
- </div>
77
- </div>
78
-
79
- <!-- 添加模型模态框 -->
80
- <div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
81
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
82
- <div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
83
-
84
- <div class="form-group">
85
- <label class="form-label">{{ t('field.modelName') }}</label>
86
- <input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
87
- </div>
88
-
89
- <div class="btn-group">
90
- <button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
91
- <button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
92
- </div>
93
- </div>
94
- </div>
95
-
96
- <!-- 模型列表模态框 -->
97
- <div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
98
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
99
- <div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
100
-
101
- <div class="model-list">
102
- <div v-for="model in models" :key="model" class="model-item">
103
- <span>{{ model }}</span>
104
- <button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
105
- </div>
106
- </div>
107
-
108
- <div class="btn-group">
109
- <button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
110
- </div>
111
- </div>
112
- </div>
113
-
114
- <!-- 添加Claude配置模态框 -->
115
- <div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
116
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
117
- <div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
118
-
119
- <div class="form-group">
120
- <label class="form-label">{{ t('field.configName') }}</label>
121
- <input v-model="newClaudeConfig.name" class="form-input" :placeholder="t('placeholder.configNameExample')">
122
- </div>
123
- <div class="form-group">
124
- <label class="form-label">API Key</label>
125
- <input v-model="newClaudeConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
126
- </div>
127
- <div class="form-group">
128
- <label class="form-label">{{ t('field.baseUrl') }}</label>
129
- <input v-model="newClaudeConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
130
- </div>
131
-
132
- <div class="btn-group">
133
- <button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
134
- <button class="btn btn-confirm" @click="addClaudeConfig">{{ t('common.add') }}</button>
135
- </div>
136
- </div>
137
- </div>
138
-
139
- <!-- 编辑Claude配置模态框 -->
140
- <div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
141
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
142
- <div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
143
-
144
- <div class="form-group">
145
- <label class="form-label">{{ t('field.configName') }}</label>
146
- <input v-model="editingConfig.name" class="form-input" :placeholder="t('field.configName')" readonly>
147
- </div>
148
- <div class="form-group">
149
- <label class="form-label">API Key</label>
150
- <input v-model="editingConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
151
- </div>
152
- <div class="form-group">
153
- <label class="form-label">{{ t('field.baseUrl') }}</label>
154
- <input v-model="editingConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
155
- </div>
156
-
157
- <div class="btn-group">
158
- <button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
159
- <button class="btn btn-confirm" @click="saveAndApplyConfig">{{ t('common.saveApply') }}</button>
160
- </div>
161
- </div>
162
- </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>
38
+
39
+ <div class="btn-group">
40
+ <button class="btn btn-cancel" @click="closeAddModal">{{ t('common.cancel') }}</button>
41
+ <button class="btn btn-confirm" @click="addProvider" :disabled="!canSubmitProvider('add')">{{ t('common.add') }}</button>
42
+ </div>
43
+ </div>
44
+ </div>
45
+
46
+ <!-- 编辑提供商模态框 -->
47
+ <div v-if="showEditModal" class="modal-overlay" @click.self="closeEditModal">
48
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-provider-modal-title">
49
+ <div class="modal-title" id="edit-provider-modal-title">{{ t('modal.providerEdit.title') }}</div>
50
+
51
+ <div class="form-group">
52
+ <label class="form-label">{{ t('field.name') }}</label>
53
+ <input v-model="editingProvider.name" class="form-input" :placeholder="t('placeholder.providerName')" readonly>
54
+ </div>
55
+ <div class="form-group">
56
+ <label class="form-label">{{ t('field.apiEndpoint') }}</label>
57
+ <input
58
+ v-model="editingProvider.url"
59
+ :class="['form-input', { invalid: !!providerFieldError('edit', 'url') }]"
60
+ :placeholder="t('placeholder.apiEndpointExample')"
61
+ autocomplete="off"
62
+ spellcheck="false"
63
+ @blur="normalizeProviderDraft('edit')">
64
+ <div v-if="providerFieldError('edit', 'url')" class="form-hint form-error">{{ providerFieldError('edit', 'url') }}</div>
65
+ </div>
66
+ <div class="form-group">
67
+ <label class="form-label">{{ t('field.apiKey') }}</label>
68
+ <div class="input-with-toggle">
69
+ <input v-model="editingProvider.key" class="form-input" :type="showEditProviderKey ? 'text' : 'password'" placeholder="sk-..." autocomplete="off" spellcheck="false">
70
+ <button type="button" class="input-toggle-btn" @click="toggleEditProviderKey" :title="showEditProviderKey ? t('common.hide') : t('common.show')">
71
+ <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>
72
+ <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>
73
+ </button>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="btn-group">
78
+ <button class="btn btn-cancel" @click="closeEditModal">{{ t('common.cancel') }}</button>
79
+ <button class="btn btn-confirm" @click="updateProvider" :disabled="!canSubmitProvider('edit')">{{ t('common.save') }}</button>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <!-- 添加模型模态框 -->
85
+ <div v-if="showModelModal" class="modal-overlay" @click.self="closeModelModal">
86
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-model-modal-title">
87
+ <div class="modal-title" id="add-model-modal-title">{{ t('modal.modelAdd.title') }}</div>
88
+
89
+ <div class="form-group">
90
+ <label class="form-label">{{ t('field.modelName') }}</label>
91
+ <input v-model="newModelName" class="form-input" :placeholder="t('placeholder.modelExample')">
92
+ </div>
93
+
94
+ <div class="btn-group">
95
+ <button class="btn btn-cancel" @click="closeModelModal">{{ t('common.cancel') }}</button>
96
+ <button class="btn btn-confirm" @click="addModel">{{ t('common.add') }}</button>
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- 模型列表模态框 -->
102
+ <div v-if="showModelListModal" class="modal-overlay" @click.self="showModelListModal = false">
103
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="manage-models-modal-title">
104
+ <div class="modal-title" id="manage-models-modal-title">{{ t('modal.modelManage.title') }}</div>
105
+
106
+ <div class="model-list">
107
+ <div v-for="model in models" :key="model" class="model-item">
108
+ <span>{{ model }}</span>
109
+ <button type="button" class="btn-remove-model" @click="removeModel(model)">{{ t('common.delete') }}</button>
110
+ </div>
111
+ </div>
112
+
113
+ <div class="btn-group">
114
+ <button class="btn btn-confirm" @click="showModelListModal = false">{{ t('common.close') }}</button>
115
+ </div>
116
+ </div>
117
+ </div>
118
+
119
+ <!-- 添加Claude配置模态框 -->
120
+ <div v-if="showClaudeConfigModal" class="modal-overlay" @click.self="closeClaudeConfigModal">
121
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="add-claude-config-modal-title">
122
+ <div class="modal-title" id="add-claude-config-modal-title">{{ t('modal.claudeConfigAdd.title') }}</div>
123
+
124
+ <div class="form-group">
125
+ <label class="form-label">{{ t('field.configName') }}</label>
126
+ <input v-model="newClaudeConfig.name" class="form-input" :placeholder="t('placeholder.configNameExample')">
127
+ </div>
128
+ <div class="form-group">
129
+ <label class="form-label">API Key</label>
130
+ <input v-model="newClaudeConfig.apiKey" class="form-input" type="password" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
131
+ </div>
132
+ <div class="form-group">
133
+ <label class="form-label">{{ t('field.baseUrl') }}</label>
134
+ <input v-model="newClaudeConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
135
+ </div>
136
+
137
+ <div class="btn-group">
138
+ <button class="btn btn-cancel" @click="closeClaudeConfigModal">{{ t('common.cancel') }}</button>
139
+ <button class="btn btn-confirm" @click="addClaudeConfig">{{ t('common.add') }}</button>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <!-- 编辑Claude配置模态框 -->
145
+ <div v-if="showEditConfigModal" class="modal-overlay" @click.self="closeEditConfigModal">
146
+ <div class="modal" role="dialog" aria-modal="true" aria-labelledby="edit-claude-config-modal-title">
147
+ <div class="modal-title" id="edit-claude-config-modal-title">{{ t('modal.claudeConfigEdit.title') }}</div>
148
+
149
+ <div class="form-group">
150
+ <label class="form-label">{{ t('field.configName') }}</label>
151
+ <input v-model="editingConfig.name" class="form-input" :placeholder="t('field.configName')" readonly>
152
+ </div>
153
+ <div class="form-group">
154
+ <label class="form-label">API Key</label>
155
+ <div class="input-with-toggle">
156
+ <input v-model="editingConfig.apiKey" class="form-input" :type="showEditClaudeConfigKey ? 'text' : 'password'" autocomplete="off" spellcheck="false" :placeholder="t('placeholder.apiKeyExampleClaude')">
157
+ <button type="button" class="input-toggle-btn" @click="toggleEditClaudeConfigKey" :title="showEditClaudeConfigKey ? t('common.hide') : t('common.show')">
158
+ <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>
159
+ <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>
160
+ </button>
161
+ </div>
162
+ </div>
163
+ <div class="form-group">
164
+ <label class="form-label">{{ t('field.baseUrl') }}</label>
165
+ <input v-model="editingConfig.baseUrl" class="form-input" :placeholder="t('placeholder.baseUrlExampleClaude')">
166
+ </div>
167
+
168
+ <div class="btn-group">
169
+ <button class="btn btn-cancel" @click="closeEditConfigModal">{{ t('common.cancel') }}</button>
170
+ <button class="btn btn-confirm" @click="saveAndApplyConfig">{{ t('common.saveApply') }}</button>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <!-- Codex 轮询池控制模态框 -->
176
+ <div v-if="showCodexBridgePoolModal" class="modal-overlay" @click.self="showCodexBridgePoolModal = false">
177
+ <div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="codex-bridge-pool-modal-title">
178
+ <div class="modal-title" id="codex-bridge-pool-modal-title">
179
+ <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>
180
+ 轮询池设置
181
+ </div>
182
+ <div class="bridge-pool-modal-hint">勾选参与负载均衡的提供商</div>
183
+ <div v-if="localBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
184
+ <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>
185
+ <span>暂无可用上游 provider,请先添加直连 provider</span>
186
+ </div>
187
+ <div v-else class="bridge-pool-list">
188
+ <label v-for="cp in localBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
189
+ <span class="bridge-pool-item-name">{{ cp.name }}</span>
190
+ <span class="bridge-pool-item-status" :class="{ active: !isLocalBridgeExcluded(cp.name) }">{{ isLocalBridgeExcluded(cp.name) ? '未启用' : '已启用' }}</span>
191
+ <input type="checkbox" :checked="!isLocalBridgeExcluded(cp.name)" @change="toggleLocalBridgeExcluded(cp.name)" />
192
+ </label>
193
+ </div>
194
+ <div class="btn-group">
195
+ <button class="btn btn-confirm" @click="showCodexBridgePoolModal = false">{{ t('common.close') }}</button>
196
+ </div>
197
+ </div>
198
+ </div>
199
+
200
+ <div v-if="showClaudeBridgePoolModal" class="modal-overlay" @click.self="showClaudeBridgePoolModal = false">
201
+ <div class="modal modal-bridge-pool" role="dialog" aria-modal="true" aria-labelledby="claude-bridge-pool-modal-title">
202
+ <div class="modal-title" id="claude-bridge-pool-modal-title">
203
+ <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>
204
+ {{ t('claude.localBridge.poolTitle') }}
205
+ </div>
206
+ <div class="bridge-pool-modal-hint">{{ t('claude.localBridge.poolHint') }}</div>
207
+ <div v-if="claudeLocalBridgeCandidateProviders().length === 0" class="bridge-pool-empty">
208
+ <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>
209
+ <span>{{ t('claude.localBridge.noProviders') }}</span>
210
+ </div>
211
+ <div v-else class="bridge-pool-list">
212
+ <label v-for="cp in claudeLocalBridgeCandidateProviders()" :key="cp.name" class="bridge-pool-item">
213
+ <span class="bridge-pool-item-name">{{ cp.name }}</span>
214
+ <span class="bridge-pool-item-status" :class="{ active: !isClaudeLocalBridgeExcluded(cp.name) }">{{ isClaudeLocalBridgeExcluded(cp.name) ? t('claude.localBridge.disabled') : t('claude.localBridge.enabled') }}</span>
215
+ <input type="checkbox" :checked="!isClaudeLocalBridgeExcluded(cp.name)" @change="toggleClaudeLocalBridgeExcluded(cp.name)" />
216
+ </label>
217
+ </div>
218
+ <div class="btn-group">
219
+ <button class="btn btn-confirm" @click="showClaudeBridgePoolModal = false">{{ t('common.close') }}</button>
220
+ </div>
221
+ </div>
222
+ </div>
223
+