langchain_agentx_stream_ui 0.1.0

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.
@@ -0,0 +1,1364 @@
1
+ /**
2
+ * langchain_agentx_stream_ui 可选默认样式(.lax-*)
3
+ *
4
+ * 消费方:import 'langchain_agentx_stream_ui/styles/default.css'
5
+ *
6
+ * 样式系统设计:
7
+ * - SDK 提供布局结构、动画、组件样式
8
+ * - 所有颜色通过 CSS Variables 定义,由应用层提供实际值
9
+ * - 应用层通过覆盖变量实现主题定制
10
+ *
11
+ * 必需的 CSS Variables(应用层必须定义):
12
+ * --foreground, --card-bg, --border-color, --muted
13
+ * --accent-primary, --highlight
14
+ * --font-mono
15
+ *
16
+ * 可选的 CSS Variables(应用层可覆盖以自定义状态颜色):
17
+ * --lax-color-done, --lax-color-error, --lax-color-running
18
+ * --lax-color-warning, --lax-color-success
19
+ * --lax-bg-surface, --lax-bg-warning
20
+ */
21
+
22
+ /* ============================================================================
23
+ CSS Variables 声明(SDK 内部使用,从应用层变量继承)
24
+ ============================================================================ */
25
+
26
+ .lax-agent-session {
27
+ /* 基础颜色(从应用层继承) */
28
+ --lax-foreground: var(--foreground);
29
+ --lax-card-bg: var(--card-bg);
30
+ --lax-border-color: var(--border-color);
31
+ --lax-muted: var(--muted);
32
+ --lax-accent-primary: var(--accent-primary);
33
+ --lax-highlight: var(--highlight);
34
+ --lax-font-mono: var(--font-mono, ui-monospace, monospace);
35
+
36
+ /* 状态颜色(应用层可覆盖,默认使用主题色) */
37
+ --lax-color-done: var(--accent-primary);
38
+ --lax-color-error: var(--highlight);
39
+ --lax-color-running: var(--muted);
40
+ --lax-color-warning: #b8860b;
41
+ --lax-color-success: #2d7d46;
42
+
43
+ /* 紧凑密度(对齐 CC TUI 一行一事;宿主可覆盖) */
44
+ --lax-density-line-height: 1.35;
45
+ --lax-density-timeline-gap: 0.25rem;
46
+ --lax-density-block-margin-y: 0.125rem;
47
+ --lax-density-spinner-pad-y: 0.125rem;
48
+ --lax-density-spinner-margin-top: 0.35rem;
49
+
50
+ /* Markdown 紧凑密度(对齐 timeline;与 .lax-markdown* 联动) */
51
+ --lax-density-md-line-height: 1.35;
52
+ --lax-density-md-margin-top: 0;
53
+ --lax-density-md-paragraph-my: 0.0625rem;
54
+ --lax-density-md-heading-mt: 0.35rem;
55
+ --lax-density-md-heading-mb: 0.125rem;
56
+ --lax-density-md-block-my: 0.125rem;
57
+ --lax-density-md-hr-my: 0.35rem;
58
+ --lax-density-md-li-my: 0.05rem;
59
+ --lax-density-md-code-block-my: 0.125rem;
60
+ --lax-density-md-code-pad: 0.5rem;
61
+
62
+ color: var(--lax-foreground);
63
+ }
64
+
65
+ /* 可选:恢复较松 Web 段落感 */
66
+ .lax-agent-session.lax-density-comfortable {
67
+ --lax-density-line-height: 1.65;
68
+ --lax-density-timeline-gap: 1rem;
69
+ --lax-density-block-margin-y: 0.25rem;
70
+ --lax-density-spinner-pad-y: 0.5rem;
71
+ --lax-density-spinner-margin-top: 1rem;
72
+
73
+ --lax-density-md-line-height: 1.6;
74
+ --lax-density-md-margin-top: 0.25rem;
75
+ --lax-density-md-paragraph-my: 0.25rem;
76
+ --lax-density-md-heading-mt: 0.75rem;
77
+ --lax-density-md-heading-mb: 0.25rem;
78
+ --lax-density-md-block-my: 0.25rem;
79
+ --lax-density-md-hr-my: 0.75rem;
80
+ --lax-density-md-li-my: 0.1rem;
81
+ --lax-density-md-code-block-my: 0.35rem;
82
+ --lax-density-md-code-pad: 0.75rem;
83
+ }
84
+
85
+ /* ============================================================================
86
+ 布局与动画
87
+ ============================================================================ */
88
+
89
+ .lax-timeline {
90
+ display: flex;
91
+ flex-direction: column;
92
+ gap: var(--lax-density-timeline-gap, 0.25rem);
93
+ }
94
+
95
+ .lax-timeline__item {
96
+ animation: lax-fade-in 0.25s ease;
97
+ }
98
+
99
+ @keyframes lax-fade-in {
100
+ from {
101
+ opacity: 0;
102
+ transform: translateY(4px);
103
+ }
104
+ to {
105
+ opacity: 1;
106
+ transform: translateY(0);
107
+ }
108
+ }
109
+
110
+ /* ============================================================================
111
+ 卡片基础样式
112
+ ============================================================================ */
113
+
114
+ /* 命令行风格:移除边框和圆角,保持简洁自然 */
115
+ .lax-text-bubble,
116
+ .lax-reasoning-bubble,
117
+ .lax-tool-card,
118
+ .lax-subagent-block,
119
+ .lax-error-card,
120
+ .lax-unknown-card,
121
+ .lax-step-card {
122
+ /* 命令行风格:无边框、无圆角、无背景 */
123
+ background-color: transparent;
124
+ border: none;
125
+ border-radius: 0;
126
+ padding: 0;
127
+ }
128
+
129
+ /* 命令行风格:只保留必要间距 */
130
+ .lax-text-bubble,
131
+ .lax-tool-card,
132
+ .lax-subagent-block,
133
+ .lax-error-card,
134
+ .lax-unknown-card {
135
+ padding: 0;
136
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
137
+ }
138
+
139
+ /* ============================================================================
140
+ 文本气泡
141
+ ============================================================================ */
142
+
143
+ .lax-text-bubble__body {
144
+ display: flex;
145
+ align-items: flex-start;
146
+ gap: 0.35rem;
147
+ line-height: var(--lax-density-line-height, 1.35);
148
+ }
149
+
150
+ .lax-text-bubble__dot {
151
+ flex-shrink: 0;
152
+ font-weight: 700;
153
+ color: var(--lax-foreground);
154
+ }
155
+
156
+ .lax-text-bubble[data-status='streaming'] .lax-text-bubble__dot {
157
+ animation: lax-reasoning-dot-blink 0.96s step-end infinite;
158
+ }
159
+
160
+ .lax-text-bubble__content {
161
+ flex: 1;
162
+ min-width: 0;
163
+ white-space: pre-wrap;
164
+ line-height: var(--lax-density-line-height, 1.35);
165
+ }
166
+
167
+ .lax-text-bubble__content--markdown {
168
+ white-space: normal;
169
+ font-size: inherit;
170
+ line-height: inherit;
171
+ }
172
+
173
+ /* ============================================================================
174
+ 推理气泡
175
+ ============================================================================ */
176
+
177
+ .lax-reasoning-bubble {
178
+ padding: 0;
179
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
180
+ }
181
+
182
+ .lax-reasoning-bubble__body {
183
+ display: flex;
184
+ align-items: flex-start;
185
+ gap: 0.35rem;
186
+ line-height: var(--lax-density-line-height, 1.35);
187
+ }
188
+
189
+ .lax-reasoning-bubble__dot {
190
+ flex-shrink: 0;
191
+ font-weight: 700;
192
+ color: var(--lax-foreground);
193
+ }
194
+
195
+ /* 执行中状态:闪烁动画 */
196
+ .lax-reasoning-bubble[data-status='streaming'] .lax-reasoning-bubble__dot {
197
+ animation: lax-reasoning-dot-blink 0.96s step-end infinite;
198
+ }
199
+
200
+ .lax-reasoning-bubble__content {
201
+ flex: 1;
202
+ min-width: 0;
203
+ white-space: pre-wrap;
204
+ color: var(--lax-foreground);
205
+ font-size: inherit;
206
+ font-style: normal;
207
+ }
208
+
209
+ @keyframes lax-reasoning-dot-blink {
210
+ 0%,
211
+ 50% {
212
+ opacity: 1;
213
+ }
214
+ 51%,
215
+ 100% {
216
+ opacity: 0.2;
217
+ }
218
+ }
219
+
220
+ /* ============================================================================
221
+ Collapsed explore(对齐 CC CollapsedReadSearchContent)
222
+ ============================================================================ */
223
+
224
+ .lax-collapsed-explore {
225
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
226
+ font-size: 0.9rem;
227
+ line-height: var(--lax-density-line-height, 1.35);
228
+ }
229
+
230
+ .lax-collapsed-explore--active {
231
+ color: var(--lax-foreground);
232
+ }
233
+
234
+ .lax-collapsed-explore--finalized {
235
+ color: var(--lax-muted);
236
+ }
237
+
238
+ .lax-collapsed-explore__summary {
239
+ display: flex;
240
+ flex-wrap: wrap;
241
+ align-items: baseline;
242
+ gap: 0.35rem;
243
+ }
244
+
245
+ .lax-collapsed-explore__marker {
246
+ display: inline-block;
247
+ width: 1ch;
248
+ font-family: var(--lax-font-mono);
249
+ }
250
+
251
+ .lax-collapsed-explore--active .lax-collapsed-explore__marker {
252
+ animation: lax-reasoning-dot-blink 0.96s step-end infinite;
253
+ }
254
+
255
+ .lax-collapsed-explore__expand-hint {
256
+ color: var(--lax-muted);
257
+ font-size: 0.8rem;
258
+ }
259
+
260
+ .lax-collapsed-explore__summary--clickable {
261
+ cursor: pointer;
262
+ user-select: none;
263
+ }
264
+
265
+ .lax-collapsed-explore__summary--clickable:hover .lax-collapsed-explore__expand-hint {
266
+ color: var(--lax-primary);
267
+ }
268
+
269
+ .lax-collapsed-explore__hint {
270
+ margin-top: 0.2rem;
271
+ padding-left: 1.35rem;
272
+ color: var(--lax-muted);
273
+ font-family: var(--lax-font-mono);
274
+ font-size: 0.82rem;
275
+ white-space: pre-wrap;
276
+ }
277
+
278
+ .lax-collapsed-explore__hint-prefix {
279
+ margin-right: 0.35rem;
280
+ }
281
+
282
+ .lax-collapsed-explore__verbose {
283
+ margin-top: 0.5rem;
284
+ display: flex;
285
+ flex-direction: column;
286
+ gap: 0.35rem;
287
+ }
288
+
289
+ /* CC Thought for Ns 摘要行 */
290
+ .lax-thought-summary {
291
+ color: var(--lax-muted);
292
+ font-size: 0.875rem;
293
+ line-height: var(--lax-density-line-height, 1.35);
294
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
295
+ }
296
+
297
+ .lax-thought-summary__text {
298
+ color: var(--lax-muted);
299
+ }
300
+
301
+ .lax-thought-summary__tools {
302
+ color: var(--lax-muted);
303
+ opacity: 0.9;
304
+ }
305
+
306
+ .lax-thought-summary__hint {
307
+ color: var(--lax-muted);
308
+ opacity: 0.75;
309
+ font-size: 0.8125rem;
310
+ }
311
+
312
+ .lax-system-summary {
313
+ color: var(--lax-muted);
314
+ font-size: 0.85rem;
315
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
316
+ }
317
+
318
+ /* ============================================================================
319
+ 工具卡片
320
+ ============================================================================ */
321
+
322
+ .lax-tool-card__header {
323
+ display: flex;
324
+ align-items: center;
325
+ gap: 0.5rem;
326
+ margin: var(--lax-density-block-margin-y, 0.125rem) 0;
327
+ }
328
+
329
+ /* 状态圆点(对齐 CLI ● marker) */
330
+ .lax-tool-card__status-dot {
331
+ display: inline-block;
332
+ flex-shrink: 0;
333
+ font-size: 0.85rem;
334
+ line-height: 1;
335
+ color: var(--lax-muted);
336
+ transition: opacity 0.2s ease;
337
+ }
338
+
339
+ .lax-tool-card__status-dot[data-status='running'] {
340
+ animation: lax-pulse 1s ease-in-out infinite;
341
+ }
342
+
343
+ .lax-tool-card__status-dot[data-status='done'] {
344
+ color: var(--lax-color-done);
345
+ }
346
+
347
+ .lax-tool-card__status-dot[data-status='failed'] {
348
+ color: var(--lax-color-error);
349
+ }
350
+
351
+ @keyframes lax-pulse {
352
+ 0%,
353
+ 100% {
354
+ opacity: 1;
355
+ }
356
+ 50% {
357
+ opacity: 0.35;
358
+ }
359
+ }
360
+
361
+ /* 工具名称(固定颜色,不随状态变化) */
362
+ .lax-tool-card__name {
363
+ font-weight: 600;
364
+ color: var(--lax-foreground);
365
+ flex: 1;
366
+ }
367
+
368
+ /* 状态文本(CLI 无独立 running 标签) */
369
+ .lax-tool-card__status {
370
+ display: none;
371
+ }
372
+
373
+ /* 摘要 */
374
+ .lax-tool-card__summary {
375
+ font-size: 0.9rem;
376
+ margin-bottom: 0.5rem;
377
+ }
378
+
379
+ /* 代码/输入显示 */
380
+ .lax-tool-card__display-body,
381
+ .lax-tool-card__input pre,
382
+ .lax-tool-card__blocks pre,
383
+ .lax-tool-card__input-stream pre {
384
+ font-family: var(--lax-font-mono);
385
+ font-size: 0.75rem;
386
+ overflow-x: auto;
387
+ margin: 0.35rem 0 0;
388
+ }
389
+
390
+ /* 错误信息 */
391
+ .lax-tool-card__error {
392
+ color: var(--lax-color-error);
393
+ font-weight: 500;
394
+ margin-top: 0.5rem;
395
+ }
396
+
397
+ /* 截断/溢出提示 */
398
+ .lax-tool-card__truncated,
399
+ .lax-tool-card__overflow {
400
+ font-size: 0.8rem;
401
+ color: var(--lax-muted);
402
+ margin-top: 0.35rem;
403
+ }
404
+
405
+ /* 进度信息 */
406
+ .lax-tool-card__progress {
407
+ font-size: 0.85rem;
408
+ color: var(--lax-muted);
409
+ margin-top: 0.35rem;
410
+ }
411
+
412
+ /* 详情标签 */
413
+ .lax-tool-card__detail-label {
414
+ font-size: 0.75rem;
415
+ color: var(--lax-muted);
416
+ margin-top: 0.5rem;
417
+ }
418
+
419
+ /* 步骤列表 */
420
+ .lax-tool-card__steps {
421
+ margin: 0.35rem 0 0 1rem;
422
+ font-size: 0.85rem;
423
+ }
424
+
425
+ /* ============================================================================
426
+ 工具 Shell(容器组件)
427
+ ============================================================================ */
428
+
429
+ /* 命令行风格:错误状态通过文字颜色表示,不用边框 */
430
+ .lax-tool-shell[data-error-kind='error'] {
431
+ /* 移除左侧边框,通过错误文字颜色显示 */
432
+ }
433
+
434
+ .lax-tool-shell[data-error-kind='permission'] {
435
+ /* 移除左侧边框 */
436
+ }
437
+
438
+ .lax-tool-shell--grouped {
439
+ margin-top: 0;
440
+ /* 移除左侧边框 */
441
+ padding-left: 0;
442
+ }
443
+
444
+ .lax-tool-shell__body {
445
+ margin-top: 0.25rem;
446
+ }
447
+
448
+ .lax-tool-shell--bare {
449
+ border: none;
450
+ padding: 0;
451
+ background: transparent;
452
+ }
453
+
454
+ .lax-tool-shell--bare .lax-tool-shell__body {
455
+ margin-top: 0;
456
+ }
457
+
458
+ /* 权限等待态 */
459
+ .lax-tool-shell__permission-wait {
460
+ margin: 0.35rem 0 0.25rem 1.25rem;
461
+ padding: 0;
462
+ /* 移除背景和圆角 */
463
+ background: transparent;
464
+ }
465
+
466
+ .lax-tool-shell__permission-wait-text {
467
+ font-size: 0.85rem;
468
+ color: var(--lax-muted);
469
+ font-style: italic;
470
+ }
471
+
472
+ .lax-tool-shell__permission-wait-detail {
473
+ font-size: 0.8rem;
474
+ margin-top: 0.25rem;
475
+ }
476
+
477
+ .lax-tool-shell__permission-actions {
478
+ display: flex;
479
+ gap: 0.5rem;
480
+ margin-top: 0.5rem;
481
+ }
482
+
483
+ /* ============================================================================
484
+ 工具 Body(内容区域)
485
+ ============================================================================ */
486
+
487
+ .lax-tool-body__text {
488
+ font-family: var(--lax-font-mono);
489
+ font-size: 0.75rem;
490
+ overflow-x: auto;
491
+ margin: 0.35rem 0 0;
492
+ white-space: pre-wrap;
493
+ }
494
+
495
+ .lax-tool-body__block {
496
+ padding-left: 1.25rem;
497
+ position: relative;
498
+ margin-top: 0.25rem;
499
+ }
500
+
501
+ .lax-tool-body__block::before {
502
+ content: '⎿ ';
503
+ position: absolute;
504
+ left: 0;
505
+ color: var(--lax-muted);
506
+ }
507
+
508
+ .lax-tool-body__block[data-variant='error'] .lax-tool-body__text {
509
+ color: var(--lax-color-error);
510
+ }
511
+
512
+ .lax-tool-body__block[data-variant='dim'] .lax-tool-body__text {
513
+ color: var(--lax-muted);
514
+ }
515
+
516
+ .lax-tool-body__expand {
517
+ display: block;
518
+ margin-top: 0.35rem;
519
+ padding: 0;
520
+ border: none;
521
+ background: none;
522
+ color: var(--lax-muted);
523
+ font-size: 0.8rem;
524
+ cursor: pointer;
525
+ text-decoration: underline;
526
+ transition: color 0.2s ease;
527
+ }
528
+
529
+ .lax-tool-body__expand:hover {
530
+ color: var(--lax-accent-primary);
531
+ }
532
+
533
+ .lax-tool-body__summary {
534
+ font-size: 0.9rem;
535
+ color: var(--lax-muted);
536
+ margin-bottom: 0.25rem;
537
+ }
538
+
539
+ /* Agent 子工具 progress(方案 A 折叠 — 对齐 CLI ⎿ gutter) */
540
+ .lax-agent-progress {
541
+ margin: 0.15rem 0 0.35rem;
542
+ font-family: var(--lax-font-mono);
543
+ font-size: 0.75rem;
544
+ }
545
+
546
+ .lax-agent-progress__line {
547
+ display: flex;
548
+ align-items: baseline;
549
+ margin: 0.05rem 0;
550
+ min-width: 0;
551
+ }
552
+
553
+ .lax-agent-progress__gutter {
554
+ flex-shrink: 0;
555
+ color: var(--lax-muted);
556
+ white-space: pre;
557
+ user-select: none;
558
+ }
559
+
560
+ .lax-agent-progress__text {
561
+ flex: 1;
562
+ min-width: 0;
563
+ white-space: pre-wrap;
564
+ word-break: break-word;
565
+ color: var(--lax-fg, inherit);
566
+ }
567
+
568
+ .lax-agent-progress__line--more .lax-agent-progress__text {
569
+ color: var(--lax-muted);
570
+ }
571
+
572
+ .lax-agent-progress__more {
573
+ display: inline;
574
+ padding: 0;
575
+ border: none;
576
+ background: none;
577
+ color: var(--lax-muted);
578
+ font-family: inherit;
579
+ font-size: inherit;
580
+ cursor: pointer;
581
+ text-decoration: underline;
582
+ }
583
+
584
+ .lax-agent-progress--transcript {
585
+ margin-top: 0.5rem;
586
+ }
587
+
588
+ .lax-agent-progress__label {
589
+ font-size: 0.72rem;
590
+ color: var(--lax-muted);
591
+ margin-bottom: 0.2rem;
592
+ text-transform: uppercase;
593
+ letter-spacing: 0.04em;
594
+ }
595
+
596
+ /* ============================================================================
597
+ 工具组
598
+ ============================================================================ */
599
+
600
+ .lax-tool-group {
601
+ /* 移除边框和背景 */
602
+ border: none;
603
+ background: transparent;
604
+ padding: 0;
605
+ margin: 0.5rem 0;
606
+ }
607
+
608
+ .lax-tool-group__header {
609
+ display: flex;
610
+ align-items: baseline;
611
+ gap: 0.35rem;
612
+ margin-bottom: 0.5rem;
613
+ font-size: 0.85rem;
614
+ font-weight: 600;
615
+ }
616
+
617
+ .lax-tool-group__count {
618
+ color: var(--lax-muted);
619
+ font-weight: 500;
620
+ }
621
+
622
+ .lax-tool-group__items {
623
+ display: flex;
624
+ flex-direction: column;
625
+ gap: 0.35rem;
626
+ }
627
+
628
+ .lax-tool-group__item {
629
+ position: relative;
630
+ }
631
+
632
+ .lax-tool-group__header--active .lax-tool-group__dot {
633
+ color: var(--lax-accent, #3a6ea5);
634
+ margin-right: 0.25rem;
635
+ }
636
+
637
+ .lax-tool-group__header--error .lax-tool-group__label {
638
+ color: var(--lax-error, #c0392b);
639
+ }
640
+
641
+ .lax-tool-group__subline {
642
+ display: flex;
643
+ align-items: baseline;
644
+ gap: 0.25rem;
645
+ font-size: 0.82rem;
646
+ padding-left: 0.5rem;
647
+ }
648
+
649
+ .lax-tool-group__tree {
650
+ color: var(--lax-muted);
651
+ font-family: ui-monospace, monospace;
652
+ flex-shrink: 0;
653
+ }
654
+
655
+ .lax-tool-group__subline-title {
656
+ font-weight: 600;
657
+ }
658
+
659
+ .lax-tool-group__subline-status {
660
+ color: var(--lax-muted);
661
+ font-weight: 400;
662
+ }
663
+
664
+ .lax-tool-group__subline::before {
665
+ content: none;
666
+ }
667
+
668
+ /* ============================================================================
669
+ 工具 Diff
670
+ ============================================================================ */
671
+
672
+ .lax-tool-diff {
673
+ font-family: var(--lax-font-mono);
674
+ font-size: 0.75rem;
675
+ overflow-x: auto;
676
+ margin-top: 0.35rem;
677
+ /* 移除边框和圆角 */
678
+ border: none;
679
+ border-radius: 0;
680
+ }
681
+
682
+ .lax-tool-diff__line {
683
+ display: flex;
684
+ padding: 0 0.5rem;
685
+ white-space: pre-wrap;
686
+ line-height: 1.45;
687
+ }
688
+
689
+ .lax-tool-diff__prefix {
690
+ flex-shrink: 0;
691
+ width: 1.25rem;
692
+ user-select: none;
693
+ }
694
+
695
+ .lax-tool-diff__line[data-kind='add'] {
696
+ background: rgba(45, 125, 70, 0.12);
697
+ color: var(--lax-color-success);
698
+ }
699
+
700
+ .lax-tool-diff__line[data-kind='remove'] {
701
+ background: rgba(192, 57, 43, 0.1);
702
+ color: var(--lax-color-error);
703
+ }
704
+
705
+ .lax-tool-diff__line[data-kind='meta'] {
706
+ color: var(--lax-muted);
707
+ }
708
+
709
+ /* ============================================================================
710
+ Markdown 渲染
711
+ ============================================================================ */
712
+
713
+ .lax-markdown {
714
+ font-size: 0.85rem;
715
+ line-height: var(--lax-density-md-line-height, 1.35);
716
+ margin-top: var(--lax-density-md-margin-top, 0);
717
+ color: var(--lax-foreground);
718
+ }
719
+
720
+ /* P2:块顶不留白(首子元素 / 首标题) */
721
+ .lax-markdown > :first-child {
722
+ margin-top: 0;
723
+ }
724
+
725
+ .lax-markdown__heading:first-child {
726
+ margin-top: 0;
727
+ }
728
+
729
+ /* 标题 */
730
+ .lax-markdown__heading {
731
+ font-weight: 600;
732
+ margin-top: var(--lax-density-md-heading-mt, 0.35rem);
733
+ margin-bottom: var(--lax-density-md-heading-mb, 0.125rem);
734
+ }
735
+
736
+ .lax-markdown__h1 { font-size: 1.25rem; }
737
+ .lax-markdown__h2 { font-size: 1.1rem; }
738
+ .lax-markdown__h3 { font-size: 1rem; }
739
+ .lax-markdown__h4 { font-size: 0.95rem; }
740
+ .lax-markdown__h5 { font-size: 0.9rem; }
741
+ .lax-markdown__h6 { font-size: 0.85rem; }
742
+
743
+ /* 段落 */
744
+ .lax-markdown__paragraph {
745
+ margin: var(--lax-density-md-paragraph-my, 0.0625rem) 0;
746
+ }
747
+
748
+ /* P2:列表项内 GFM 包裹的 <p> 不再叠 margin */
749
+ .lax-markdown__li > .lax-markdown__paragraph {
750
+ margin: 0;
751
+ }
752
+
753
+ /* 列表 */
754
+ .lax-markdown__list {
755
+ margin: var(--lax-density-md-block-my, 0.125rem) 0;
756
+ padding-left: 1.25rem;
757
+ color: var(--lax-foreground);
758
+ }
759
+
760
+ .lax-markdown__li {
761
+ margin: var(--lax-density-md-li-my, 0.05rem) 0;
762
+ color: var(--lax-foreground);
763
+ }
764
+
765
+ .lax-markdown__ul {
766
+ list-style-type: disc;
767
+ }
768
+
769
+ .lax-markdown__ol {
770
+ list-style-type: decimal;
771
+ }
772
+
773
+ /* 嵌套列表标记符号 */
774
+ .lax-markdown__ul .lax-markdown__ul {
775
+ list-style-type: circle;
776
+ }
777
+
778
+ .lax-markdown__ul .lax-markdown__ul .lax-markdown__ul {
779
+ list-style-type: square;
780
+ }
781
+
782
+ /* 链接 */
783
+ .lax-markdown__link {
784
+ color: var(--lax-accent-primary);
785
+ text-decoration: underline;
786
+ }
787
+
788
+ .lax-markdown__link:hover {
789
+ color: var(--lax-highlight);
790
+ }
791
+
792
+ /* 引用 */
793
+ .lax-markdown__blockquote {
794
+ margin: var(--lax-density-md-block-my, 0.125rem) 0;
795
+ padding-left: 0.75rem;
796
+ border-left: 3px solid var(--lax-muted);
797
+ color: var(--lax-muted);
798
+ font-style: italic;
799
+ }
800
+
801
+ .lax-markdown__blockquote > :first-child {
802
+ margin-top: 0;
803
+ }
804
+
805
+ /* 分隔线 */
806
+ .lax-markdown__hr {
807
+ margin: var(--lax-density-md-hr-my, 0.35rem) 0;
808
+ border: none;
809
+ border-top: 1px solid var(--lax-border-color);
810
+ }
811
+
812
+ /* 强调 */
813
+ .lax-markdown__strong {
814
+ font-weight: 600;
815
+ }
816
+
817
+ .lax-markdown__em {
818
+ font-style: italic;
819
+ }
820
+
821
+ /* 内联代码 */
822
+ .lax-markdown__inline-code {
823
+ font-family: var(--lax-font-mono);
824
+ font-size: 0.8em;
825
+ background: var(--lax-bg-surface);
826
+ color: var(--lax-foreground);
827
+ padding: 0.1em 0.35em;
828
+ border-radius: 3px;
829
+ border: 1px solid var(--lax-border-color);
830
+ }
831
+
832
+ /* 代码块容器 */
833
+ .lax-code-block {
834
+ margin: var(--lax-density-md-code-block-my, 0.125rem) 0;
835
+ border-radius: 4px;
836
+ overflow: hidden;
837
+ background: var(--lax-bg-surface);
838
+ border: 1px solid var(--lax-border-color);
839
+ }
840
+
841
+ /* P1:SyntaxHighlighter <pre> 内边距由 token 控制 */
842
+ .lax-code-block pre {
843
+ margin: 0 !important;
844
+ padding: var(--lax-density-md-code-pad, 0.5rem) !important;
845
+ font-size: 0.75rem;
846
+ line-height: 1.5;
847
+ border-top-left-radius: 0;
848
+ border-top-right-radius: 0;
849
+ border-bottom-left-radius: 4px;
850
+ border-bottom-right-radius: 4px;
851
+ }
852
+
853
+ /* 代码块头部 */
854
+ .lax-code-block__header {
855
+ display: flex;
856
+ justify-content: space-between;
857
+ align-items: center;
858
+ padding: 0.35rem 0.5rem;
859
+ font-size: 0.7rem;
860
+ background: rgba(128, 128, 128, 0.1);
861
+ border-bottom: 1px solid var(--lax-border-color);
862
+ }
863
+
864
+ .lax-code-block__lang {
865
+ font-weight: 600;
866
+ text-transform: uppercase;
867
+ letter-spacing: 0.04em;
868
+ color: var(--lax-foreground);
869
+ }
870
+
871
+ /* 拷贝按钮 */
872
+ .lax-code-block__copy {
873
+ display: flex;
874
+ align-items: center;
875
+ gap: 0.25rem;
876
+ padding: 0.2rem 0.5rem;
877
+ font-size: 0.7rem;
878
+ font-weight: 600;
879
+ border-radius: 3px;
880
+ border: 1px solid transparent;
881
+ cursor: pointer;
882
+ transition: all 0.15s ease;
883
+ background: rgba(99, 102, 241, 0.9);
884
+ color: white;
885
+ }
886
+
887
+ .lax-code-block__copy:hover {
888
+ background: rgba(99, 102, 241, 1);
889
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
890
+ }
891
+
892
+ .lax-code-block__copy--copied {
893
+ background: rgb(34, 197, 94);
894
+ color: white;
895
+ }
896
+
897
+ .lax-code-block__icon {
898
+ width: 0.85rem;
899
+ height: 0.85rem;
900
+ }
901
+
902
+ /* 表格 */
903
+ .lax-markdown__table-wrapper {
904
+ margin: var(--lax-density-md-block-my, 0.125rem) 0;
905
+ overflow-x: auto;
906
+ border-radius: 4px;
907
+ border: 1px solid var(--lax-border-color);
908
+ }
909
+
910
+ .lax-markdown__table {
911
+ width: 100%;
912
+ border-collapse: collapse;
913
+ font-size: 0.85rem;
914
+ }
915
+
916
+ .lax-markdown__thead {
917
+ background: var(--lax-bg-surface);
918
+ border-bottom: 1px solid var(--lax-border-color);
919
+ }
920
+
921
+ .lax-markdown__tbody {
922
+ border-top: 1px solid var(--lax-border-color);
923
+ }
924
+
925
+ .lax-markdown__tr {
926
+ border-bottom: 1px solid var(--lax-border-color);
927
+ }
928
+
929
+ .lax-markdown__tr:last-child {
930
+ border-bottom: none;
931
+ }
932
+
933
+ .lax-markdown__th {
934
+ padding: 0.4rem 0.6rem;
935
+ text-align: left;
936
+ font-weight: 600;
937
+ }
938
+
939
+ .lax-markdown__td {
940
+ padding: 0.4rem 0.6rem;
941
+ }
942
+
943
+ .lax-markdown__tr:nth-child(even) {
944
+ background: rgba(0, 0, 0, 0.02);
945
+ }
946
+
947
+ .lax-markdown__rich {
948
+ width: 100%;
949
+ }
950
+
951
+ /* ============================================================================
952
+ 子 Agent 块
953
+ ============================================================================ */
954
+
955
+ .lax-subagent-block {
956
+ /* 移除左侧边框 */
957
+ margin-left: 0.5rem;
958
+ }
959
+
960
+ .lax-subagent-block__header {
961
+ font-weight: 600;
962
+ margin-bottom: 0.75rem;
963
+ color: var(--lax-accent-primary);
964
+ }
965
+
966
+ .lax-subagent-block__children {
967
+ display: flex;
968
+ flex-direction: column;
969
+ gap: 0.75rem;
970
+ padding-left: 0.75rem;
971
+ }
972
+
973
+ /* ============================================================================
974
+ 错误卡片
975
+ ============================================================================ */
976
+
977
+ .lax-error-card {
978
+ /* 移除边框样式,通过文字颜色表示错误 */
979
+ }
980
+
981
+ .lax-error-card__message {
982
+ color: var(--lax-color-error);
983
+ font-weight: 500;
984
+ }
985
+
986
+ /* ============================================================================
987
+ 未知卡片
988
+ ============================================================================ */
989
+
990
+ .lax-unknown-card__type {
991
+ font-size: 0.875rem;
992
+ color: var(--lax-muted);
993
+ margin-bottom: 0.5rem;
994
+ }
995
+
996
+ .lax-unknown-card__data {
997
+ font-family: var(--lax-font-mono);
998
+ font-size: 0.75rem;
999
+ overflow-x: auto;
1000
+ margin: 0;
1001
+ }
1002
+
1003
+ /* ============================================================================
1004
+ 调试面板
1005
+ ============================================================================ */
1006
+
1007
+ .lax-debug-panel {
1008
+ margin-top: 1rem;
1009
+ padding: 0.75rem;
1010
+ font-size: 0.8rem;
1011
+ /* 移除边框 */
1012
+ border: none;
1013
+ border-radius: 0;
1014
+ }
1015
+
1016
+ /* ============================================================================
1017
+ 权限卡片
1018
+ ============================================================================ */
1019
+
1020
+ .lax-permission-card {
1021
+ /* 移除边框和背景 */
1022
+ background-color: transparent;
1023
+ border: none;
1024
+ border-radius: 0;
1025
+ padding: 0;
1026
+ margin: 0.5rem 0;
1027
+ }
1028
+
1029
+ .lax-permission-card__header {
1030
+ display: flex;
1031
+ align-items: center;
1032
+ gap: 0.5rem;
1033
+ margin-bottom: 0.5rem;
1034
+ }
1035
+
1036
+ .lax-permission-card__label {
1037
+ font-size: 0.75rem;
1038
+ font-weight: 600;
1039
+ text-transform: uppercase;
1040
+ letter-spacing: 0.04em;
1041
+ color: var(--lax-muted);
1042
+ }
1043
+
1044
+ .lax-permission-card__tool {
1045
+ font-family: var(--lax-font-mono);
1046
+ font-size: 0.875rem;
1047
+ }
1048
+
1049
+ .lax-permission-card__message {
1050
+ margin-bottom: 0.75rem;
1051
+ line-height: 1.5;
1052
+ }
1053
+
1054
+ .lax-permission-card__prompt {
1055
+ font-size: 0.875rem;
1056
+ color: var(--lax-muted);
1057
+ margin-bottom: 0.75rem;
1058
+ }
1059
+
1060
+ .lax-permission-card__actions {
1061
+ display: flex;
1062
+ gap: 0.5rem;
1063
+ }
1064
+
1065
+ .lax-permission-card__allow,
1066
+ .lax-permission-card__deny {
1067
+ padding: 0.35rem 0.85rem;
1068
+ /* 移除边框和圆角 */
1069
+ border-radius: 0;
1070
+ border: none;
1071
+ cursor: pointer;
1072
+ font-size: 0.875rem;
1073
+ transition: all 0.2s ease;
1074
+ }
1075
+
1076
+ .lax-permission-card__allow {
1077
+ background: var(--lax-accent-primary);
1078
+ color: #fff;
1079
+ }
1080
+
1081
+ .lax-permission-card__deny {
1082
+ background: transparent;
1083
+ color: var(--lax-foreground);
1084
+ }
1085
+
1086
+ .lax-permission-card__resolved {
1087
+ font-size: 0.875rem;
1088
+ color: var(--lax-muted);
1089
+ }
1090
+
1091
+ /* ============================================================================
1092
+ 虚拟时间线
1093
+ ============================================================================ */
1094
+
1095
+ .lax-virtual-timeline {
1096
+ height: 100%;
1097
+ min-height: 24rem;
1098
+ overflow: auto;
1099
+ }
1100
+
1101
+ /* ============================================================================
1102
+ Spinner(加载动画)
1103
+ ============================================================================ */
1104
+
1105
+ .lax-spinner-container {
1106
+ margin-top: var(--lax-density-spinner-margin-top, 0.35rem);
1107
+ display: flex;
1108
+ flex-direction: column;
1109
+ }
1110
+
1111
+ .lax-spinner {
1112
+ display: flex;
1113
+ align-items: center;
1114
+ gap: 0.35rem;
1115
+ padding: var(--lax-density-spinner-pad-y, 0.125rem) 0;
1116
+ color: var(--lax-muted);
1117
+ font-size: 0.875rem;
1118
+ }
1119
+
1120
+ .lax-spinner-frame {
1121
+ font-family: var(--lax-font-mono);
1122
+ font-weight: 600;
1123
+ color: var(--lax-accent-primary);
1124
+ }
1125
+
1126
+ .lax-spinner-verb {
1127
+ color: var(--lax-muted);
1128
+ }
1129
+
1130
+ /* 动词 shimmer(对齐 CC GlimmerMessage requesting 模式) */
1131
+ .lax-spinner-verb--shimmer {
1132
+ background: linear-gradient(
1133
+ 90deg,
1134
+ var(--lax-muted) 0%,
1135
+ var(--lax-muted) 35%,
1136
+ var(--lax-accent-primary) 50%,
1137
+ var(--lax-muted) 65%,
1138
+ var(--lax-muted) 100%
1139
+ );
1140
+ background-size: 200% 100%;
1141
+ -webkit-background-clip: text;
1142
+ background-clip: text;
1143
+ color: transparent;
1144
+ animation: lax-verb-shimmer 2.4s linear infinite;
1145
+ }
1146
+
1147
+ .lax-spinner-verb--shimmer-fast {
1148
+ animation-duration: 1.6s;
1149
+ }
1150
+
1151
+ @keyframes lax-verb-shimmer {
1152
+ 0% {
1153
+ background-position: 100% 0;
1154
+ }
1155
+ 100% {
1156
+ background-position: -100% 0;
1157
+ }
1158
+ }
1159
+
1160
+ /* tool-use 整词闪烁(对齐 CC flashOpacity) */
1161
+ .lax-spinner-verb--tool-use {
1162
+ color: color-mix(
1163
+ in srgb,
1164
+ var(--lax-muted) calc((1 - var(--lax-spinner-flash-opacity, 0)) * 100%),
1165
+ var(--lax-accent-primary)
1166
+ );
1167
+ }
1168
+
1169
+ /* stall 渐红(对齐 CC stalledIntensity → ERROR_RED) */
1170
+ .lax-spinner-verb--stalled {
1171
+ color: color-mix(
1172
+ in srgb,
1173
+ var(--lax-muted) calc((1 - var(--lax-spinner-stall-intensity, 0)) * 100%),
1174
+ var(--lax-color-error)
1175
+ );
1176
+ }
1177
+
1178
+ .lax-spinner-verb--static {
1179
+ color: var(--lax-muted);
1180
+ }
1181
+
1182
+ @media (prefers-reduced-motion: reduce) {
1183
+ .lax-spinner-verb--shimmer,
1184
+ .lax-spinner-verb--shimmer-fast,
1185
+ .lax-spinner-verb--tool-use {
1186
+ animation: none;
1187
+ background: none;
1188
+ -webkit-background-clip: unset;
1189
+ background-clip: unset;
1190
+ color: var(--lax-muted);
1191
+ }
1192
+ }
1193
+
1194
+ .lax-spinner-status {
1195
+ color: var(--lax-muted);
1196
+ font-weight: 500;
1197
+ }
1198
+
1199
+ .lax-spinner-status-part {
1200
+ font-family: var(--lax-font-mono);
1201
+ font-size: 0.8rem;
1202
+ }
1203
+
1204
+ /* Thinking shimmer 动画(对齐 CC thinkingStatus) */
1205
+ .lax-spinner-status-part--thinking {
1206
+ animation: lax-thinking-shimmer 2s ease-in-out infinite;
1207
+ }
1208
+
1209
+ @keyframes lax-thinking-shimmer {
1210
+ 0%, 100% {
1211
+ opacity: 0.6;
1212
+ }
1213
+ 50% {
1214
+ opacity: 1;
1215
+ }
1216
+ }
1217
+
1218
+ /* ============================================================================
1219
+ TaskList(任务列表,对齐 CC TaskListV2)
1220
+ ============================================================================ */
1221
+
1222
+ .lax-task-list {
1223
+ font-size: 0.875rem;
1224
+ }
1225
+
1226
+ .lax-task-list__stats {
1227
+ color: var(--lax-muted);
1228
+ margin-bottom: 0.25rem;
1229
+ }
1230
+
1231
+ .lax-task-list__stat-count {
1232
+ font-weight: 600;
1233
+ }
1234
+
1235
+ .lax-task-list__hidden-summary {
1236
+ color: var(--lax-muted);
1237
+ }
1238
+
1239
+ .lax-task-list__items {
1240
+ display: flex;
1241
+ flex-direction: column;
1242
+ gap: 0.15rem;
1243
+ }
1244
+
1245
+ .lax-task-item {
1246
+ display: flex;
1247
+ align-items: baseline;
1248
+ gap: 0.35rem;
1249
+ padding: 0.1rem 0.25rem;
1250
+ }
1251
+
1252
+ /* 待办:空心方块图标(◻) */
1253
+ .lax-task-item--pending .lax-task-item__icon {
1254
+ color: var(--lax-muted);
1255
+ }
1256
+
1257
+ .lax-task-item--pending .lax-task-item__subject:not(.lax-task-item__subject--blocked) {
1258
+ color: var(--lax-muted);
1259
+ }
1260
+
1261
+ .lax-task-item__icon {
1262
+ flex-shrink: 0;
1263
+ font-family: var(--lax-font-mono);
1264
+ width: 1.5ch;
1265
+ }
1266
+
1267
+ /* 进行中:红色实心方块 bold icon;subject 保持常规字重(对齐 CC 终端) */
1268
+ .lax-task-item__icon--in-progress {
1269
+ color: var(--lax-color-error);
1270
+ font-weight: 700;
1271
+ }
1272
+
1273
+ .lax-task-item__subject--in-progress {
1274
+ color: var(--lax-foreground);
1275
+ }
1276
+
1277
+ /* blocked pending:dim + strikethrough(对齐 CC openBlockers) */
1278
+ .lax-task-item__subject--blocked {
1279
+ color: var(--lax-muted);
1280
+ text-decoration: line-through;
1281
+ }
1282
+
1283
+ .lax-task-item__owner {
1284
+ color: var(--lax-muted);
1285
+ font-size: 0.85em;
1286
+ flex-shrink: 0;
1287
+ }
1288
+
1289
+ @media (max-width: 640px) {
1290
+ .lax-task-item__owner {
1291
+ display: none;
1292
+ }
1293
+ }
1294
+
1295
+ /* 已完成任务:绿色勾勾 + 删除线(对齐 CC) */
1296
+ .lax-task-item--completed .lax-task-item__icon {
1297
+ color: var(--lax-color-success);
1298
+ }
1299
+
1300
+ .lax-task-item--completed .lax-task-item__subject {
1301
+ color: var(--lax-color-success);
1302
+ text-decoration: line-through;
1303
+ }
1304
+
1305
+ .lax-task-item__meta {
1306
+ color: var(--lax-muted);
1307
+ font-size: 0.8em;
1308
+ font-family: var(--lax-font-mono);
1309
+ }
1310
+
1311
+ /* TaskListFooter(对齐 CC BackgroundTaskStatus pill) */
1312
+ .lax-task-list-footer {
1313
+ margin-top: 0.75rem;
1314
+ }
1315
+
1316
+ .lax-task-list-footer__pill {
1317
+ display: inline-flex;
1318
+ align-items: center;
1319
+ gap: 0;
1320
+ padding: 0.2rem 0.5rem;
1321
+ border: none;
1322
+ border-radius: 3px;
1323
+ background: var(--lax-foreground);
1324
+ color: var(--lax-background);
1325
+ font-size: 0.8125rem;
1326
+ font-family: inherit;
1327
+ cursor: pointer;
1328
+ }
1329
+
1330
+ .lax-task-list-footer__pill:hover {
1331
+ opacity: 0.92;
1332
+ }
1333
+
1334
+ .lax-task-list-footer__hint {
1335
+ color: var(--lax-muted);
1336
+ font-weight: 400;
1337
+ opacity: 0.85;
1338
+ }
1339
+
1340
+ /* MessageResponse 标记(对齐 CC ⎿) */
1341
+ .lax-message-response {
1342
+ display: flex;
1343
+ align-items: flex-start;
1344
+ gap: 0.35rem;
1345
+ margin-top: var(--lax-density-block-margin-y, 0.125rem);
1346
+ }
1347
+
1348
+ .lax-message-response__marker {
1349
+ flex-shrink: 0;
1350
+ color: var(--lax-muted);
1351
+ font-family: var(--lax-font-mono);
1352
+ user-select: none;
1353
+ }
1354
+
1355
+ .lax-message-response__content {
1356
+ flex: 1;
1357
+ min-width: 0;
1358
+ }
1359
+
1360
+ /* Spinner Next 副行(对齐 CC Text dimColor) */
1361
+ .lax-spinner-next-line {
1362
+ color: var(--lax-muted);
1363
+ font-size: 0.875rem;
1364
+ }