codexmate 0.0.20 → 0.0.21
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.en.md +349 -259
- package/README.md +284 -252
- package/cli/agents-files.js +162 -0
- package/cli/archive-helpers.js +446 -0
- package/cli/auth-profiles.js +359 -0
- package/cli/builtin-proxy.js +580 -0
- package/cli/claude-proxy.js +998 -0
- package/cli/config-bootstrap.js +384 -0
- package/cli/config-health.js +338 -338
- package/cli/openclaw-config.js +629 -0
- package/cli/skills.js +1141 -0
- package/cli/zip-commands.js +510 -0
- package/cli.js +13101 -13497
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +419 -311
- package/lib/cli-network-utils.js +164 -164
- package/lib/cli-path-utils.js +69 -0
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +386 -0
- package/lib/cli-utils.js +155 -155
- package/lib/download-artifacts.js +77 -0
- package/lib/mcp-stdio.js +440 -440
- package/lib/task-orchestrator.js +869 -0
- package/lib/text-diff.js +303 -303
- package/lib/workflow-engine.js +340 -340
- package/package.json +74 -70
- package/res/json5.min.js +1 -1
- package/res/vue.global.prod.js +13 -0
- package/web-ui/app.js +530 -397
- package/web-ui/index.html +33 -30
- package/web-ui/logic.agents-diff.mjs +386 -386
- package/web-ui/logic.claude.mjs +168 -108
- package/web-ui/logic.mjs +5 -5
- package/web-ui/logic.runtime.mjs +124 -124
- package/web-ui/logic.sessions.mjs +581 -263
- package/web-ui/modules/api.mjs +90 -69
- package/web-ui/modules/app.computed.dashboard.mjs +113 -113
- package/web-ui/modules/app.computed.index.mjs +15 -13
- package/web-ui/modules/app.computed.main-tabs.mjs +195 -0
- package/web-ui/modules/app.computed.session.mjs +507 -141
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +493 -493
- package/web-ui/modules/app.methods.claude-config.mjs +174 -174
- package/web-ui/modules/app.methods.codex-config.mjs +640 -640
- package/web-ui/modules/app.methods.index.mjs +88 -86
- package/web-ui/modules/app.methods.install.mjs +149 -157
- package/web-ui/modules/app.methods.navigation.mjs +619 -478
- package/web-ui/modules/app.methods.openclaw-core.mjs +814 -514
- package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -337
- package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -251
- package/web-ui/modules/app.methods.providers.mjs +363 -265
- package/web-ui/modules/app.methods.runtime.mjs +323 -323
- package/web-ui/modules/app.methods.session-actions.mjs +520 -457
- package/web-ui/modules/app.methods.session-browser.mjs +626 -435
- package/web-ui/modules/app.methods.session-timeline.mjs +448 -441
- package/web-ui/modules/app.methods.session-trash.mjs +422 -419
- package/web-ui/modules/app.methods.startup-claude.mjs +412 -406
- package/web-ui/modules/app.methods.task-orchestration.mjs +471 -0
- package/web-ui/modules/config-mode.computed.mjs +126 -124
- 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 -69
- package/web-ui/partials/index/layout-header.html +402 -337
- package/web-ui/partials/index/modal-config-template-agents.html +125 -125
- package/web-ui/partials/index/modal-confirm-toast.html +32 -32
- package/web-ui/partials/index/modal-health-check.html +72 -72
- package/web-ui/partials/index/modal-openclaw-config.html +280 -275
- package/web-ui/partials/index/modal-skills.html +184 -184
- package/web-ui/partials/index/modals-basic.html +156 -196
- package/web-ui/partials/index/panel-config-claude.html +126 -100
- package/web-ui/partials/index/panel-config-codex.html +237 -237
- package/web-ui/partials/index/panel-config-openclaw.html +78 -84
- package/web-ui/partials/index/panel-docs.html +130 -0
- package/web-ui/partials/index/panel-market.html +174 -174
- package/web-ui/partials/index/panel-orchestration.html +397 -0
- package/web-ui/partials/index/panel-sessions.html +292 -387
- package/web-ui/partials/index/panel-settings.html +190 -166
- package/web-ui/partials/index/panel-usage.html +213 -0
- package/web-ui/session-helpers.mjs +559 -362
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +271 -373
- package/web-ui/styles/controls-forms.css +360 -354
- package/web-ui/styles/docs-panel.css +182 -0
- 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 +376 -330
- package/web-ui/styles/modals-core.css +464 -449
- package/web-ui/styles/navigation-panels.css +348 -381
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/responsive.css +450 -416
- package/web-ui/styles/sessions-list.css +400 -414
- package/web-ui/styles/sessions-preview.css +411 -405
- package/web-ui/styles/sessions-toolbar-trash.css +243 -243
- package/web-ui/styles/sessions-usage.css +628 -276
- package/web-ui/styles/skills-list.css +296 -298
- package/web-ui/styles/skills-market.css +335 -335
- package/web-ui/styles/task-orchestration.css +776 -0
- package/web-ui/styles/titles-cards.css +408 -407
- package/web-ui/styles.css +18 -16
- package/web-ui.html +17 -17
- package/res/screenshot.png +0 -0
- package/res/vue.global.js +0 -18552
|
@@ -1,275 +1,280 @@
|
|
|
1
|
-
<div v-if="showOpenclawConfigModal" class="modal-overlay" @click.self="!(openclawSaving || openclawApplying) && closeOpenclawConfigModal()">
|
|
2
|
-
<div class="modal modal-wide" role="dialog" aria-modal="true" aria-labelledby="openclaw-config-modal-title">
|
|
3
|
-
<div class="modal-title" id="openclaw-config-modal-title">{{ openclawEditorTitle }}</div>
|
|
4
|
-
|
|
5
|
-
<div class="form-group">
|
|
6
|
-
<label class="form-label">配置名称</label>
|
|
7
|
-
<input v-model="openclawEditing.name" class="form-input" :readonly="openclawEditing.lockName" placeholder="例如: 默认配置">
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="form-group">
|
|
11
|
-
<label class="form-label">目标文件</label>
|
|
12
|
-
<div class="form-hint">
|
|
13
|
-
{{ openclawConfigPath || '未加载' }}
|
|
14
|
-
<span v-if="openclawConfigPath">
|
|
15
|
-
({{ openclawConfigExists ? '已存在' : '不存在,将在应用时创建' }})
|
|
16
|
-
</span>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="btn-group" style="justify-content:flex-start;">
|
|
19
|
-
<button class="btn btn-confirm secondary" @click="loadOpenclawConfigFromFile" :disabled="openclawFileLoading">
|
|
20
|
-
{{ openclawFileLoading ? '加载中...' : '加载当前配置' }}
|
|
21
|
-
</button>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="quick-section">
|
|
26
|
-
<div class="quick-header">
|
|
27
|
-
<div>
|
|
28
|
-
<div class="quick-title">新手快速配置</div>
|
|
29
|
-
<div class="form-hint">按 3 步完成:填 Provider 和模型,写入编辑器,保存并应用。</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="quick-actions">
|
|
32
|
-
<button class="btn-mini" @click="syncOpenclawQuickFromText">从编辑器读取</button>
|
|
33
|
-
<button class="btn-mini" @click="resetOpenclawQuick">清空</button>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="quick-steps">
|
|
37
|
-
<div class="quick-step"><span class="step-badge">1</span><span>填写 Provider 与模型</span></div>
|
|
38
|
-
<div class="quick-step"><span class="step-badge">2</span><span>点击写入编辑器</span></div>
|
|
39
|
-
<div class="quick-step"><span class="step-badge">3</span><span>保存并应用</span></div>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="quick-grid">
|
|
42
|
-
<div class="quick-card">
|
|
43
|
-
<div class="structured-card-title">Provider</div>
|
|
44
|
-
<div class="form-group">
|
|
45
|
-
<label class="form-label">Provider 名称</label>
|
|
46
|
-
<input v-model="openclawQuick.providerName" class="form-input" placeholder="例如: custom-myapi">
|
|
47
|
-
<div class="form-hint">会拼成 provider/model 作为主模型标识。</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="form-group">
|
|
50
|
-
<label class="form-label">Base URL</label>
|
|
51
|
-
<input v-model="openclawQuick.baseUrl" class="form-input" placeholder="https://api.example.com/v1">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<div class="form-group">
|
|
82
|
-
<label class="form-label"
|
|
83
|
-
<input v-model="openclawQuick.
|
|
84
|
-
</div>
|
|
85
|
-
<div class="form-group">
|
|
86
|
-
<label class="form-label"
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<div class="
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<label class="quick-option">
|
|
102
|
-
<input type="checkbox" v-model="openclawQuick.
|
|
103
|
-
|
|
104
|
-
</label>
|
|
105
|
-
<label class="quick-option">
|
|
106
|
-
<input type="checkbox" v-model="openclawQuick.
|
|
107
|
-
|
|
108
|
-
</label>
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<div class="structured-
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</div>
|
|
129
|
-
<div class="form-group">
|
|
130
|
-
<label class="form-label"
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<
|
|
140
|
-
</div>
|
|
141
|
-
<div class="form-group">
|
|
142
|
-
<label class="form-label">
|
|
143
|
-
<input v-model="openclawStructured.
|
|
144
|
-
</div>
|
|
145
|
-
<div class="form-group">
|
|
146
|
-
<label class="form-label">
|
|
147
|
-
<input v-model="openclawStructured.
|
|
148
|
-
</div>
|
|
149
|
-
<div class="form-group">
|
|
150
|
-
<label class="form-label">
|
|
151
|
-
<input v-model="openclawStructured.
|
|
152
|
-
</div>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
</
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<div
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
<div
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<div class="agent-
|
|
238
|
-
<span
|
|
239
|
-
<span
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
1
|
+
<div v-if="showOpenclawConfigModal" class="modal-overlay" @click.self="!(openclawSaving || openclawApplying) && closeOpenclawConfigModal()">
|
|
2
|
+
<div class="modal modal-wide" role="dialog" aria-modal="true" aria-labelledby="openclaw-config-modal-title">
|
|
3
|
+
<div class="modal-title" id="openclaw-config-modal-title">{{ openclawEditorTitle }}</div>
|
|
4
|
+
|
|
5
|
+
<div class="form-group">
|
|
6
|
+
<label class="form-label">配置名称</label>
|
|
7
|
+
<input v-model="openclawEditing.name" class="form-input" :readonly="openclawEditing.lockName" placeholder="例如: 默认配置">
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="form-group">
|
|
11
|
+
<label class="form-label">目标文件</label>
|
|
12
|
+
<div class="form-hint">
|
|
13
|
+
{{ openclawConfigPath || '未加载' }}
|
|
14
|
+
<span v-if="openclawConfigPath">
|
|
15
|
+
({{ openclawConfigExists ? '已存在' : '不存在,将在应用时创建' }})
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="btn-group" style="justify-content:flex-start;">
|
|
19
|
+
<button class="btn btn-confirm secondary" @click="loadOpenclawConfigFromFile" :disabled="openclawFileLoading">
|
|
20
|
+
{{ openclawFileLoading ? '加载中...' : '加载当前配置' }}
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="quick-section">
|
|
26
|
+
<div class="quick-header">
|
|
27
|
+
<div>
|
|
28
|
+
<div class="quick-title">新手快速配置</div>
|
|
29
|
+
<div class="form-hint">按 3 步完成:填 Provider 和模型,写入编辑器,保存并应用。</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="quick-actions">
|
|
32
|
+
<button class="btn-mini" @click="syncOpenclawQuickFromText">从编辑器读取</button>
|
|
33
|
+
<button class="btn-mini" @click="resetOpenclawQuick">清空</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="quick-steps">
|
|
37
|
+
<div class="quick-step"><span class="step-badge">1</span><span>填写 Provider 与模型</span></div>
|
|
38
|
+
<div class="quick-step"><span class="step-badge">2</span><span>点击写入编辑器</span></div>
|
|
39
|
+
<div class="quick-step"><span class="step-badge">3</span><span>保存并应用</span></div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="quick-grid">
|
|
42
|
+
<div class="quick-card">
|
|
43
|
+
<div class="structured-card-title">Provider</div>
|
|
44
|
+
<div class="form-group">
|
|
45
|
+
<label class="form-label">Provider 名称</label>
|
|
46
|
+
<input v-model="openclawQuick.providerName" class="form-input" placeholder="例如: custom-myapi">
|
|
47
|
+
<div class="form-hint">会拼成 provider/model 作为主模型标识。</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="form-group">
|
|
50
|
+
<label class="form-label">Base URL</label>
|
|
51
|
+
<input v-model="openclawQuick.baseUrl" class="form-input" placeholder="https://api.example.com/v1" :readonly="openclawQuick.baseUrlReadOnly">
|
|
52
|
+
<div v-if="openclawQuick.baseUrlDisplayKind === 'builtin-default'" class="form-hint">已按 OpenClaw 内建 provider 默认值回填,可直接修改。</div>
|
|
53
|
+
<div v-else-if="openclawQuick.baseUrlReadOnly" class="form-hint">检测到外部引用,快速表单中只读显示;如需修改请使用原文编辑。</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="form-group">
|
|
56
|
+
<label class="form-label">API Key</label>
|
|
57
|
+
<div class="list-row">
|
|
58
|
+
<input v-model="openclawQuick.apiKey" class="form-input" :readonly="openclawQuick.apiKeyReadOnly" :type="(openclawQuick.apiKeyReadOnly || openclawQuick.showKey) ? 'text' : 'password'" placeholder="sk-...">
|
|
59
|
+
<button v-if="!openclawQuick.apiKeyReadOnly" class="btn-mini" @click="toggleOpenclawQuickKey">
|
|
60
|
+
{{ openclawQuick.showKey ? '隐藏' : '显示' }}
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
<div v-if="openclawQuick.apiKeyDisplayKind === 'auth-profile-value'" class="form-hint">当前值来自 OpenClaw 外部认证配置;修改后在“保存并应用”时会回写对应 auth profile。</div>
|
|
64
|
+
<div v-else-if="openclawQuick.apiKeyReadOnly" class="form-hint">检测到外部认证或引用,快速表单中只读显示;如需修改请使用原文编辑或对应认证配置。</div>
|
|
65
|
+
<div v-else class="form-hint">留空表示不覆盖现有 key。</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="form-group">
|
|
68
|
+
<label class="form-label">API 类型</label>
|
|
69
|
+
<input v-model="openclawQuick.apiType" class="form-input" list="openclawApiTypeList" placeholder="例如: openai-responses">
|
|
70
|
+
<datalist id="openclawApiTypeList">
|
|
71
|
+
<option value="openai-responses"></option>
|
|
72
|
+
<option value="openai-chat"></option>
|
|
73
|
+
<option value="anthropic"></option>
|
|
74
|
+
<option value="custom"></option>
|
|
75
|
+
</datalist>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="quick-card">
|
|
80
|
+
<div class="structured-card-title">模型</div>
|
|
81
|
+
<div class="form-group">
|
|
82
|
+
<label class="form-label">模型 ID</label>
|
|
83
|
+
<input v-model="openclawQuick.modelId" class="form-input" placeholder="例如: gpt-4.1">
|
|
84
|
+
</div>
|
|
85
|
+
<div class="form-group">
|
|
86
|
+
<label class="form-label">展示名称</label>
|
|
87
|
+
<input v-model="openclawQuick.modelName" class="form-input" placeholder="留空则使用模型 ID">
|
|
88
|
+
</div>
|
|
89
|
+
<div class="form-group">
|
|
90
|
+
<label class="form-label">上下文与最大输出</label>
|
|
91
|
+
<div class="list-row">
|
|
92
|
+
<input v-model="openclawQuick.contextWindow" class="form-input" placeholder="上下文长度">
|
|
93
|
+
<input v-model="openclawQuick.maxTokens" class="form-input" placeholder="最大输出">
|
|
94
|
+
</div>
|
|
95
|
+
<div class="form-hint">留空表示不改动已有配置。</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="quick-card">
|
|
100
|
+
<div class="structured-card-title">选项</div>
|
|
101
|
+
<label class="quick-option">
|
|
102
|
+
<input type="checkbox" v-model="openclawQuick.setPrimary">
|
|
103
|
+
设为主模型
|
|
104
|
+
</label>
|
|
105
|
+
<label class="quick-option">
|
|
106
|
+
<input type="checkbox" v-model="openclawQuick.overrideProvider">
|
|
107
|
+
覆盖同名 Provider 基础信息
|
|
108
|
+
</label>
|
|
109
|
+
<label class="quick-option">
|
|
110
|
+
<input type="checkbox" v-model="openclawQuick.overrideModels">
|
|
111
|
+
覆盖同名模型列表
|
|
112
|
+
</label>
|
|
113
|
+
<div class="form-hint">关闭覆盖会只补空缺字段。</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="btn-group">
|
|
117
|
+
<button class="btn btn-confirm" @click="applyOpenclawQuickToText">写入编辑器</button>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="structured-section">
|
|
122
|
+
<div class="structured-header">
|
|
123
|
+
<span class="structured-title">结构化配置(高级)</span>
|
|
124
|
+
<span class="form-hint">写入编辑器会重排 JSON,注释可能丢失。</span>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="structured-grid">
|
|
127
|
+
<div class="structured-card">
|
|
128
|
+
<div class="structured-card-title">Agents Defaults</div>
|
|
129
|
+
<div class="form-group">
|
|
130
|
+
<label class="form-label">主模型</label>
|
|
131
|
+
<input v-model="openclawStructured.agentPrimary" class="form-input" placeholder="例如: provider/model">
|
|
132
|
+
</div>
|
|
133
|
+
<div class="form-group">
|
|
134
|
+
<label class="form-label">备选模型</label>
|
|
135
|
+
<div class="list-row" v-for="(item, index) in openclawStructured.agentFallbacks" :key="'fallback-' + index">
|
|
136
|
+
<input v-model="openclawStructured.agentFallbacks[index]" class="form-input" placeholder="例如: provider/model">
|
|
137
|
+
<button class="btn-mini delete" @click="removeOpenclawFallback(index)">删除</button>
|
|
138
|
+
</div>
|
|
139
|
+
<button class="btn-mini" @click="addOpenclawFallback">添加备选</button>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="form-group">
|
|
142
|
+
<label class="form-label">Workspace</label>
|
|
143
|
+
<input v-model="openclawStructured.workspace" class="form-input" placeholder="例如: ~/.openclaw/workspace">
|
|
144
|
+
</div>
|
|
145
|
+
<div class="form-group">
|
|
146
|
+
<label class="form-label">Timeout(s)</label>
|
|
147
|
+
<input v-model="openclawStructured.timeout" class="form-input" placeholder="例如: 600">
|
|
148
|
+
</div>
|
|
149
|
+
<div class="form-group">
|
|
150
|
+
<label class="form-label">Context Tokens</label>
|
|
151
|
+
<input v-model="openclawStructured.contextTokens" class="form-input" placeholder="例如: 4096">
|
|
152
|
+
</div>
|
|
153
|
+
<div class="form-group">
|
|
154
|
+
<label class="form-label">Max Concurrent</label>
|
|
155
|
+
<input v-model="openclawStructured.maxConcurrent" class="form-input" placeholder="例如: 2">
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div class="structured-card">
|
|
160
|
+
<div class="structured-card-title">Env</div>
|
|
161
|
+
<div class="form-group">
|
|
162
|
+
<label class="form-label">环境变量</label>
|
|
163
|
+
<div class="list-row" v-for="(item, index) in openclawStructured.envItems" :key="'env-' + index">
|
|
164
|
+
<input v-model="item.key" class="form-input" placeholder="KEY">
|
|
165
|
+
<input v-model="item.value" class="form-input" :type="item.show ? 'text' : 'password'" placeholder="VALUE">
|
|
166
|
+
<button class="btn-mini" @click="toggleOpenclawEnvItem(index)">
|
|
167
|
+
{{ item.show ? '隐藏' : '显示' }}
|
|
168
|
+
</button>
|
|
169
|
+
<button class="btn-mini delete" @click="removeOpenclawEnvItem(index)">删除</button>
|
|
170
|
+
</div>
|
|
171
|
+
<button class="btn-mini" @click="addOpenclawEnvItem">添加变量</button>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<div class="structured-card">
|
|
176
|
+
<div class="structured-card-title">Tools</div>
|
|
177
|
+
<div class="form-group">
|
|
178
|
+
<label class="form-label">Profile</label>
|
|
179
|
+
<select v-model="openclawStructured.toolsProfile" class="form-input">
|
|
180
|
+
<option value="default">default</option>
|
|
181
|
+
<option value="strict">strict</option>
|
|
182
|
+
<option value="permissive">permissive</option>
|
|
183
|
+
<option value="custom">custom</option>
|
|
184
|
+
</select>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="form-group">
|
|
187
|
+
<label class="form-label">Allow</label>
|
|
188
|
+
<div class="list-row" v-for="(item, index) in openclawStructured.toolsAllow" :key="'allow-' + index">
|
|
189
|
+
<input v-model="openclawStructured.toolsAllow[index]" class="form-input" placeholder="例如: fs.read*">
|
|
190
|
+
<button class="btn-mini delete" @click="removeOpenclawToolsAllow(index)">删除</button>
|
|
191
|
+
</div>
|
|
192
|
+
<button class="btn-mini" @click="addOpenclawToolsAllow">添加 allow</button>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="form-group">
|
|
195
|
+
<label class="form-label">Deny</label>
|
|
196
|
+
<div class="list-row" v-for="(item, index) in openclawStructured.toolsDeny" :key="'deny-' + index">
|
|
197
|
+
<input v-model="openclawStructured.toolsDeny[index]" class="form-input" placeholder="例如: net.*">
|
|
198
|
+
<button class="btn-mini delete" @click="removeOpenclawToolsDeny(index)">删除</button>
|
|
199
|
+
</div>
|
|
200
|
+
<button class="btn-mini" @click="addOpenclawToolsDeny">添加 deny</button>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<div class="structured-card">
|
|
205
|
+
<div class="structured-card-title">Providers(只读)</div>
|
|
206
|
+
<div v-if="openclawProviders.length === 0" class="form-hint">
|
|
207
|
+
未发现 providers 配置(可能使用环境变量或外部配置)。
|
|
208
|
+
</div>
|
|
209
|
+
<div v-else class="provider-list">
|
|
210
|
+
<div class="provider-item" v-for="(provider, index) in openclawProviders" :key="provider.key + '-' + provider.source + '-' + index">
|
|
211
|
+
<div class="provider-header">
|
|
212
|
+
<span class="provider-name">{{ provider.key }}</span>
|
|
213
|
+
<span class="provider-source">来源: {{ provider.source }}</span>
|
|
214
|
+
<span v-if="provider.isActive" class="pill configured">使用中</span>
|
|
215
|
+
</div>
|
|
216
|
+
<div v-if="provider.fields.length === 0" class="form-hint">未配置字段</div>
|
|
217
|
+
<div v-else class="provider-fields">
|
|
218
|
+
<div class="provider-field" v-for="field in provider.fields" :key="provider.key + '-' + field.key">
|
|
219
|
+
<span class="provider-field-key">{{ field.key }}</span>
|
|
220
|
+
<span class="provider-field-value">{{ field.value }}</span>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
<div v-if="openclawMissingProviders.length" class="form-hint">
|
|
226
|
+
使用中的 provider 未在配置中显示:{{ openclawMissingProviders.join(', ') }}。
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="structured-card">
|
|
231
|
+
<div class="structured-card-title">Agents(只读)</div>
|
|
232
|
+
<div v-if="openclawAgentsList.length === 0" class="form-hint">
|
|
233
|
+
未发现 agents.list 配置。
|
|
234
|
+
</div>
|
|
235
|
+
<div v-else class="agent-list">
|
|
236
|
+
<div class="agent-item" v-for="(agent, index) in openclawAgentsList" :key="agent.key + '-' + index">
|
|
237
|
+
<div class="agent-header">
|
|
238
|
+
<span class="agent-name">{{ agent.name }}</span>
|
|
239
|
+
<span class="agent-id">ID: {{ agent.id }}</span>
|
|
240
|
+
</div>
|
|
241
|
+
<div class="agent-meta" v-if="agent.theme || agent.emoji || agent.avatar">
|
|
242
|
+
<span v-if="agent.theme">主题: {{ agent.theme }}</span>
|
|
243
|
+
<span v-if="agent.emoji">表情: {{ agent.emoji }}</span>
|
|
244
|
+
<span v-if="agent.avatar">头像: {{ agent.avatar }}</span>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="btn-group">
|
|
251
|
+
<button class="btn btn-confirm secondary" @click="syncOpenclawStructuredFromText">从文本刷新</button>
|
|
252
|
+
<button class="btn btn-confirm" @click="applyOpenclawStructuredToText">写入编辑器</button>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<div class="form-group">
|
|
257
|
+
<label class="form-label">OpenClaw 配置(JSON5)</label>
|
|
258
|
+
<textarea
|
|
259
|
+
v-model="openclawEditing.content"
|
|
260
|
+
class="form-input template-editor"
|
|
261
|
+
spellcheck="false"
|
|
262
|
+
:readonly="openclawSaving || openclawApplying"
|
|
263
|
+
placeholder="在这里编辑 OpenClaw 配置(JSON5)"></textarea>
|
|
264
|
+
<div class="template-editor-warning">
|
|
265
|
+
<span v-if="openclawEditing.lockName && openclawEditing.name === '默认配置'">默认配置始终映射当前 openclaw.json,请直接使用“保存并应用”。</span>
|
|
266
|
+
<span v-else>保存仅写入本地配置库。点击“保存并应用”后会写入 openclaw.json。</span>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div class="btn-group">
|
|
271
|
+
<button class="btn btn-cancel" @click="closeOpenclawConfigModal" :disabled="openclawSaving || openclawApplying">取消</button>
|
|
272
|
+
<button class="btn btn-confirm" @click="saveOpenclawConfig" :disabled="openclawSaving || openclawApplying || (openclawEditing.lockName && openclawEditing.name === '默认配置')">
|
|
273
|
+
{{ openclawSaving ? '保存中...' : '保存' }}
|
|
274
|
+
</button>
|
|
275
|
+
<button class="btn btn-confirm secondary" @click="saveAndApplyOpenclawConfig" :disabled="openclawSaving || openclawApplying">
|
|
276
|
+
{{ openclawApplying ? '应用中...' : '保存并应用' }}
|
|
277
|
+
</button>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|