@ohos-cpf/3rdloop 0.0.3 → 0.0.5

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 (46) hide show
  1. package/README.md +124 -87
  2. package/lib/cli.js +25 -0
  3. package/lib/config-cmd.js +1 -1
  4. package/lib/serve.js +268 -0
  5. package/lib/update.js +46 -6
  6. package/lib/web-ext.js +454 -0
  7. package/lib/web.js +664 -0
  8. package/package.json +2 -1
  9. package/vendor/Server/Agent/SkillSelector/README.md +11 -11
  10. package/vendor/Server/Agent/SkillSelector/llm/llmClient.js +3 -3
  11. package/vendor/Server/Skills/arkts-code-use/SKILL.md +270 -0
  12. package/vendor/Server/Skills/arkts-code-use/assets/TEMPLATES.md +367 -0
  13. package/vendor/Server/Skills/arkts-code-use/references/API_VERIFICATION.md +144 -0
  14. package/vendor/Server/Skills/arkts-code-use/references/ARKTS_RULES.md +240 -0
  15. package/vendor/Server/Skills/arkts-code-use/references/CODE_PATTERNS.md +431 -0
  16. package/vendor/Server/Skills/arkts-code-use/references/SYNTAX_CHECK_GUIDE.md +164 -0
  17. package/vendor/Server/Skills/arkts-code-use/scripts/verify-arkts.cjs +428 -0
  18. package/vendor/Server/Skills/gitcode-repo-fork/SKILL.md +310 -0
  19. package/vendor/Server/Skills/gitcode-repo-fork/assets/FORK_REPORT_TEMPLATE.md +113 -0
  20. package/vendor/Server/Skills/gitcode-repo-fork/references/FORK_DECISION_GUIDE.md +124 -0
  21. package/vendor/Server/Skills/gitcode-repo-fork/references/GITCODE_FORK_API.md +95 -0
  22. package/vendor/Server/Skills/gitcode-repo-fork/scripts/gitcode-fork.cjs +285 -0
  23. package/vendor/VERSION +3 -3
  24. package/web/css/arktslibrarycheck.css +322 -0
  25. package/web/css/codecheck.css +464 -0
  26. package/web/css/flutterlibrarycheck.css +322 -0
  27. package/web/css/knowledge.css +332 -0
  28. package/web/css/loop.css +578 -0
  29. package/web/css/md-reader.css +240 -0
  30. package/web/css/rnlibrarycheck.css +322 -0
  31. package/web/css/theme.css +702 -0
  32. package/web/index.html +713 -0
  33. package/web/js/arktslibrarycheck.js +1413 -0
  34. package/web/js/codecheck.js +1039 -0
  35. package/web/js/flutterlibrarycheck.js +1364 -0
  36. package/web/js/health.js +69 -0
  37. package/web/js/knowledge.js +358 -0
  38. package/web/js/loop.js +1102 -0
  39. package/web/js/md-reader.js +435 -0
  40. package/web/js/navigation.js +238 -0
  41. package/web/js/rnlibrarycheck.js +1378 -0
  42. package/web/js/stats.js +110 -0
  43. package/web/js/theme.js +46 -0
  44. package/web/js/utils.js +228 -0
  45. package/web/knowledge.html +146 -0
  46. package/web/loop.html +219 -0
@@ -0,0 +1,702 @@
1
+ /* ════════════════════════════════════════════════════════════════════
2
+ * theme.css — 统一主题系统(日间 / 夜间模式)+ 布局 + 共享组件样式
3
+ *
4
+ * 设计原则:高内聚低耦合
5
+ * - 主题变量集中定义,所有颜色/间距通过 var() 引用
6
+ * - 布局骨架(header / nav / main / panel)在此定义
7
+ * - 共享组件(按钮、表单、弹窗、Toast、徽章)在此定义
8
+ * - 各功能面板专用样式保持在独立 CSS 文件中(loop.css / knowledge.css)
9
+ * ════════════════════════════════════════════════════════════════════ */
10
+
11
+ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
12
+
13
+ /* ─── 日间模式(默认) ─────────────────────────────────────────────── */
14
+ :root {
15
+ --bg: #f0f0f5;
16
+ --sidebar: #e8e8ed;
17
+ --card: #ffffff;
18
+ --border: #d2d2d7;
19
+ --border-light: #e0e0e5;
20
+ --text: #1d1d1f;
21
+ --text2: #5d5d63;
22
+ --text3: #82828a;
23
+ --blue: #0071e3;
24
+ --blue-hover: #0077ed;
25
+ --blue-light: #d4e5ff;
26
+ --green: #34c759;
27
+ --green-light: #d4f4dd;
28
+ --red: #ff3b30;
29
+ --red-light: #fde0e0;
30
+ --orange: #ff9500;
31
+ --orange-light: #fff0d4;
32
+ --yellow: #ffd60a;
33
+ --yellow-light: #fff9e0;
34
+ --gray: #8e8e93;
35
+ --gray-light: #e5e5ea;
36
+ --purple: #af52de;
37
+ --purple-light: #f0d4ff;
38
+ --code-bg: #f5f5f7;
39
+ --flutter: #2563eb;
40
+ --flutter-bg: rgba(37,99,235,0.10);
41
+ --flutter-border: rgba(37,99,235,0.35);
42
+ --rn: #0e7490;
43
+ --rn-bg: rgba(14,116,144,0.10);
44
+ --rn-border: rgba(14,116,144,0.35);
45
+ --shadow: 0 1px 8px rgba(0,0,0,0.06);
46
+ --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
47
+ --grid-dot: #d2d2d7;
48
+ --overlay-bg: rgba(0,0,0,0.4);
49
+ --inline-code-text: #6e6e73;
50
+ --badge-green-text: #1a8a34;
51
+ --badge-red-text: #c5231a;
52
+ --badge-yellow-text: #c5a900;
53
+ --mono: "SF Mono", Monaco, "JetBrains Mono", "Fira Code", monospace;
54
+ --radius: 10px;
55
+ --header-h: 56px;
56
+ --nav-w: 240px;
57
+ }
58
+
59
+ /* ─── 夜间模式 ─────────────────────────────────────────────────────── */
60
+ [data-theme="dark"] {
61
+ --bg: #0d0f18;
62
+ --sidebar: #12151f;
63
+ --card: #191c28;
64
+ --border: #242738;
65
+ --border-light: #2d3148;
66
+ --text: #cdd5e8;
67
+ --text2: #8a93b2;
68
+ --text3: #535b7a;
69
+ --blue: #4d8cf7;
70
+ --blue-hover: #5d9cff;
71
+ --blue-light: rgba(77,140,247,0.15);
72
+ --green: #3ab571;
73
+ --green-light: rgba(58,181,113,0.15);
74
+ --red: #df4545;
75
+ --red-light: rgba(223,69,69,0.15);
76
+ --orange: #e09a18;
77
+ --orange-light: rgba(224,154,24,0.15);
78
+ --yellow: #c5a900;
79
+ --yellow-light: rgba(197,169,0,0.15);
80
+ --gray: #535b7a;
81
+ --gray-light: rgba(83,91,122,0.2);
82
+ --purple: #7b5cf0;
83
+ --purple-light: rgba(123,92,240,0.15);
84
+ --code-bg: #0d0f18;
85
+ --flutter: #7cb1f9;
86
+ --flutter-bg: rgba(59,130,246,0.15);
87
+ --flutter-border: rgba(59,130,246,0.40);
88
+ --rn: #61dafb;
89
+ --rn-bg: rgba(97,218,251,0.12);
90
+ --rn-border: rgba(97,218,251,0.35);
91
+ --shadow: 0 1px 8px rgba(0,0,0,0.3);
92
+ --shadow-lg: 0 4px 20px rgba(0,0,0,0.5);
93
+ --grid-dot: #242738;
94
+ --overlay-bg: rgba(0,0,0,0.6);
95
+ --inline-code-text: #a8b2cc;
96
+ --badge-green-text: var(--green);
97
+ --badge-red-text: var(--red);
98
+ --badge-yellow-text: var(--yellow);
99
+ }
100
+
101
+ /* ─── 基础 ─────────────────────────────────────────────────────────── */
102
+ html, body {
103
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
104
+ background: var(--bg);
105
+ color: var(--text);
106
+ height: 100vh;
107
+ overflow: hidden;
108
+ font-size: 14px;
109
+ line-height: 1.6;
110
+ }
111
+
112
+ /* ─── 主布局:Grid(header 全宽 + nav 左 + main 右) ──────────────── */
113
+ /* 默认(功能工作台模式):nav + main 两列 */
114
+ .layout {
115
+ display: grid;
116
+ grid-template-columns: var(--nav-w) 1fr;
117
+ grid-template-rows: var(--header-h) 1fr;
118
+ height: 100vh;
119
+ }
120
+
121
+ /* 循环控制台模式:隐藏 nav,main 独占全宽(loop 面板内部自带 sidebar+content 布局) */
122
+ .layout[data-view="loop"] {
123
+ grid-template-columns: 1fr;
124
+ }
125
+ .layout[data-view="loop"] > nav {
126
+ display: none;
127
+ }
128
+
129
+ /* 知识管理模式:隐藏 nav,main 独占全宽(知识面板内部自带 sidebar+content 布局) */
130
+ .layout[data-view="knowledge"] {
131
+ grid-template-columns: 1fr;
132
+ }
133
+ .layout[data-view="knowledge"] > nav {
134
+ display: none;
135
+ }
136
+
137
+ /* ─── 视图切换器(顶栏 logo 右侧) ─────────────────────────────────── */
138
+ .view-switcher {
139
+ display: flex;
140
+ gap: 2px;
141
+ background: var(--bg);
142
+ border: 1px solid var(--border);
143
+ border-radius: 8px;
144
+ padding: 2px;
145
+ }
146
+ .view-btn {
147
+ padding: 5px 14px;
148
+ border: none;
149
+ border-radius: 6px;
150
+ font-size: 12px;
151
+ font-weight: 600;
152
+ background: transparent;
153
+ color: var(--text2);
154
+ cursor: pointer;
155
+ transition: all 0.15s;
156
+ white-space: nowrap;
157
+ }
158
+ .view-btn:hover { color: var(--text); }
159
+ .view-btn.active {
160
+ background: var(--blue);
161
+ color: #fff;
162
+ box-shadow: 0 1px 4px rgba(0,0,0,0.15);
163
+ }
164
+
165
+ /* ─── 顶栏 ─────────────────────────────────────────────────────────── */
166
+ header {
167
+ grid-column: 1 / -1;
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 14px;
171
+ padding: 0 20px;
172
+ background: var(--card);
173
+ border-bottom: 1px solid var(--border);
174
+ flex-shrink: 0;
175
+ z-index: 100;
176
+ position: relative;
177
+ }
178
+
179
+ header::after {
180
+ content: '';
181
+ position: absolute;
182
+ bottom: 0; left: 0; right: 0;
183
+ height: 1px;
184
+ background: linear-gradient(90deg, var(--blue) 0%, var(--purple) 35%, transparent 70%);
185
+ opacity: 0.4;
186
+ }
187
+
188
+ .logo {
189
+ font-size: 16px;
190
+ font-weight: 700;
191
+ color: var(--text);
192
+ letter-spacing: -0.2px;
193
+ white-space: nowrap;
194
+ }
195
+ .logo span { color: var(--blue); }
196
+
197
+ .logo-badge {
198
+ font-size: 10px;
199
+ font-weight: 600;
200
+ letter-spacing: 0.05em;
201
+ background: linear-gradient(135deg, var(--blue), var(--purple));
202
+ color: #fff;
203
+ padding: 2px 7px;
204
+ border-radius: 20px;
205
+ margin-left: 6px;
206
+ }
207
+
208
+ .header-right {
209
+ margin-left: auto;
210
+ display: flex;
211
+ align-items: center;
212
+ gap: 10px;
213
+ }
214
+
215
+ /* 统计胶囊(访问计数 / Session 调用计数) */
216
+ .stats-pill {
217
+ display: flex;
218
+ align-items: center;
219
+ gap: 4px;
220
+ font-size: 12px;
221
+ color: var(--text2);
222
+ font-family: var(--mono);
223
+ background: var(--bg);
224
+ border: 1px solid var(--border);
225
+ padding: 4px 10px;
226
+ border-radius: 20px;
227
+ white-space: nowrap;
228
+ transition: border-color 0.15s;
229
+ }
230
+ .stats-pill:hover { border-color: var(--blue); }
231
+ .stats-pill .sp-icon { font-size: 11px; }
232
+ .stats-pill > span:nth-child(2) { font-weight: 600; color: var(--text); }
233
+ .stats-pill .sp-label { font-size: 10px; opacity: 0.6; }
234
+
235
+ /* ─── Session 并发占用指示(顶栏 pill 变体)────────────────────────── */
236
+ .stats-pill.conc-high {
237
+ border-color: var(--orange);
238
+ background: var(--orange-light);
239
+ }
240
+ .stats-pill.conc-high > span:nth-child(2) { color: var(--orange); }
241
+
242
+ .stats-pill.conc-full {
243
+ border-color: var(--red);
244
+ background: var(--red-light);
245
+ animation: conc-pulse 2s ease-in-out infinite;
246
+ }
247
+ .stats-pill.conc-full > span:nth-child(2) { color: var(--red); }
248
+
249
+ @keyframes conc-pulse {
250
+ 0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0.25); }
251
+ 50% { box-shadow: 0 0 0 4px rgba(255,59,48,0.08); }
252
+ }
253
+
254
+ /* 主题切换按钮 */
255
+ .theme-toggle {
256
+ display: flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ width: 34px;
260
+ height: 34px;
261
+ border: 1px solid var(--border);
262
+ border-radius: 8px;
263
+ background: var(--card);
264
+ cursor: pointer;
265
+ transition: all 0.2s;
266
+ font-size: 16px;
267
+ }
268
+ .theme-toggle:hover { border-color: var(--blue); }
269
+ .theme-toggle .theme-icon-dark { display: none; }
270
+ [data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
271
+ [data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline; }
272
+
273
+ /* 后端健康状态 */
274
+ .server-tag {
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 5px;
278
+ font-size: 12px;
279
+ color: var(--text2);
280
+ font-family: var(--mono);
281
+ white-space: nowrap;
282
+ }
283
+ .server-tag b { color: var(--green); font-weight: 600; }
284
+ #health-dot {
285
+ width: 7px; height: 7px;
286
+ border-radius: 50%;
287
+ background: var(--text3);
288
+ display: inline-block;
289
+ transition: background 0.4s;
290
+ }
291
+ #health-dot.ok { background: var(--green); }
292
+ #health-dot.error { background: var(--red); }
293
+
294
+ /* ─── 左侧导航栏 ───────────────────────────────────────────────────── */
295
+ nav {
296
+ background: var(--sidebar);
297
+ border-right: 1px solid var(--border);
298
+ overflow-y: auto;
299
+ display: flex;
300
+ flex-direction: column;
301
+ }
302
+
303
+ .nav-section {
304
+ padding: 12px 16px 4px;
305
+ font-size: 10px;
306
+ font-weight: 600;
307
+ color: var(--text3);
308
+ text-transform: uppercase;
309
+ letter-spacing: 0.1em;
310
+ }
311
+
312
+ .nav-item {
313
+ display: flex;
314
+ align-items: center;
315
+ gap: 10px;
316
+ padding: 8px 16px;
317
+ cursor: pointer;
318
+ color: var(--text2);
319
+ font-size: 13px;
320
+ transition: background 0.15s, color 0.15s;
321
+ border-left: 3px solid transparent;
322
+ margin: 1px 0;
323
+ user-select: none;
324
+ }
325
+ .nav-item:hover { background: rgba(0,113,227,0.06); color: var(--text); }
326
+ [data-theme="dark"] .nav-item:hover { background: rgba(77,140,247,0.07); }
327
+
328
+ .nav-item.active {
329
+ background: var(--blue-light);
330
+ color: var(--blue);
331
+ border-left-color: var(--blue);
332
+ }
333
+
334
+ .nav-item-disabled {
335
+ opacity: 0.45;
336
+ cursor: not-allowed;
337
+ }
338
+ .nav-item-disabled:hover { background: transparent; color: var(--text2); }
339
+
340
+ .nav-soon {
341
+ font-size: 9px;
342
+ color: var(--text3);
343
+ background: var(--gray-light);
344
+ padding: 1px 5px;
345
+ border-radius: 8px;
346
+ margin-left: auto;
347
+ font-weight: 600;
348
+ }
349
+
350
+ /* 方法标签(GET/POST/LOOP 等) */
351
+ .method {
352
+ font-size: 10px;
353
+ font-family: var(--mono);
354
+ font-weight: 700;
355
+ padding: 2px 5px;
356
+ border-radius: 4px;
357
+ min-width: 38px;
358
+ text-align: center;
359
+ letter-spacing: 0.02em;
360
+ flex-shrink: 0;
361
+ }
362
+ .m-get { background: rgba(52,199,89,0.12); color: var(--green); }
363
+ .m-post { background: rgba(0,113,227,0.12); color: var(--blue); }
364
+ [data-theme="dark"] .m-get { background: rgba(58,181,113,0.15); }
365
+ [data-theme="dark"] .m-post { background: rgba(77,140,247,0.15); }
366
+
367
+ /* ─── 主内容区(grid item,由 grid stretch 自动撑满行高) ──────────── */
368
+ main {
369
+ overflow: hidden;
370
+ min-height: 0;
371
+ display: flex;
372
+ flex-direction: column;
373
+ }
374
+
375
+ /* 面板系统:flex 子元素,撑满 main,同时只显示一个 */
376
+ .panel {
377
+ flex: 1;
378
+ min-height: 0;
379
+ display: none;
380
+ flex-direction: column;
381
+ overflow: hidden;
382
+ }
383
+ .panel.active { display: flex; }
384
+
385
+ /* 循环控制台 / 知识管理面板:由顶栏 data-view 控制显示,不受 .active 影响 */
386
+ .layout[data-view="loop"] #p-loop { display: flex; }
387
+ .layout[data-view="features"] #p-loop { display: none; }
388
+ .layout[data-view="knowledge"] #p-knowledge { display: flex; }
389
+ .layout[data-view="loop"] #p-knowledge { display: none; }
390
+ .layout[data-view="features"] #p-knowledge { display: none; }
391
+
392
+ /* 带内边距的面板(表单类:健康检查等) */
393
+ .panel-pad {
394
+ padding: 20px 24px;
395
+ overflow-y: auto;
396
+ gap: 16px;
397
+ }
398
+
399
+ /* 面板头 */
400
+ .panel-head {
401
+ display: flex;
402
+ align-items: center;
403
+ gap: 10px;
404
+ padding: 13px 20px;
405
+ background: var(--card);
406
+ border-bottom: 1px solid var(--border);
407
+ flex-shrink: 0;
408
+ }
409
+ .panel-head h2 { font-size: 15px; font-weight: 600; color: var(--text); }
410
+ .panel-head .path {
411
+ font-family: var(--mono);
412
+ font-size: 11px;
413
+ color: var(--text3);
414
+ background: var(--code-bg);
415
+ padding: 2px 8px;
416
+ border-radius: 5px;
417
+ border: 1px solid var(--border-light);
418
+ }
419
+ .panel-head .ml { margin-left: auto; display: flex; gap: 8px; }
420
+
421
+ /* ─── 共享按钮 ─────────────────────────────────────────────────────── */
422
+ .btn {
423
+ display: inline-flex;
424
+ align-items: center;
425
+ gap: 7px;
426
+ padding: 8px 16px;
427
+ border-radius: 7px;
428
+ font-size: 13px;
429
+ font-weight: 600;
430
+ border: none;
431
+ cursor: pointer;
432
+ transition: opacity 0.15s, transform 0.08s;
433
+ white-space: nowrap;
434
+ }
435
+ .btn:active { transform: scale(0.97); }
436
+ .btn:disabled { opacity: 0.4; cursor: not-allowed; }
437
+
438
+ .btn-primary { background: var(--blue); color: #fff; }
439
+ .btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
440
+
441
+ .btn-ghost {
442
+ background: var(--card);
443
+ color: var(--text);
444
+ border: 1px solid var(--border);
445
+ }
446
+ .btn-ghost:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
447
+
448
+ /* ─── 共享表单 ─────────────────────────────────────────────────────── */
449
+ .form-row { display: flex; flex-direction: column; gap: 5px; }
450
+ .form-row label { font-size: 12px; color: var(--text2); font-weight: 500; }
451
+ .form-row input, .form-row select, .form-row textarea {
452
+ background: var(--bg);
453
+ border: 1px solid var(--border);
454
+ color: var(--text);
455
+ border-radius: 7px;
456
+ padding: 8px 12px;
457
+ font-size: 13px;
458
+ font-family: inherit;
459
+ outline: none;
460
+ transition: border-color 0.2s;
461
+ }
462
+ .form-row input:focus, .form-row select:focus, .form-row textarea:focus {
463
+ border-color: var(--blue);
464
+ }
465
+ .form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
466
+ .form-inline .form-row { flex: 1; min-width: 160px; }
467
+
468
+ /* ─── 共享输出框 ───────────────────────────────────────────────────── */
469
+ .output-box {
470
+ background: var(--code-bg);
471
+ border: 1px solid var(--border);
472
+ border-radius: 8px;
473
+ padding: 14px 16px;
474
+ font-family: var(--mono);
475
+ font-size: 12px;
476
+ line-height: 1.75;
477
+ max-height: 440px;
478
+ overflow-y: auto;
479
+ white-space: pre-wrap;
480
+ word-break: break-all;
481
+ color: var(--text);
482
+ }
483
+ .output-box.empty { color: var(--text3); font-style: italic; }
484
+
485
+ /* ─── 共享弹窗 ─────────────────────────────────────────────────────── */
486
+ .modal-overlay {
487
+ display: none;
488
+ position: fixed;
489
+ inset: 0;
490
+ background: var(--overlay-bg);
491
+ z-index: 1000;
492
+ justify-content: center;
493
+ align-items: center;
494
+ }
495
+ .modal-overlay.show { display: flex; }
496
+ .modal {
497
+ background: var(--card);
498
+ border-radius: 12px;
499
+ padding: 20px;
500
+ width: 640px;
501
+ max-width: 95vw;
502
+ max-height: 85vh;
503
+ display: flex;
504
+ flex-direction: column;
505
+ box-shadow: var(--shadow-lg);
506
+ }
507
+ .modal-header {
508
+ display: flex;
509
+ justify-content: space-between;
510
+ align-items: center;
511
+ margin-bottom: 12px;
512
+ }
513
+ .modal-header h3 { font-size: 15px; color: var(--text); }
514
+ .modal-close {
515
+ background: none;
516
+ border: none;
517
+ font-size: 20px;
518
+ cursor: pointer;
519
+ color: var(--text2);
520
+ padding: 0 4px;
521
+ line-height: 1;
522
+ }
523
+ .modal-close:hover { color: var(--text); }
524
+ .modal-body { flex: 1; overflow-y: auto; padding: 0 4px; }
525
+ .modal-body pre {
526
+ font-family: var(--mono);
527
+ font-size: 12px;
528
+ line-height: 1.6;
529
+ white-space: pre-wrap;
530
+ word-break: break-all;
531
+ color: var(--text);
532
+ }
533
+ .modal-footer {
534
+ display: flex;
535
+ justify-content: flex-end;
536
+ gap: 8px;
537
+ padding-top: 12px;
538
+ border-top: 1px solid var(--border-light);
539
+ margin-top: 8px;
540
+ }
541
+
542
+ /* ─── 共享 Toast ───────────────────────────────────────────────────── */
543
+ .toast-container {
544
+ position: fixed;
545
+ top: 66px;
546
+ right: 20px;
547
+ z-index: 2000;
548
+ display: flex;
549
+ flex-direction: column;
550
+ gap: 8px;
551
+ }
552
+ .toast {
553
+ padding: 10px 16px;
554
+ border-radius: 8px;
555
+ font-size: 12px;
556
+ box-shadow: var(--shadow-lg);
557
+ animation: slideIn 0.2s;
558
+ max-width: 360px;
559
+ color: #fff;
560
+ }
561
+ .toast.info { background: var(--blue); }
562
+ .toast.success { background: var(--green); }
563
+ .toast.error { background: var(--red); }
564
+ .toast.warn { background: var(--orange); }
565
+ @keyframes slideIn { from { transform: translateX(400px); } to { transform: translateX(0); } }
566
+
567
+ /* ─── 共享高级选项折叠 ─────────────────────────────────────────────── */
568
+ .advanced-toggle {
569
+ display: flex;
570
+ align-items: center;
571
+ gap: 6px;
572
+ font-size: 12px;
573
+ color: var(--blue);
574
+ cursor: pointer;
575
+ margin: 10px 0;
576
+ user-select: none;
577
+ }
578
+ .advanced-toggle::before { content: '\25B6'; font-size: 9px; transition: transform 0.2s; }
579
+ .advanced-toggle.open::before { transform: rotate(90deg); }
580
+ .advanced-section {
581
+ display: none;
582
+ background: var(--code-bg);
583
+ border-radius: 8px;
584
+ padding: 12px;
585
+ }
586
+ .advanced-section.show { display: block; }
587
+
588
+ /* ─── 共享表单元素(兼容 loop.css/knowledge.css 中的 button/input) ── */
589
+ button {
590
+ padding: 6px 12px;
591
+ border: none;
592
+ border-radius: 5px;
593
+ font-size: 12px;
594
+ font-weight: 500;
595
+ cursor: pointer;
596
+ transition: all 0.15s;
597
+ }
598
+ button.primary { background: var(--blue); color: #fff; }
599
+ button.primary:hover:not(:disabled) { background: var(--blue-hover); }
600
+ button.success { background: var(--green); color: #fff; }
601
+ button.danger { background: var(--red); color: #fff; }
602
+ button.secondary {
603
+ background: var(--card);
604
+ color: var(--text);
605
+ border: 1px solid var(--border);
606
+ }
607
+ button.secondary:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
608
+ button:disabled { opacity: 0.4; cursor: not-allowed; }
609
+ button.sm { padding: 3px 8px; font-size: 10px; }
610
+
611
+ input, textarea, select {
612
+ width: 100%;
613
+ padding: 6px 10px;
614
+ border: 1px solid var(--border);
615
+ border-radius: 5px;
616
+ font-size: 12px;
617
+ font-family: inherit;
618
+ outline: none;
619
+ transition: border 0.15s;
620
+ background: var(--card);
621
+ color: var(--text);
622
+ }
623
+ input:focus, textarea:focus, select:focus { border-color: var(--blue); }
624
+ textarea { resize: vertical; min-height: 50px; font-family: var(--mono); }
625
+ textarea.large { min-height: 100px; font-size: 13px; line-height: 1.6; }
626
+
627
+ /* ─── 共享状态徽章 ─────────────────────────────────────────────────── */
628
+ .status-badge {
629
+ display: inline-flex;
630
+ align-items: center;
631
+ gap: 4px;
632
+ padding: 2px 8px;
633
+ border-radius: 10px;
634
+ font-size: 10px;
635
+ font-weight: 600;
636
+ white-space: nowrap;
637
+ }
638
+ .status-badge.idle { background: var(--gray-light); color: var(--gray); }
639
+ .status-badge.planning { background: var(--purple-light); color: var(--purple); }
640
+ .status-badge.executing { background: var(--orange-light); color: var(--orange); }
641
+ .status-badge.checking { background: var(--yellow-light); color: var(--badge-yellow-text); }
642
+ .status-badge.aborting { background: var(--orange-light); color: var(--orange); position: relative; }
643
+ .status-badge.aborting::after {
644
+ content: '';
645
+ width: 6px; height: 6px;
646
+ border-radius: 50%;
647
+ background: var(--orange);
648
+ animation: aborting-blink 1s ease-in-out infinite;
649
+ }
650
+ @keyframes aborting-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
651
+ .status-badge.passed { background: var(--green-light); color: var(--badge-green-text); }
652
+ .status-badge.failed { background: var(--red-light); color: var(--badge-red-text); }
653
+ .status-badge.aborted { background: var(--gray-light); color: var(--gray); }
654
+ .status-badge.error { background: var(--red-light); color: var(--red); }
655
+ .status-badge.running { background: var(--orange-light); color: var(--orange); }
656
+ .status-badge.completed { background: var(--green-light); color: var(--badge-green-text); }
657
+ .status-badge.loaded { background: var(--blue-light); color: var(--blue); }
658
+ .status-badge.pending { background: var(--gray-light); color: var(--gray); }
659
+ .status-badge.ready { background: var(--blue-light); color: var(--blue); }
660
+ .status-badge.skipped { background: var(--yellow-light); color: var(--badge-yellow-text); }
661
+ .status-badge.blocked { background: var(--gray-light); color: var(--gray); }
662
+ .status-badge.deadlocked{ background: var(--red-light); color: var(--red); }
663
+
664
+ /* ─── 共享通用辅助 ─────────────────────────────────────────────────── */
665
+ .muted { color: var(--text2); }
666
+ .badge { font-size: 10px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
667
+ .badge.ok { background: var(--green-light); color: var(--badge-green-text); }
668
+ .badge.error { background: var(--red-light); color: var(--badge-red-text); }
669
+ .badge.info { background: var(--blue-light); color: var(--blue); }
670
+ .badge.pending { background: var(--gray-light); color: var(--gray); }
671
+
672
+ .empty-hint {
673
+ color: var(--text3);
674
+ font-style: italic;
675
+ font-size: 13px;
676
+ padding: 10px 0;
677
+ text-align: center;
678
+ }
679
+
680
+ .error-msg {
681
+ display: none;
682
+ color: var(--red);
683
+ font-size: 13px;
684
+ padding: 8px 12px;
685
+ background: var(--red-light);
686
+ border-radius: 7px;
687
+ }
688
+
689
+ /* ─── 滚动条 ───────────────────────────────────────────────────────── */
690
+ ::-webkit-scrollbar { width: 5px; height: 5px; }
691
+ ::-webkit-scrollbar-track { background: transparent; }
692
+ ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
693
+ ::-webkit-scrollbar-thumb:hover { background: var(--text3); }
694
+
695
+ /* ─── 无障碍 ───────────────────────────────────────────────────────── */
696
+ @media (prefers-reduced-motion: reduce) {
697
+ *, *::before, *::after {
698
+ animation-duration: 0.01ms !important;
699
+ animation-iteration-count: 1 !important;
700
+ transition-duration: 0.01ms !important;
701
+ }
702
+ }