codexmate 0.0.19 → 0.0.20

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 (67) hide show
  1. package/README.en.md +8 -4
  2. package/README.md +8 -4
  3. package/cli/config-health.js +338 -0
  4. package/cli.js +1136 -584
  5. package/lib/cli-models-utils.js +186 -27
  6. package/lib/cli-network-utils.js +117 -101
  7. package/package.json +8 -1
  8. package/web-ui/app.js +381 -5532
  9. package/web-ui/index.html +15 -2231
  10. package/web-ui/logic.agents-diff.mjs +386 -0
  11. package/web-ui/logic.claude.mjs +108 -0
  12. package/web-ui/logic.mjs +5 -793
  13. package/web-ui/logic.runtime.mjs +124 -0
  14. package/web-ui/logic.sessions.mjs +263 -0
  15. package/web-ui/modules/api.mjs +69 -0
  16. package/web-ui/modules/app.computed.dashboard.mjs +113 -0
  17. package/web-ui/modules/app.computed.index.mjs +13 -0
  18. package/web-ui/modules/app.computed.session.mjs +141 -0
  19. package/web-ui/modules/app.constants.mjs +15 -0
  20. package/web-ui/modules/app.methods.agents.mjs +493 -0
  21. package/web-ui/modules/app.methods.claude-config.mjs +174 -0
  22. package/web-ui/modules/app.methods.codex-config.mjs +640 -0
  23. package/web-ui/modules/app.methods.index.mjs +86 -0
  24. package/web-ui/modules/app.methods.install.mjs +157 -0
  25. package/web-ui/modules/app.methods.navigation.mjs +478 -0
  26. package/web-ui/modules/app.methods.openclaw-core.mjs +514 -0
  27. package/web-ui/modules/app.methods.openclaw-editing.mjs +337 -0
  28. package/web-ui/modules/app.methods.openclaw-persist.mjs +251 -0
  29. package/web-ui/modules/app.methods.providers.mjs +265 -0
  30. package/web-ui/modules/app.methods.runtime.mjs +323 -0
  31. package/web-ui/modules/app.methods.session-actions.mjs +457 -0
  32. package/web-ui/modules/app.methods.session-browser.mjs +435 -0
  33. package/web-ui/modules/app.methods.session-timeline.mjs +441 -0
  34. package/web-ui/modules/app.methods.session-trash.mjs +419 -0
  35. package/web-ui/modules/app.methods.startup-claude.mjs +406 -0
  36. package/web-ui/partials/index/layout-footer.html +69 -0
  37. package/web-ui/partials/index/layout-header.html +337 -0
  38. package/web-ui/partials/index/modal-config-template-agents.html +125 -0
  39. package/web-ui/partials/index/modal-confirm-toast.html +32 -0
  40. package/web-ui/partials/index/modal-health-check.html +72 -0
  41. package/web-ui/partials/index/modal-openclaw-config.html +275 -0
  42. package/web-ui/partials/index/modal-skills.html +184 -0
  43. package/web-ui/partials/index/modals-basic.html +196 -0
  44. package/web-ui/partials/index/panel-config-claude.html +100 -0
  45. package/web-ui/partials/index/panel-config-codex.html +237 -0
  46. package/web-ui/partials/index/panel-config-openclaw.html +84 -0
  47. package/web-ui/partials/index/panel-market.html +174 -0
  48. package/web-ui/partials/index/panel-sessions.html +387 -0
  49. package/web-ui/partials/index/panel-settings.html +166 -0
  50. package/web-ui/source-bundle.cjs +233 -0
  51. package/web-ui/styles/base-theme.css +373 -0
  52. package/web-ui/styles/controls-forms.css +354 -0
  53. package/web-ui/styles/feedback.css +108 -0
  54. package/web-ui/styles/health-check-dialog.css +144 -0
  55. package/web-ui/styles/layout-shell.css +330 -0
  56. package/web-ui/styles/modals-core.css +449 -0
  57. package/web-ui/styles/navigation-panels.css +381 -0
  58. package/web-ui/styles/openclaw-structured.css +266 -0
  59. package/web-ui/styles/responsive.css +416 -0
  60. package/web-ui/styles/sessions-list.css +414 -0
  61. package/web-ui/styles/sessions-preview.css +405 -0
  62. package/web-ui/styles/sessions-toolbar-trash.css +243 -0
  63. package/web-ui/styles/sessions-usage.css +276 -0
  64. package/web-ui/styles/skills-list.css +298 -0
  65. package/web-ui/styles/skills-market.css +335 -0
  66. package/web-ui/styles/titles-cards.css +407 -0
  67. package/web-ui/styles.css +16 -4668
@@ -0,0 +1,108 @@
1
+ /* ============================================
2
+ Toast - 顶部横幅
3
+ ============================================ */
4
+ .toast {
5
+ position: fixed;
6
+ top: 16px;
7
+ left: 50%;
8
+ transform: translateX(-50%);
9
+ background: linear-gradient(to bottom, var(--color-surface) 0%, rgba(255, 255, 255, 0.95) 100%);
10
+ padding: 12px 24px;
11
+ border-radius: var(--radius-full);
12
+ box-shadow: var(--shadow-raised);
13
+ z-index: 200;
14
+ animation: slideDown var(--transition-slow) var(--ease-spring);
15
+ display: flex;
16
+ align-items: center;
17
+ gap: var(--spacing-xs);
18
+ font-size: var(--font-size-body);
19
+ font-weight: var(--font-weight-body);
20
+ border: 1px solid rgba(255, 255, 255, 0.8);
21
+ backdrop-filter: blur(8px);
22
+ -webkit-backdrop-filter: blur(8px);
23
+ }
24
+
25
+ .toast.error {
26
+ border-left: 3px solid var(--color-error);
27
+ }
28
+
29
+ .toast.success {
30
+ border-left: 3px solid var(--color-success);
31
+ }
32
+
33
+ /* ============================================
34
+ 状态消息
35
+ ============================================ */
36
+ .state-message {
37
+ text-align: center;
38
+ padding: 60px var(--spacing-md);
39
+ color: var(--color-text-tertiary);
40
+ font-size: var(--font-size-body);
41
+ opacity: 0.7;
42
+ letter-spacing: -0.005em;
43
+ }
44
+
45
+ .state-message.error {
46
+ color: var(--color-error);
47
+ }
48
+
49
+ /* 空状态 */
50
+ .empty-state {
51
+ text-align: center;
52
+ padding: 48px var(--spacing-md);
53
+ color: var(--color-text-tertiary);
54
+ }
55
+
56
+ .empty-state-icon {
57
+ width: 48px;
58
+ height: 48px;
59
+ margin: 0 auto var(--spacing-sm);
60
+ opacity: 0.3;
61
+ }
62
+
63
+ .empty-state-title {
64
+ font-size: var(--font-size-body);
65
+ font-weight: var(--font-weight-secondary);
66
+ color: var(--color-text-secondary);
67
+ margin-bottom: 4px;
68
+ }
69
+
70
+ .empty-state-subtitle {
71
+ font-size: var(--font-size-secondary);
72
+ color: var(--color-text-tertiary);
73
+ opacity: 0.8;
74
+ }
75
+
76
+ /* ============================================
77
+ 动画
78
+ ============================================ */
79
+ @keyframes fadeIn {
80
+ from { opacity: 0; }
81
+ to { opacity: 1; }
82
+ }
83
+
84
+ @keyframes slideUp {
85
+ from { transform: translateY(24px); opacity: 0; }
86
+ to { transform: translateY(0); opacity: 1; }
87
+ }
88
+
89
+ @keyframes slideDown {
90
+ from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
91
+ to { transform: translateX(-50%) translateY(0); opacity: 1; }
92
+ }
93
+
94
+ @keyframes spin {
95
+ from { transform: rotate(0deg); }
96
+ to { transform: rotate(360deg); }
97
+ }
98
+
99
+ [v-cloak] {
100
+ display: none !important;
101
+ }
102
+
103
+ /* 模式内容容器 */
104
+ .mode-content {
105
+ animation: fadeIn var(--transition-normal) var(--ease-spring);
106
+ }
107
+
108
+ /* TODO: 内容区域包裹器当前不需要额外稳定高度样式,保留注释避免误判为缺失规则。 */
@@ -0,0 +1,144 @@
1
+ .health-check-dialog {
2
+ width: min(88vw, 720px);
3
+ max-width: 720px;
4
+ padding: 20px;
5
+ }
6
+
7
+ .health-check-dialog-subtitle {
8
+ margin-top: -6px;
9
+ color: var(--color-text-tertiary);
10
+ font-size: var(--font-size-secondary);
11
+ }
12
+
13
+ .health-check-dialog-lock {
14
+ display: inline-flex;
15
+ align-items: center;
16
+ gap: 6px;
17
+ padding: 8px 12px;
18
+ border-radius: 999px;
19
+ background: rgba(201, 94, 75, 0.12);
20
+ color: var(--color-text-primary);
21
+ font-size: var(--font-size-caption);
22
+ font-weight: var(--font-weight-secondary);
23
+ }
24
+
25
+ .health-check-dialog-controls {
26
+ display: flex;
27
+ align-items: flex-end;
28
+ gap: 12px;
29
+ margin-bottom: 12px;
30
+ flex-wrap: wrap;
31
+ }
32
+
33
+ .health-check-dialog-provider {
34
+ flex: 1 1 260px;
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .health-check-dialog-result {
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 10px;
42
+ flex-wrap: wrap;
43
+ min-height: 42px;
44
+ padding: 8px 10px;
45
+ border-radius: var(--radius-sm);
46
+ border: 1px solid var(--color-border-soft);
47
+ background: rgba(255, 255, 255, 0.72);
48
+ font-size: var(--font-size-caption);
49
+ color: var(--color-text-secondary);
50
+ }
51
+
52
+ .health-check-dialog-result.ok {
53
+ border-color: rgba(57, 181, 97, 0.25);
54
+ background: rgba(57, 181, 97, 0.08);
55
+ color: #2b6a3b;
56
+ }
57
+
58
+ .health-check-dialog-result.error {
59
+ border-color: rgba(220, 95, 108, 0.28);
60
+ background: rgba(220, 95, 108, 0.08);
61
+ color: #8a2f36;
62
+ }
63
+
64
+ .health-check-dialog-thread {
65
+ max-height: 300px;
66
+ overflow-y: auto;
67
+ margin-bottom: 12px;
68
+ padding: 10px;
69
+ border: 1px solid var(--color-border-soft);
70
+ border-radius: var(--radius-lg);
71
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(246, 240, 232, 0.9) 100%);
72
+ }
73
+
74
+ .health-check-dialog-empty {
75
+ padding: 16px;
76
+ border: 1px dashed var(--color-border-soft);
77
+ border-radius: var(--radius-sm);
78
+ color: var(--color-text-tertiary);
79
+ text-align: center;
80
+ background: rgba(255, 255, 255, 0.7);
81
+ }
82
+
83
+ .health-check-message + .health-check-message {
84
+ margin-top: 10px;
85
+ }
86
+
87
+ .health-check-message {
88
+ padding: 10px 12px;
89
+ border-radius: 16px;
90
+ border: 1px solid rgba(201, 94, 75, 0.12);
91
+ background: rgba(255, 255, 255, 0.84);
92
+ box-shadow: var(--shadow-subtle);
93
+ }
94
+
95
+ .health-check-message.user {
96
+ margin-left: auto;
97
+ max-width: 82%;
98
+ background: linear-gradient(to bottom, rgba(201, 94, 75, 0.12) 0%, rgba(201, 94, 75, 0.06) 100%);
99
+ }
100
+
101
+ .health-check-message.assistant {
102
+ margin-right: auto;
103
+ max-width: 88%;
104
+ }
105
+
106
+ .health-check-message.error {
107
+ border-color: rgba(220, 95, 108, 0.24);
108
+ background: rgba(220, 95, 108, 0.08);
109
+ }
110
+
111
+ .health-check-message-meta {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 8px;
115
+ flex-wrap: wrap;
116
+ margin-bottom: 4px;
117
+ color: var(--color-text-tertiary);
118
+ font-size: var(--font-size-caption);
119
+ }
120
+
121
+ .health-check-message-text {
122
+ white-space: pre-wrap;
123
+ word-break: break-word;
124
+ color: var(--color-text-primary);
125
+ line-height: 1.65;
126
+ }
127
+
128
+ .health-check-message-raw {
129
+ margin: 8px 0 0;
130
+ padding: 10px;
131
+ border-radius: var(--radius-sm);
132
+ background: rgba(31, 26, 23, 0.04);
133
+ border: 1px dashed var(--color-border-soft);
134
+ color: var(--color-text-secondary);
135
+ white-space: pre-wrap;
136
+ word-break: break-word;
137
+ font-size: 12px;
138
+ font-family: var(--font-family-mono);
139
+ }
140
+
141
+ .health-check-dialog-textarea {
142
+ min-height: 88px;
143
+ resize: vertical;
144
+ }
@@ -0,0 +1,330 @@
1
+ /* ============================================
2
+ 容器
3
+ ============================================ */
4
+ body::before {
5
+ content: "";
6
+ position: fixed;
7
+ inset: 0;
8
+ background-image:
9
+ linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
10
+ opacity: 0.16;
11
+ pointer-events: none;
12
+ z-index: 0;
13
+ }
14
+
15
+ /* 背景网格 */
16
+ body::after {
17
+ content: "";
18
+ position: fixed;
19
+ inset: 0;
20
+ background-image:
21
+ linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
22
+ linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
23
+ background-size: 180px 180px;
24
+ opacity: 0.08;
25
+ pointer-events: none;
26
+ z-index: 0;
27
+ }
28
+
29
+ /* ============================================
30
+ 容器
31
+ ============================================ */
32
+ .container {
33
+ width: 100%;
34
+ max-width: 2200px;
35
+ margin: 0 auto;
36
+ padding: 16px 12px 28px;
37
+ position: relative;
38
+ z-index: 1;
39
+ }
40
+
41
+ /* ============================================
42
+ 布局:三栏(侧栏 + 主区 + 状态检查器)
43
+ ============================================ */
44
+ .app-shell {
45
+ display: grid;
46
+ grid-template-columns: 260px minmax(0, 1fr) 340px;
47
+ gap: 16px;
48
+ align-items: flex-start;
49
+ }
50
+
51
+ .app-shell.standalone {
52
+ grid-template-columns: 1fr;
53
+ }
54
+
55
+ .side-rail {
56
+ position: sticky;
57
+ top: var(--spacing-md);
58
+ align-self: start;
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: var(--spacing-sm);
62
+ padding: var(--spacing-md) var(--spacing-sm);
63
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 245, 0.9) 100%);
64
+ border: 1px solid rgba(216, 201, 184, 0.65);
65
+ border-radius: var(--radius-xl);
66
+ box-shadow: var(--shadow-card);
67
+ min-height: 420px;
68
+ }
69
+
70
+ .side-rail .brand-title {
71
+ font-size: 24px;
72
+ margin-bottom: 2px;
73
+ }
74
+
75
+ .side-section {
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: 10px;
79
+ }
80
+
81
+ .side-section-title {
82
+ font-size: var(--font-size-secondary);
83
+ font-weight: var(--font-weight-secondary);
84
+ color: var(--color-text-tertiary);
85
+ letter-spacing: 0.01em;
86
+ padding: 0 var(--spacing-xs);
87
+ }
88
+
89
+ .side-item {
90
+ width: 100%;
91
+ text-align: left;
92
+ padding: 12px var(--spacing-sm);
93
+ border-radius: var(--radius-lg);
94
+ border: 1px solid var(--color-border-soft);
95
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 240, 0.95) 100%);
96
+ color: var(--color-text-secondary);
97
+ cursor: pointer;
98
+ transition: none;
99
+ display: flex;
100
+ flex-direction: column;
101
+ gap: 6px;
102
+ box-shadow: var(--shadow-subtle);
103
+ }
104
+
105
+ .side-item:hover {
106
+ border-color: var(--color-brand);
107
+ color: var(--color-text-primary);
108
+ transform: translateY(-1px);
109
+ box-shadow: var(--shadow-card-hover);
110
+ }
111
+
112
+ .side-item.active {
113
+ border-color: var(--color-brand);
114
+ background: linear-gradient(135deg, rgba(201, 94, 75, 0.14), rgba(255, 255, 255, 0.96));
115
+ color: var(--color-text-primary);
116
+ box-shadow: var(--shadow-float);
117
+ }
118
+
119
+ .side-item.nav-intent-active {
120
+ border-color: var(--color-brand);
121
+ background: linear-gradient(135deg, rgba(201, 94, 75, 0.14), rgba(255, 255, 255, 0.96));
122
+ color: var(--color-text-primary);
123
+ box-shadow: var(--shadow-float);
124
+ }
125
+
126
+ .side-item.nav-intent-inactive,
127
+ .side-item.active.nav-intent-inactive {
128
+ border-color: var(--color-border-soft);
129
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 240, 0.95) 100%);
130
+ color: var(--color-text-secondary);
131
+ box-shadow: var(--shadow-subtle);
132
+ }
133
+
134
+ .side-item-title {
135
+ font-size: var(--font-size-body);
136
+ font-weight: var(--font-weight-secondary);
137
+ letter-spacing: -0.01em;
138
+ }
139
+
140
+ .side-item-meta {
141
+ font-size: var(--font-size-caption);
142
+ color: var(--color-text-tertiary);
143
+ display: flex;
144
+ gap: 8px;
145
+ flex-wrap: wrap;
146
+ }
147
+
148
+ .side-item-meta > span {
149
+ min-width: 0;
150
+ overflow-wrap: anywhere;
151
+ word-break: break-word;
152
+ }
153
+
154
+ @media (min-width: 961px) {
155
+ body:not(.force-compact) #app > .top-tabs {
156
+ display: none;
157
+ }
158
+ }
159
+
160
+ .brand-block {
161
+ display: grid;
162
+ grid-template-columns: 48px 1fr;
163
+ grid-template-rows: auto auto;
164
+ column-gap: var(--spacing-sm);
165
+ row-gap: 2px;
166
+ align-items: center;
167
+ margin-bottom: var(--spacing-md);
168
+ }
169
+
170
+ .brand-logo-wrap {
171
+ width: 48px;
172
+ height: 48px;
173
+ border-radius: 14px;
174
+ background: rgba(208, 88, 58, 0.08);
175
+ border: 1px solid var(--color-border-soft);
176
+ display: grid;
177
+ place-items: center;
178
+ box-shadow: var(--shadow-subtle);
179
+ flex-shrink: 0;
180
+ grid-row: 1 / span 2;
181
+ }
182
+
183
+ .brand-logo {
184
+ width: 34px;
185
+ height: 34px;
186
+ object-fit: contain;
187
+ display: block;
188
+ }
189
+
190
+ .brand-title {
191
+ font-size: 30px;
192
+ line-height: 1.05;
193
+ font-family: var(--font-family-display);
194
+ color: var(--color-text-primary);
195
+ letter-spacing: -0.02em;
196
+ }
197
+
198
+ .brand-title .accent {
199
+ color: var(--color-brand);
200
+ }
201
+
202
+ .brand-subtitle {
203
+ margin-top: 8px;
204
+ font-size: var(--font-size-secondary);
205
+ color: var(--color-text-tertiary);
206
+ line-height: 1.45;
207
+ }
208
+
209
+ .github-badge {
210
+ grid-column: 2;
211
+ display: inline-flex;
212
+ align-items: center;
213
+ justify-content: space-between;
214
+ gap: 10px;
215
+ margin-top: 6px;
216
+ padding: 6px 10px;
217
+ border-radius: 999px;
218
+ border: 1px solid var(--color-border-soft);
219
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 100%);
220
+ color: var(--color-text-secondary);
221
+ font-size: var(--font-size-caption);
222
+ text-decoration: none;
223
+ box-shadow: var(--shadow-subtle);
224
+ transition: all var(--transition-fast) var(--ease-spring);
225
+ min-width: 0;
226
+ }
227
+
228
+ .github-badge-rail {
229
+ width: 100%;
230
+ align-items: center;
231
+ justify-content: flex-start;
232
+ gap: 8px;
233
+ padding: 6px 8px;
234
+ border-radius: 10px;
235
+ background: rgba(255, 255, 255, 0.8);
236
+ border: 1px solid rgba(216, 201, 184, 0.5);
237
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
238
+ }
239
+
240
+ .github-badge:hover {
241
+ border-color: rgba(201, 94, 75, 0.5);
242
+ color: var(--color-text-primary);
243
+ transform: translateY(-1px);
244
+ box-shadow: 0 6px 12px rgba(27, 23, 20, 0.08);
245
+ }
246
+
247
+ .github-badge-icon {
248
+ width: 16px;
249
+ height: 16px;
250
+ flex-shrink: 0;
251
+ }
252
+
253
+ .github-badge-left {
254
+ display: inline-flex;
255
+ align-items: center;
256
+ gap: 6px;
257
+ flex-shrink: 0;
258
+ }
259
+
260
+ .github-badge-label {
261
+ font-size: var(--font-size-caption);
262
+ font-weight: var(--font-weight-secondary);
263
+ color: var(--color-text-secondary);
264
+ }
265
+
266
+ .github-badge-text {
267
+ min-width: 0;
268
+ font-family: var(--font-family-mono);
269
+ font-size: var(--font-size-caption);
270
+ color: var(--color-text-tertiary);
271
+ line-height: 1.3;
272
+ display: inline-block;
273
+ overflow: hidden;
274
+ text-overflow: ellipsis;
275
+ white-space: nowrap;
276
+ }
277
+
278
+ .github-badge-text > span {
279
+ white-space: nowrap;
280
+ }
281
+
282
+ .github-owner {
283
+ font-weight: 600;
284
+ color: var(--color-text-secondary);
285
+ }
286
+
287
+ .github-sep {
288
+ margin: 0 2px;
289
+ color: var(--color-text-tertiary);
290
+ }
291
+
292
+ .github-repo {
293
+ font-weight: 600;
294
+ color: var(--color-text-primary);
295
+ }
296
+
297
+ .github-badge-rail .github-badge-text {
298
+ display: flex;
299
+ flex-direction: column;
300
+ align-items: flex-start;
301
+ gap: 2px;
302
+ white-space: normal;
303
+ overflow: visible;
304
+ text-overflow: clip;
305
+ color: var(--color-text-secondary);
306
+ }
307
+
308
+ .github-badge-rail .github-sep {
309
+ display: none;
310
+ }
311
+
312
+ .github-badge-rail .github-owner,
313
+ .github-badge-rail .github-repo {
314
+ font-weight: 600;
315
+ }
316
+
317
+ .github-badge-rail .github-badge-left {
318
+ padding: 4px;
319
+ border-radius: 999px;
320
+ background: rgba(201, 94, 75, 0.12);
321
+ }
322
+
323
+ .github-badge-rail .github-badge-label {
324
+ display: none;
325
+ }
326
+
327
+ .github-badge-rail:hover {
328
+ transform: translateY(-1px);
329
+ border-color: rgba(201, 94, 75, 0.5);
330
+ }