codexmate 0.0.21 → 0.0.22

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 (114) hide show
  1. package/README.md +389 -284
  2. package/README.zh.md +321 -0
  3. package/cli/agents-files.js +224 -162
  4. package/cli/archive-helpers.js +446 -446
  5. package/cli/auth-profiles.js +359 -359
  6. package/cli/builtin-proxy.js +1044 -580
  7. package/cli/claude-proxy.js +998 -998
  8. package/cli/config-bootstrap.js +384 -384
  9. package/cli/config-health.js +338 -338
  10. package/cli/openai-bridge.js +950 -0
  11. package/cli/openclaw-config.js +629 -629
  12. package/cli/session-usage.concurrent.js +28 -0
  13. package/cli/session-usage.js +112 -0
  14. package/cli/session-usage.models.js +176 -0
  15. package/cli/skills.js +1141 -1141
  16. package/cli/zip-commands.js +510 -510
  17. package/cli.js +13214 -13129
  18. package/lib/cli-file-utils.js +151 -151
  19. package/lib/cli-models-utils.js +419 -419
  20. package/lib/cli-network-utils.js +164 -164
  21. package/lib/cli-path-utils.js +69 -69
  22. package/lib/cli-session-utils.js +121 -121
  23. package/lib/cli-sessions.js +386 -386
  24. package/lib/cli-utils.js +155 -155
  25. package/lib/download-artifacts.js +77 -77
  26. package/lib/mcp-stdio.js +440 -440
  27. package/lib/task-orchestrator.js +869 -869
  28. package/lib/text-diff.js +303 -303
  29. package/lib/workflow-engine.js +340 -340
  30. package/package.json +74 -74
  31. package/res/json5.min.js +1 -1
  32. package/res/logo.png +0 -0
  33. package/res/vue.global.prod.js +13 -13
  34. package/web-ui/app.js +575 -530
  35. package/web-ui/index.html +34 -33
  36. package/web-ui/logic.agents-diff.mjs +386 -386
  37. package/web-ui/logic.claude.mjs +168 -168
  38. package/web-ui/logic.mjs +5 -5
  39. package/web-ui/logic.runtime.mjs +128 -124
  40. package/web-ui/logic.sessions.mjs +614 -581
  41. package/web-ui/modules/api.mjs +90 -90
  42. package/web-ui/modules/app.computed.dashboard.mjs +126 -113
  43. package/web-ui/modules/app.computed.index.mjs +17 -15
  44. package/web-ui/modules/app.computed.main-tabs.mjs +198 -195
  45. package/web-ui/modules/app.computed.session.mjs +653 -507
  46. package/web-ui/modules/app.constants.mjs +15 -15
  47. package/web-ui/modules/app.methods.agents.mjs +544 -493
  48. package/web-ui/modules/app.methods.claude-config.mjs +174 -174
  49. package/web-ui/modules/app.methods.codex-config.mjs +795 -640
  50. package/web-ui/modules/app.methods.index.mjs +92 -88
  51. package/web-ui/modules/app.methods.install.mjs +161 -149
  52. package/web-ui/modules/app.methods.navigation.mjs +619 -619
  53. package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
  54. package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -372
  55. package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -369
  56. package/web-ui/modules/app.methods.providers.mjs +404 -363
  57. package/web-ui/modules/app.methods.runtime.mjs +323 -323
  58. package/web-ui/modules/app.methods.session-actions.mjs +537 -520
  59. package/web-ui/modules/app.methods.session-browser.mjs +626 -626
  60. package/web-ui/modules/app.methods.session-timeline.mjs +448 -448
  61. package/web-ui/modules/app.methods.session-trash.mjs +422 -422
  62. package/web-ui/modules/app.methods.startup-claude.mjs +405 -412
  63. package/web-ui/modules/app.methods.task-orchestration.mjs +471 -471
  64. package/web-ui/modules/config-mode.computed.mjs +126 -126
  65. package/web-ui/modules/config-template-confirm-pref.mjs +33 -0
  66. package/web-ui/modules/i18n.mjs +1609 -0
  67. package/web-ui/modules/plugins.computed.mjs +220 -0
  68. package/web-ui/modules/plugins.methods.mjs +620 -0
  69. package/web-ui/modules/plugins.storage.mjs +37 -0
  70. package/web-ui/modules/skills.computed.mjs +107 -107
  71. package/web-ui/modules/skills.methods.mjs +481 -481
  72. package/web-ui/partials/index/layout-footer.html +13 -13
  73. package/web-ui/partials/index/layout-header.html +461 -402
  74. package/web-ui/partials/index/modal-config-template-agents.html +175 -125
  75. package/web-ui/partials/index/modal-confirm-toast.html +32 -32
  76. package/web-ui/partials/index/modal-health-check.html +72 -72
  77. package/web-ui/partials/index/modal-openclaw-config.html +280 -280
  78. package/web-ui/partials/index/modal-skills.html +200 -184
  79. package/web-ui/partials/index/modals-basic.html +165 -156
  80. package/web-ui/partials/index/panel-config-claude.html +138 -126
  81. package/web-ui/partials/index/panel-config-codex.html +234 -237
  82. package/web-ui/partials/index/panel-config-openclaw.html +78 -78
  83. package/web-ui/partials/index/panel-docs.html +147 -130
  84. package/web-ui/partials/index/panel-market.html +174 -174
  85. package/web-ui/partials/index/panel-orchestration.html +397 -397
  86. package/web-ui/partials/index/panel-plugins.html +243 -0
  87. package/web-ui/partials/index/panel-sessions.html +292 -292
  88. package/web-ui/partials/index/panel-settings.html +258 -190
  89. package/web-ui/partials/index/panel-usage.html +353 -213
  90. package/web-ui/session-helpers.mjs +573 -559
  91. package/web-ui/source-bundle.cjs +233 -233
  92. package/web-ui/styles/base-theme.css +264 -271
  93. package/web-ui/styles/controls-forms.css +362 -360
  94. package/web-ui/styles/docs-panel.css +247 -182
  95. package/web-ui/styles/feedback.css +108 -108
  96. package/web-ui/styles/health-check-dialog.css +144 -144
  97. package/web-ui/styles/layout-shell.css +596 -376
  98. package/web-ui/styles/modals-core.css +464 -464
  99. package/web-ui/styles/navigation-panels.css +382 -348
  100. package/web-ui/styles/openclaw-structured.css +266 -266
  101. package/web-ui/styles/plugins-panel.css +518 -0
  102. package/web-ui/styles/responsive.css +456 -450
  103. package/web-ui/styles/sessions-list.css +400 -400
  104. package/web-ui/styles/sessions-preview.css +411 -411
  105. package/web-ui/styles/sessions-toolbar-trash.css +268 -243
  106. package/web-ui/styles/sessions-usage.css +851 -628
  107. package/web-ui/styles/settings-panel.css +166 -0
  108. package/web-ui/styles/skills-list.css +303 -296
  109. package/web-ui/styles/skills-market.css +396 -335
  110. package/web-ui/styles/task-orchestration.css +776 -776
  111. package/web-ui/styles/titles-cards.css +408 -408
  112. package/web-ui/styles.css +20 -18
  113. package/web-ui.html +17 -17
  114. package/README.en.md +0 -349
@@ -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
- claudeModelHasList() {
13
- return this.claudeModelOptions.length > 0;
14
- },
15
- claudeModelOptions() {
16
- const list = Array.isArray(this.claudeModels) ? [...this.claudeModels] : [];
17
- const current = (this.currentClaudeModel || '').trim();
18
- if (current && !list.includes(current)) {
19
- list.unshift(current);
20
- }
21
- return list;
22
- },
23
- displayCurrentProvider() {
24
- const switching = String(this.providerSwitchDisplayTarget || '').trim();
25
- if (switching) return switching;
26
- const current = String(this.currentProvider || '').trim();
27
- return current;
28
- },
29
- displayProvidersList() {
30
- const list = Array.isArray(this.providersList) ? this.providersList : [];
31
- return list.filter((item) => String(item && item.name ? item.name : '').trim().toLowerCase() !== 'codexmate-proxy');
32
- },
33
- installTargetCards() {
34
- const targets = Array.isArray(this.installStatusTargets) ? this.installStatusTargets : [];
35
- const action = this.normalizeInstallAction(this.installCommandAction);
36
- return targets.map((target) => {
37
- const id = target && typeof target.id === 'string' ? target.id : '';
38
- return {
39
- ...target,
40
- command: this.getInstallCommand(id, action)
41
- };
42
- });
43
- },
44
- installRegistryPreview() {
45
- return this.resolveInstallRegistryUrl(this.installRegistryPreset, this.installRegistryCustom);
46
- },
47
- inspectorBusyStatus() {
48
- const tasks = [];
49
- if (this.loading) tasks.push('初始化');
50
- if (this.sessionsLoading) tasks.push('会话加载');
51
- if (this.codexModelsLoading || this.claudeModelsLoading) tasks.push('模型加载');
52
- if (this.codexApplying || this.configTemplateApplying || this.openclawApplying) tasks.push('配置应用');
53
- if (this.agentsSaving) tasks.push('AGENTS 保存');
54
- if (this.skillsLoading || this.skillsDeleting || this.skillsScanningImports || this.skillsImporting || this.skillsZipImporting || this.skillsExporting) tasks.push('Skills 管理');
55
- if (this.taskOrchestration && (this.taskOrchestration.loading || this.taskOrchestration.planning || this.taskOrchestration.running || this.taskOrchestration.queueAdding || this.taskOrchestration.queueStarting || this.taskOrchestration.retrying || this.taskOrchestration.selectedRunLoading)) {
56
- tasks.push('任务编排');
57
- }
58
- return tasks.length ? tasks.join(' / ') : '空闲';
59
- },
60
- inspectorMessageSummary() {
61
- const value = typeof this.message === 'string' ? this.message.trim() : '';
62
- return value || '暂无提示';
63
- },
64
- inspectorSessionSourceLabel() {
65
- if (this.sessionFilterSource === 'codex') return 'Codex';
66
- if (this.sessionFilterSource === 'claude') return 'Claude Code';
67
- return '全部';
68
- },
69
- inspectorSessionPathLabel() {
70
- const value = typeof this.sessionPathFilter === 'string' ? this.sessionPathFilter.trim() : '';
71
- return value || '全部路径';
72
- },
73
- inspectorSessionQueryLabel() {
74
- if (!this.isSessionQueryEnabled) return '当前来源不支持';
75
- const value = typeof this.sessionQuery === 'string' ? this.sessionQuery.trim() : '';
76
- return value || '未设置';
77
- },
78
- inspectorHealthStatus() {
79
- if (this.initError) return '读取失败';
80
- if (this.loading) return '初始化中';
81
- return '正常';
82
- },
83
- inspectorHealthTone() {
84
- if (this.initError) return 'error';
85
- if (this.loading) return 'warn';
86
- return 'ok';
87
- },
88
- inspectorModelLoadStatus() {
89
- if (this.codexModelsLoading || this.claudeModelsLoading) {
90
- return '加载中';
91
- }
92
- if (this.modelsSource === 'error' || this.claudeModelsSource === 'error') {
93
- return '加载异常';
94
- }
95
- return '正常';
96
- },
97
- installTroubleshootingTips() {
98
- const platform = this.resolveInstallPlatform();
99
- if (platform === 'win32') {
100
- return [
101
- 'PowerShell 报权限不足(EACCES/EPERM)时,请以管理员身份执行安装命令。',
102
- '安装后若仍提示找不到命令,重开终端并执行:where codex / where claude。',
103
- '公司网络受限时,可先切换镜像源快捷项(npmmirror / 腾讯云 / 自定义)。'
104
- ];
105
- }
106
- return [
107
- '出现 EACCES 权限错误时,优先修复 Node 全局目录权限,不建议直接 sudo npm。',
108
- '安装后若命令未生效,重开终端并执行:which codex / which claude。',
109
- '公司网络受限时,可先切换镜像源快捷项(npmmirror / 腾讯云 / 自定义)。'
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
- export function createAppComputed() {
8
- return {
9
- ...createSessionComputed(),
10
- ...createDashboardComputed(),
11
- ...createMainTabsComputed(),
12
- ...createSkillsComputed(),
13
- ...createConfigModeComputed()
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
+ }