codexmate 0.0.21 → 0.0.23
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 +390 -284
- package/README.zh.md +322 -0
- package/cli/agents-files.js +224 -162
- package/cli/archive-helpers.js +446 -446
- package/cli/auth-profiles.js +359 -359
- package/cli/builtin-proxy.js +1044 -580
- package/cli/claude-proxy.js +998 -998
- package/cli/config-bootstrap.js +384 -384
- package/cli/config-health.js +338 -338
- package/cli/openai-bridge.js +950 -0
- package/cli/openclaw-config.js +629 -629
- package/cli/session-usage.concurrent.js +28 -0
- package/cli/session-usage.js +112 -0
- package/cli/session-usage.models.js +176 -0
- package/cli/skills.js +1141 -1141
- package/cli/zip-commands.js +510 -510
- package/cli.js +13214 -13129
- package/lib/cli-file-utils.js +151 -151
- package/lib/cli-models-utils.js +419 -419
- package/lib/cli-network-utils.js +164 -164
- package/lib/cli-path-utils.js +69 -69
- package/lib/cli-session-utils.js +121 -121
- package/lib/cli-sessions.js +386 -386
- package/lib/cli-utils.js +155 -155
- package/lib/download-artifacts.js +77 -77
- package/lib/mcp-stdio.js +440 -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 -74
- package/res/json5.min.js +1 -1
- package/res/logo.png +0 -0
- package/res/vue.global.prod.js +13 -13
- package/web-ui/app.js +626 -530
- package/web-ui/index.html +34 -33
- 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 -124
- package/web-ui/logic.sessions.mjs +614 -581
- package/web-ui/modules/api.mjs +90 -90
- package/web-ui/modules/app.computed.dashboard.mjs +126 -113
- package/web-ui/modules/app.computed.index.mjs +17 -15
- package/web-ui/modules/app.computed.main-tabs.mjs +202 -195
- package/web-ui/modules/app.computed.session.mjs +653 -507
- package/web-ui/modules/app.constants.mjs +15 -15
- package/web-ui/modules/app.methods.agents.mjs +544 -493
- package/web-ui/modules/app.methods.claude-config.mjs +174 -174
- package/web-ui/modules/app.methods.codex-config.mjs +795 -640
- package/web-ui/modules/app.methods.index.mjs +92 -88
- package/web-ui/modules/app.methods.install.mjs +177 -149
- package/web-ui/modules/app.methods.navigation.mjs +662 -619
- 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 -363
- package/web-ui/modules/app.methods.runtime.mjs +323 -323
- package/web-ui/modules/app.methods.session-actions.mjs +537 -520
- package/web-ui/modules/app.methods.session-browser.mjs +691 -626
- package/web-ui/modules/app.methods.session-timeline.mjs +448 -448
- package/web-ui/modules/app.methods.session-trash.mjs +422 -422
- package/web-ui/modules/app.methods.startup-claude.mjs +417 -412
- package/web-ui/modules/app.methods.task-orchestration.mjs +556 -471
- package/web-ui/modules/config-mode.computed.mjs +126 -126
- package/web-ui/modules/config-template-confirm-pref.mjs +33 -0
- package/web-ui/modules/i18n.mjs +1823 -0
- package/web-ui/modules/plugins.computed.mjs +3 -0
- package/web-ui/modules/plugins.methods.mjs +3 -0
- package/web-ui/modules/plugins.storage.mjs +11 -0
- package/web-ui/modules/sessions-filters-url.mjs +85 -0
- 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 +461 -402
- package/web-ui/partials/index/modal-config-template-agents.html +175 -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 -280
- package/web-ui/partials/index/modal-skills.html +200 -184
- package/web-ui/partials/index/modals-basic.html +165 -156
- package/web-ui/partials/index/panel-config-claude.html +159 -126
- package/web-ui/partials/index/panel-config-codex.html +255 -237
- package/web-ui/partials/index/panel-config-openclaw.html +78 -78
- package/web-ui/partials/index/panel-docs.html +147 -130
- package/web-ui/partials/index/panel-market.html +174 -174
- package/web-ui/partials/index/panel-orchestration.html +388 -397
- package/web-ui/partials/index/panel-plugins.html +273 -0
- package/web-ui/partials/index/panel-sessions.html +298 -292
- package/web-ui/partials/index/panel-settings.html +258 -190
- package/web-ui/partials/index/panel-usage.html +353 -213
- package/web-ui/session-helpers.mjs +573 -559
- package/web-ui/source-bundle.cjs +233 -233
- package/web-ui/styles/base-theme.css +264 -271
- package/web-ui/styles/controls-forms.css +369 -360
- package/web-ui/styles/docs-panel.css +247 -182
- 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 +602 -376
- package/web-ui/styles/modals-core.css +464 -464
- package/web-ui/styles/navigation-panels.css +390 -348
- package/web-ui/styles/openclaw-structured.css +266 -266
- package/web-ui/styles/plugins-panel.css +523 -0
- package/web-ui/styles/responsive.css +456 -450
- package/web-ui/styles/sessions-list.css +400 -400
- package/web-ui/styles/sessions-preview.css +411 -411
- package/web-ui/styles/sessions-toolbar-trash.css +268 -243
- package/web-ui/styles/sessions-usage.css +879 -628
- package/web-ui/styles/settings-panel.css +166 -0
- package/web-ui/styles/skills-list.css +303 -296
- package/web-ui/styles/skills-market.css +406 -335
- package/web-ui/styles/task-orchestration.css +822 -776
- package/web-ui/styles/titles-cards.css +408 -408
- package/web-ui/styles.css +20 -18
- package/web-ui.html +17 -17
- package/README.en.md +0 -349
package/web-ui/modules/api.mjs
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
const browserLocation = typeof location !== 'undefined' ? location : null;
|
|
2
|
-
|
|
3
|
-
export const API_BASE = (browserLocation && browserLocation.origin && browserLocation.origin !== 'null')
|
|
4
|
-
? browserLocation.origin
|
|
5
|
-
: 'http://localhost:3737';
|
|
6
|
-
|
|
7
|
-
async function postApi(action, params = {}) {
|
|
8
|
-
return await fetch(`${API_BASE}/api`, {
|
|
9
|
-
method: 'POST',
|
|
10
|
-
headers: { 'Content-Type': 'application/json' },
|
|
11
|
-
body: JSON.stringify({ action, params })
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function buildApiResponseContext(action, res, contentType) {
|
|
16
|
-
return `${action} (${res.status} ${res.statusText}, content-type: ${contentType || 'unknown'})`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function formatUnexpectedApiBodySnippet(body, contentType) {
|
|
20
|
-
const raw = typeof body === 'string' ? body.trim() : '';
|
|
21
|
-
if (!raw) {
|
|
22
|
-
return '';
|
|
23
|
-
}
|
|
24
|
-
const normalizedContentType = String(contentType || '').toLowerCase();
|
|
25
|
-
const looksLikeHtml = normalizedContentType.includes('text/html')
|
|
26
|
-
|| /<!doctype\s+html|<html[\s>]|<head[\s>]|<body[\s>]/i.test(raw);
|
|
27
|
-
if (looksLikeHtml) {
|
|
28
|
-
return '';
|
|
29
|
-
}
|
|
30
|
-
const singleLine = raw.replace(/\s+/g, ' ').trim();
|
|
31
|
-
if (!singleLine) {
|
|
32
|
-
return '';
|
|
33
|
-
}
|
|
34
|
-
return singleLine.length > 200
|
|
35
|
-
? `${singleLine.slice(0, 197)}...`
|
|
36
|
-
: singleLine;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function withPayloadTooLargeErrorCode(res, payload) {
|
|
40
|
-
if (res.status !== 413 || (payload && typeof payload === 'object' && payload.errorCode)) {
|
|
41
|
-
return payload;
|
|
42
|
-
}
|
|
43
|
-
return { ...payload, errorCode: 'payload-too-large' };
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export async function api(action, params = {}) {
|
|
47
|
-
const res = await postApi(action, params);
|
|
48
|
-
const contentType = String(res.headers.get('content-type') || '').toLowerCase();
|
|
49
|
-
if (contentType && !contentType.includes('application/json')) {
|
|
50
|
-
const body = await res.text();
|
|
51
|
-
const errorDetails = buildApiResponseContext(action, res, contentType);
|
|
52
|
-
const bodySnippet = formatUnexpectedApiBodySnippet(body, contentType);
|
|
53
|
-
const bodyDetails = bodySnippet ? `: ${bodySnippet}` : '';
|
|
54
|
-
throw new Error(`Unexpected non-JSON API response for ${errorDetails}${bodyDetails}`);
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
return await res.json();
|
|
58
|
-
} catch (error) {
|
|
59
|
-
const errorDetails = buildApiResponseContext(action, res, contentType);
|
|
60
|
-
throw new Error(`Failed to parse API response for ${errorDetails}: ${error.message}`);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export async function apiWithMeta(action, params = {}) {
|
|
65
|
-
const res = await postApi(action, params);
|
|
66
|
-
const contentType = String(res.headers.get('content-type') || '').toLowerCase();
|
|
67
|
-
if (contentType.includes('application/json')) {
|
|
68
|
-
try {
|
|
69
|
-
const payload = await res.json();
|
|
70
|
-
if (payload && typeof payload === 'object' && !Array.isArray(payload)) {
|
|
71
|
-
return { ...withPayloadTooLargeErrorCode(res, payload), ok: res.ok, status: res.status };
|
|
72
|
-
}
|
|
73
|
-
return res.status === 413
|
|
74
|
-
? { ok: res.ok, status: res.status, data: payload, errorCode: 'payload-too-large' }
|
|
75
|
-
: { ok: res.ok, status: res.status, data: payload };
|
|
76
|
-
} catch (error) {
|
|
77
|
-
if (res.status === 413) {
|
|
78
|
-
return { ok: false, status: 413, errorCode: 'payload-too-large' };
|
|
79
|
-
}
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
const error = await res.text();
|
|
84
|
-
return {
|
|
85
|
-
ok: res.ok,
|
|
86
|
-
status: res.status,
|
|
87
|
-
error,
|
|
88
|
-
errorCode: res.status === 413 ? 'payload-too-large' : ''
|
|
89
|
-
};
|
|
90
|
-
}
|
|
1
|
+
const browserLocation = typeof location !== 'undefined' ? location : null;
|
|
2
|
+
|
|
3
|
+
export const API_BASE = (browserLocation && browserLocation.origin && browserLocation.origin !== 'null')
|
|
4
|
+
? browserLocation.origin
|
|
5
|
+
: 'http://localhost:3737';
|
|
6
|
+
|
|
7
|
+
async function postApi(action, params = {}) {
|
|
8
|
+
return await fetch(`${API_BASE}/api`, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
headers: { 'Content-Type': 'application/json' },
|
|
11
|
+
body: JSON.stringify({ action, params })
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function buildApiResponseContext(action, res, contentType) {
|
|
16
|
+
return `${action} (${res.status} ${res.statusText}, content-type: ${contentType || 'unknown'})`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function formatUnexpectedApiBodySnippet(body, contentType) {
|
|
20
|
+
const raw = typeof body === 'string' ? body.trim() : '';
|
|
21
|
+
if (!raw) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
const normalizedContentType = String(contentType || '').toLowerCase();
|
|
25
|
+
const looksLikeHtml = normalizedContentType.includes('text/html')
|
|
26
|
+
|| /<!doctype\s+html|<html[\s>]|<head[\s>]|<body[\s>]/i.test(raw);
|
|
27
|
+
if (looksLikeHtml) {
|
|
28
|
+
return '';
|
|
29
|
+
}
|
|
30
|
+
const singleLine = raw.replace(/\s+/g, ' ').trim();
|
|
31
|
+
if (!singleLine) {
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
return singleLine.length > 200
|
|
35
|
+
? `${singleLine.slice(0, 197)}...`
|
|
36
|
+
: singleLine;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function withPayloadTooLargeErrorCode(res, payload) {
|
|
40
|
+
if (res.status !== 413 || (payload && typeof payload === 'object' && payload.errorCode)) {
|
|
41
|
+
return payload;
|
|
42
|
+
}
|
|
43
|
+
return { ...payload, errorCode: 'payload-too-large' };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function api(action, params = {}) {
|
|
47
|
+
const res = await postApi(action, params);
|
|
48
|
+
const contentType = String(res.headers.get('content-type') || '').toLowerCase();
|
|
49
|
+
if (contentType && !contentType.includes('application/json')) {
|
|
50
|
+
const body = await res.text();
|
|
51
|
+
const errorDetails = buildApiResponseContext(action, res, contentType);
|
|
52
|
+
const bodySnippet = formatUnexpectedApiBodySnippet(body, contentType);
|
|
53
|
+
const bodyDetails = bodySnippet ? `: ${bodySnippet}` : '';
|
|
54
|
+
throw new Error(`Unexpected non-JSON API response for ${errorDetails}${bodyDetails}`);
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
return await res.json();
|
|
58
|
+
} catch (error) {
|
|
59
|
+
const errorDetails = buildApiResponseContext(action, res, contentType);
|
|
60
|
+
throw new Error(`Failed to parse API response for ${errorDetails}: ${error.message}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export async function apiWithMeta(action, params = {}) {
|
|
65
|
+
const res = await postApi(action, params);
|
|
66
|
+
const contentType = String(res.headers.get('content-type') || '').toLowerCase();
|
|
67
|
+
if (contentType.includes('application/json')) {
|
|
68
|
+
try {
|
|
69
|
+
const payload = await res.json();
|
|
70
|
+
if (payload && typeof payload === 'object' && !Array.isArray(payload)) {
|
|
71
|
+
return { ...withPayloadTooLargeErrorCode(res, payload), ok: res.ok, status: res.status };
|
|
72
|
+
}
|
|
73
|
+
return res.status === 413
|
|
74
|
+
? { ok: res.ok, status: res.status, data: payload, errorCode: 'payload-too-large' }
|
|
75
|
+
: { ok: res.ok, status: res.status, data: payload };
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (res.status === 413) {
|
|
78
|
+
return { ok: false, status: 413, errorCode: 'payload-too-large' };
|
|
79
|
+
}
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const error = await res.text();
|
|
84
|
+
return {
|
|
85
|
+
ok: res.ok,
|
|
86
|
+
status: res.status,
|
|
87
|
+
error,
|
|
88
|
+
errorCode: res.status === 413 ? 'payload-too-large' : ''
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -1,113 +1,126 @@
|
|
|
1
|
-
export function createDashboardComputed() {
|
|
2
|
-
return {
|
|
3
|
-
agentsDiffHasChanges() {
|
|
4
|
-
if (this.agentsDiffTruncated) {
|
|
5
|
-
return !!this.agentsDiffHasChangesValue;
|
|
6
|
-
}
|
|
7
|
-
const stats = this.agentsDiffStats || {};
|
|
8
|
-
const added = Number(stats.added || 0);
|
|
9
|
-
const removed = Number(stats.removed || 0);
|
|
10
|
-
return added > 0 || removed > 0;
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const current =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (this.
|
|
66
|
-
if (this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (this.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (this.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
export function createDashboardComputed() {
|
|
2
|
+
return {
|
|
3
|
+
agentsDiffHasChanges() {
|
|
4
|
+
if (this.agentsDiffTruncated) {
|
|
5
|
+
return !!this.agentsDiffHasChangesValue;
|
|
6
|
+
}
|
|
7
|
+
const stats = this.agentsDiffStats || {};
|
|
8
|
+
const added = Number(stats.added || 0);
|
|
9
|
+
const removed = Number(stats.removed || 0);
|
|
10
|
+
return added > 0 || removed > 0;
|
|
11
|
+
},
|
|
12
|
+
configTemplateDiffHasChanges() {
|
|
13
|
+
const stats = this.configTemplateDiffStats || {};
|
|
14
|
+
const added = Number(stats.added || 0);
|
|
15
|
+
const removed = Number(stats.removed || 0);
|
|
16
|
+
if (this.configTemplateDiffHasChangesValue !== undefined && this.configTemplateDiffHasChangesValue !== null) {
|
|
17
|
+
return !!this.configTemplateDiffHasChangesValue;
|
|
18
|
+
}
|
|
19
|
+
return added > 0 || removed > 0;
|
|
20
|
+
},
|
|
21
|
+
claudeModelHasList() {
|
|
22
|
+
return this.claudeModelOptions.length > 0;
|
|
23
|
+
},
|
|
24
|
+
claudeModelOptions() {
|
|
25
|
+
const list = Array.isArray(this.claudeModels) ? [...this.claudeModels] : [];
|
|
26
|
+
const current = (this.currentClaudeModel || '').trim();
|
|
27
|
+
if (current && !list.includes(current)) {
|
|
28
|
+
list.unshift(current);
|
|
29
|
+
}
|
|
30
|
+
return list;
|
|
31
|
+
},
|
|
32
|
+
displayCurrentProvider() {
|
|
33
|
+
const switching = String(this.providerSwitchDisplayTarget || '').trim();
|
|
34
|
+
if (switching) return switching;
|
|
35
|
+
const current = String(this.currentProvider || '').trim();
|
|
36
|
+
return current;
|
|
37
|
+
},
|
|
38
|
+
displayProvidersList() {
|
|
39
|
+
const list = Array.isArray(this.providersList) ? this.providersList : [];
|
|
40
|
+
return list.filter((item) => String(item && item.name ? item.name : '').trim().toLowerCase() !== 'codexmate-proxy');
|
|
41
|
+
},
|
|
42
|
+
installTargetCards() {
|
|
43
|
+
const targets = Array.isArray(this.installStatusTargets) ? this.installStatusTargets : [];
|
|
44
|
+
const action = this.normalizeInstallAction(this.installCommandAction);
|
|
45
|
+
return targets.map((target) => {
|
|
46
|
+
const id = target && typeof target.id === 'string' ? target.id : '';
|
|
47
|
+
const termuxCommand = id === 'codex'
|
|
48
|
+
? this.getInstallCommand(id, action, 'termux')
|
|
49
|
+
: '';
|
|
50
|
+
return {
|
|
51
|
+
...target,
|
|
52
|
+
command: this.getInstallCommand(id, action),
|
|
53
|
+
termuxCommand
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
installRegistryPreview() {
|
|
58
|
+
return this.resolveInstallRegistryUrl(this.installRegistryPreset, this.installRegistryCustom);
|
|
59
|
+
},
|
|
60
|
+
inspectorBusyStatus() {
|
|
61
|
+
const tasks = [];
|
|
62
|
+
if (this.loading) tasks.push('初始化');
|
|
63
|
+
if (this.sessionsLoading) tasks.push('会话加载');
|
|
64
|
+
if (this.codexModelsLoading || this.claudeModelsLoading) tasks.push('模型加载');
|
|
65
|
+
if (this.codexApplying || this.configTemplateApplying || this.openclawApplying) tasks.push('配置应用');
|
|
66
|
+
if (this.agentsSaving) tasks.push('AGENTS 保存');
|
|
67
|
+
if (this.skillsLoading || this.skillsDeleting || this.skillsScanningImports || this.skillsImporting || this.skillsZipImporting || this.skillsExporting) tasks.push('Skills 管理');
|
|
68
|
+
if (this.taskOrchestration && (this.taskOrchestration.loading || this.taskOrchestration.planning || this.taskOrchestration.running || this.taskOrchestration.queueAdding || this.taskOrchestration.queueStarting || this.taskOrchestration.retrying || this.taskOrchestration.selectedRunLoading)) {
|
|
69
|
+
tasks.push('任务编排');
|
|
70
|
+
}
|
|
71
|
+
return tasks.length ? tasks.join(' / ') : '空闲';
|
|
72
|
+
},
|
|
73
|
+
inspectorMessageSummary() {
|
|
74
|
+
const value = typeof this.message === 'string' ? this.message.trim() : '';
|
|
75
|
+
return value || '暂无提示';
|
|
76
|
+
},
|
|
77
|
+
inspectorSessionSourceLabel() {
|
|
78
|
+
if (this.sessionFilterSource === 'codex') return 'Codex';
|
|
79
|
+
if (this.sessionFilterSource === 'claude') return 'Claude Code';
|
|
80
|
+
return '全部';
|
|
81
|
+
},
|
|
82
|
+
inspectorSessionPathLabel() {
|
|
83
|
+
const value = typeof this.sessionPathFilter === 'string' ? this.sessionPathFilter.trim() : '';
|
|
84
|
+
return value || '全部路径';
|
|
85
|
+
},
|
|
86
|
+
inspectorSessionQueryLabel() {
|
|
87
|
+
if (!this.isSessionQueryEnabled) return '当前来源不支持';
|
|
88
|
+
const value = typeof this.sessionQuery === 'string' ? this.sessionQuery.trim() : '';
|
|
89
|
+
return value || '未设置';
|
|
90
|
+
},
|
|
91
|
+
inspectorHealthStatus() {
|
|
92
|
+
if (this.initError) return '读取失败';
|
|
93
|
+
if (this.loading) return '初始化中';
|
|
94
|
+
return '正常';
|
|
95
|
+
},
|
|
96
|
+
inspectorHealthTone() {
|
|
97
|
+
if (this.initError) return 'error';
|
|
98
|
+
if (this.loading) return 'warn';
|
|
99
|
+
return 'ok';
|
|
100
|
+
},
|
|
101
|
+
inspectorModelLoadStatus() {
|
|
102
|
+
if (this.codexModelsLoading || this.claudeModelsLoading) {
|
|
103
|
+
return '加载中';
|
|
104
|
+
}
|
|
105
|
+
if (this.modelsSource === 'error' || this.claudeModelsSource === 'error') {
|
|
106
|
+
return '加载异常';
|
|
107
|
+
}
|
|
108
|
+
return '正常';
|
|
109
|
+
},
|
|
110
|
+
installTroubleshootingTips() {
|
|
111
|
+
const platform = this.resolveInstallPlatform();
|
|
112
|
+
if (platform === 'win32') {
|
|
113
|
+
return [
|
|
114
|
+
this.t('docs.tip.win.1'),
|
|
115
|
+
this.t('docs.tip.win.2'),
|
|
116
|
+
this.t('docs.tip.win.3')
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
return [
|
|
120
|
+
this.t('docs.tip.unix.1'),
|
|
121
|
+
this.t('docs.tip.unix.2'),
|
|
122
|
+
this.t('docs.tip.unix.3')
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { createDashboardComputed } from './app.computed.dashboard.mjs';
|
|
2
|
-
import { createMainTabsComputed } from './app.computed.main-tabs.mjs';
|
|
3
|
-
import { createSessionComputed } from './app.computed.session.mjs';
|
|
4
|
-
import { createConfigModeComputed } from './config-mode.computed.mjs';
|
|
5
|
-
import { createSkillsComputed } from './skills.computed.mjs';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...
|
|
11
|
-
...
|
|
12
|
-
...
|
|
13
|
-
...
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { createDashboardComputed } from './app.computed.dashboard.mjs';
|
|
2
|
+
import { createMainTabsComputed } from './app.computed.main-tabs.mjs';
|
|
3
|
+
import { createSessionComputed } from './app.computed.session.mjs';
|
|
4
|
+
import { createConfigModeComputed } from './config-mode.computed.mjs';
|
|
5
|
+
import { createSkillsComputed } from './skills.computed.mjs';
|
|
6
|
+
import { createPluginsComputed } from './plugins.computed.mjs';
|
|
7
|
+
|
|
8
|
+
export function createAppComputed() {
|
|
9
|
+
return {
|
|
10
|
+
...createSessionComputed(),
|
|
11
|
+
...createDashboardComputed(),
|
|
12
|
+
...createMainTabsComputed(),
|
|
13
|
+
...createSkillsComputed(),
|
|
14
|
+
...createPluginsComputed(),
|
|
15
|
+
...createConfigModeComputed()
|
|
16
|
+
};
|
|
17
|
+
}
|