-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Expand file tree
/
Copy pathchat.css
More file actions
2949 lines (2893 loc) · 80.3 KB
/
Copy pathchat.css
File metadata and controls
2949 lines (2893 loc) · 80.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* -------- Chat project header (single row) --------------------------
The former standalone chrome header row was removed. This single row
now carries: back button, design-system picker, editable project
title, and (right-aligned) the session-history trigger. position:
relative anchors the absolutely-positioned history popover. */
.chat-project-header {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 12px;
border-bottom: none;
/* Sticky over the translucent chat pane: frosted glass masks messages
scrolling beneath (glass tokens are theme-aware). */
background: var(--glass-regular);
-webkit-backdrop-filter: var(--glass-backdrop);
backdrop-filter: var(--glass-backdrop);
min-width: 0;
height: 38px;
position: sticky;
top: 0;
z-index: 4;
}
.chat-project-header::after {
content: '';
position: absolute;
top: 100%;
right: 0;
left: 0;
height: var(--spacing-18);
pointer-events: none;
/* Extend the regular glass material into the scroll area, then fade both
its tint and blur so messages pass under a soft edge instead of a hard
horizontal cutoff. */
background: linear-gradient(to bottom, var(--glass-regular), transparent);
-webkit-backdrop-filter: var(--glass-backdrop);
backdrop-filter: var(--glass-backdrop);
-webkit-mask-image: linear-gradient(to bottom, currentColor, transparent);
mask-image: linear-gradient(to bottom, currentColor, transparent);
}
.chat-project-back {
width: 28px;
height: 28px;
padding: 0;
border: none;
background: transparent;
color: var(--text-muted);
border-radius: var(--radius-sm);
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
}
.chat-project-back:hover {
background: var(--bg-subtle);
color: var(--text);
}
.chat-project-design-system {
display: inline-flex;
align-items: center;
flex: 0 0 auto;
min-width: 0;
/* Pushed to the right end alongside the session trigger: the title
uses flex:1, so this margin parks the picker + session button as a
pair at the trailing edge. */
margin-inline-start: auto;
}
.chat-project-header-title {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1 1 auto;
overflow: hidden;
}
.chat-project-header-title .title {
color: var(--text-strong);
font-size: 13px;
line-height: 18px;
font-weight: 600;
letter-spacing: -0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 0 1 auto;
min-width: 0;
/* Editable inline rename: a calm padded chip rather than a hard outline
box, so the contentEditable focus ring reads as a field, not brackets.
No negative margin — the parent clips overflow, which would shave the
left edge of the focus ring. */
padding: 4px 8px;
border-radius: var(--radius-sm);
outline: none;
caret-color: var(--accent);
box-shadow: none;
transition: background 120ms cubic-bezier(0.23, 1, 0.32, 1);
}
.chat-project-header-title .title:hover {
background: color-mix(in srgb, var(--text) 4%, transparent);
}
.chat-project-header-title .title.readonly {
cursor: default;
color: var(--text-strong);
}
.chat-project-header-title .title.readonly:hover {
background: transparent;
}
.chat-project-header-title .title:focus,
.chat-project-header-title .title:focus-visible {
background: color-mix(in srgb, var(--text) 5%, transparent);
box-shadow: none;
}
.chat-project-header-title .meta {
color: var(--text-muted);
font-size: 12px;
line-height: 16px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 0 1 auto;
}
/* Right-aligned session-history trigger. Collapses the former
name + history + new-session controls into one icon button; clicking
it opens the history popover (which contains the "new session" entry
and the conversation list). The session title is no longer shown
inline — the project title owns the header line. */
.chat-session-switcher {
/* NOT a containing block — the .chat-history-menu popover positions
itself with left/right:12px relative to the sticky .chat-project-header. */
display: inline-flex;
align-items: center;
flex: 0 0 auto;
margin-inline-start: 2px;
padding-inline-start: 6px;
}
.chat-session-trigger {
width: 28px;
height: 28px;
padding: 0;
background: transparent;
border: none;
border-radius: var(--radius-sm);
color: var(--text-muted);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.chat-session-trigger:hover,
.chat-session-switcher.open .chat-session-trigger {
background: var(--bg-subtle);
color: var(--text);
}
.chat-header-tabs { display: inline-flex; gap: 16px; flex: 1; }
.chat-header-tab {
background: transparent;
border: none;
border-bottom: 2px solid transparent;
border-radius: 0;
padding: 8px 0;
font-size: 13px;
color: var(--text-muted);
font-weight: 500;
}
.chat-header-tab:hover { color: var(--text); background: transparent; border-color: transparent; }
.chat-header-tab.active {
color: var(--text);
border-bottom-color: var(--text);
}
.chat-active-conversation {
min-width: 0;
flex: 1;
display: inline-flex;
align-items: center;
gap: 6px;
}
.chat-active-conversation-title {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 600;
color: var(--text);
}
.chat-active-conversation-rename {
width: 24px;
height: 24px;
padding: 0;
border: none;
background: transparent;
color: var(--text-faint);
border-radius: var(--radius-sm);
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
}
.chat-active-conversation-rename:hover {
background: var(--bg-subtle);
color: var(--text);
}
.chat-active-conversation-rename:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.chat-active-conversation-input {
width: 100%;
min-width: 0;
height: 28px;
padding: 3px 8px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg);
color: var(--text);
font-size: 13px;
font-weight: 600;
}
.chat-active-conversation-input:focus {
outline: none;
border-color: var(--accent);
}
.chat-header-actions { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; }
.chat-header-actions .icon-only {
width: 28px; height: 28px;
padding: 0;
background: transparent;
border: none;
border-radius: var(--radius-sm);
color: var(--text-muted);
display: inline-flex;
align-items: center;
justify-content: center;
}
.chat-header-actions .icon-only:hover { background: var(--bg-subtle); color: var(--text); }
.chat-log {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 24px 20px;
display: flex;
flex-direction: column;
gap: 24px;
min-width: 0;
/* No visible scrollbar: the message rail at the right edge is the
positional affordance for the log. */
scrollbar-width: none;
}
.chat-log::-webkit-scrollbar {
display: none;
}
.chat-message-rail {
position: absolute;
right: 4px;
/* The nav is the hover hit zone: it spans the whole log viewport — from
just under the project header (history icons) down to the composer top —
while the visible wheel stays centered inside it. */
top: 0;
bottom: 0;
z-index: 8;
width: 20px;
display: flex;
flex-direction: column;
justify-content: center;
opacity: 0;
pointer-events: auto;
transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.chat-message-rail:hover,
.chat-message-rail:focus-within {
opacity: 1;
}
/* Picking a message retracts the module (component-managed): this loses to
neither the hover nor the focus rule above because it comes later at equal
specificity, and it clears on pointer leave. */
.chat-message-rail.is-retracted,
.chat-message-rail.is-retracted:hover,
.chat-message-rail.is-retracted:focus-within {
opacity: 0;
}
.chat-message-rail__track {
position: relative;
width: 100%;
min-height: 0;
max-height: 100%;
display: flex;
flex-direction: column;
gap: 3px;
pointer-events: auto;
/* No justify-content: center here — centered flex overflow puts the start
half of the column into unreachable negative scroll space. */
overflow-y: auto;
scrollbar-width: none;
/* Wheel input over the rail scrolls the rail, never the chat log under it. */
overscroll-behavior: contain;
}
/* Wheel mode (long conversations only, gated by the component): the column
fills the available rail height and the mask fades exactly the top and
bottom 8 dashes (8 × 11px pitch = 88px zones; the 40% bound only kicks in
on very short windows so the fades never swallow the middle). When the
column outgrows the rail, it rolls — the component keeps the active dash
centered as the chat scrolls. Short conversations show the full column
with no mask occlusion. */
.chat-message-rail[data-wheel='true'] .chat-message-rail__track {
mask-image: linear-gradient(
to bottom,
transparent,
#000 min(88px, 40%),
#000 calc(100% - min(88px, 40%)),
transparent
);
}
.chat-message-rail__track::-webkit-scrollbar {
display: none;
}
.chat-message-rail__marker {
position: relative;
width: 20px;
height: 8px;
flex: 0 0 8px;
padding: 0;
border: 0;
background: transparent;
display: flex;
align-items: center;
/* Dashes anchor to the module's right edge (the screen side), ragged
toward the content — mirroring an outline rail. */
justify-content: flex-end;
cursor: pointer;
}
.chat-message-rail__marker span {
display: block;
/* Uniform base length; on hover the component eases the pointed dash and
its 4 neighbors per side longer via this variable (dock-style falloff). */
width: var(--chat-rail-dash, 8px);
height: 1.5px;
border-radius: var(--radius-pill);
background: color-mix(in srgb, var(--text-muted) 34%, transparent);
transition:
width 220ms cubic-bezier(0.23, 1, 0.32, 1),
background 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
.chat-message-rail__marker:hover span,
.chat-message-rail__marker:focus-visible span,
.chat-message-rail__marker.is-previewing span {
background: var(--text);
}
.chat-message-rail__marker.is-active span {
background: var(--text);
}
.chat-message-rail__marker:focus-visible {
outline: none;
}
.chat-message-rail__preview {
position: absolute;
/* The rail sits at the pane's right edge; the card opens to its left. */
right: 36px;
top: var(--chat-message-rail-y);
width: min(280px, calc(100vw - 88px));
max-width: 280px;
padding: 12px 14px;
border: 1px solid var(--material-separator);
border-radius: 12px;
/* Keep the text side calm and opaque, then reveal more of the transcript
toward the rail so the card reads as a white-to-glass lens. */
background: linear-gradient(to right, var(--bg-elevated), var(--glass-regular));
-webkit-backdrop-filter: var(--glass-backdrop);
backdrop-filter: var(--glass-backdrop);
color: var(--text);
box-shadow: 0 18px 40px color-mix(in srgb, var(--text) 12%, transparent);
transform: translateY(-50%);
pointer-events: none;
}
.chat-message-rail__preview p {
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 13px;
line-height: 1.45;
white-space: pre-wrap;
overflow-wrap: anywhere;
word-break: break-word;
}
.chat-log.is-balanced-transcript > .msg:first-of-type {
margin-top: auto;
}
/* Anchor-to-top tail spacer. Height is driven imperatively by ChatPane; the
negative margin cancels the flex `gap` so it contributes nothing when idle
(height: 0). */
.chat-log-tail-spacer {
flex: 0 0 auto;
height: 0;
margin-top: -24px;
}
.chat-log.is-loading {
position: relative;
}
.chat-loading-state {
min-height: 220px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
color: var(--text-muted);
animation: chat-loading-enter 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.chat-loading-mark {
display: inline-flex;
align-items: center;
gap: 5px;
height: 22px;
}
.chat-loading-mark span {
width: 6px;
height: 6px;
border-radius: var(--radius-pill);
background: var(--accent);
opacity: 0.32;
animation: chat-loading-dot 900ms cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
.chat-loading-mark span:nth-child(2) { animation-delay: 120ms; }
.chat-loading-mark span:nth-child(3) { animation-delay: 240ms; }
.chat-loading-copy {
font-size: 12px;
font-weight: 600;
}
.chat-loading-lines {
width: min(260px, 72%);
display: flex;
flex-direction: column;
gap: 8px;
}
.chat-loading-lines span {
height: 8px;
border-radius: var(--radius-pill);
background: linear-gradient(
90deg,
color-mix(in srgb, var(--text-muted) 10%, transparent),
color-mix(in srgb, var(--text-muted) 18%, transparent),
color-mix(in srgb, var(--text-muted) 10%, transparent)
);
background-size: 200% 100%;
animation: chat-loading-sheen 1100ms cubic-bezier(0.23, 1, 0.32, 1) infinite;
}
.chat-loading-lines span:nth-child(2) { width: 82%; }
.chat-loading-lines span:nth-child(3) { width: 58%; }
.chat-virtual-spacer {
position: relative;
flex: 0 0 auto;
min-height: 100%;
}
.chat-virtual-row {
position: absolute;
left: 0;
right: 0;
top: 0;
padding-bottom: 14px;
display: flex;
flex-direction: column;
min-width: 0;
will-change: transform;
}
@keyframes chat-loading-enter {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes chat-loading-dot {
0%, 70%, 100% { opacity: 0.3; transform: translateY(0); }
35% { opacity: 1; transform: translateY(-4px); }
}
@keyframes chat-loading-sheen {
from { background-position: 140% 0; }
to { background-position: -60% 0; }
}
/* -------- Messages -------------------------------------------------- */
.msg {
padding: 0;
background: transparent;
border: none;
white-space: normal;
word-wrap: break-word;
min-width: 0;
max-width: 100%;
animation: msg-enter 200ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes msg-enter {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.msg { animation: none; }
}
.msg.user {
align-self: flex-end;
display: flex;
flex-direction: column;
align-items: flex-end;
max-width: min(78%, 560px);
}
.msg .role {
display: flex;
align-items: baseline;
gap: 8px;
font-size: 13px;
text-transform: none;
color: var(--text-strong);
margin-bottom: 8px;
letter-spacing: 0;
font-weight: 600;
}
.msg-time {
color: var(--text-faint);
font-size: 12px;
font-weight: 500;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.msg.user .user-text {
white-space: pre-wrap;
color: var(--text);
background: #ededed;
border: none;
border-radius: var(--radius-lg) var(--radius-none) var(--radius-lg) var(--radius-lg);
padding: 8px 12px;
line-height: 1.5;
font-size: 13px;
box-shadow: none;
}
.msg.user.is-chat-rail-highlighted .user-bubble {
outline: 2px solid color-mix(in srgb, var(--accent) 52%, transparent);
outline-offset: 3px;
}
.msg-run-context-row {
display: flex;
justify-content: flex-end;
align-items: flex-start;
flex-wrap: nowrap;
gap: 3px;
margin: 1px 0 4px;
max-width: min(100%, 430px);
margin-left: auto;
overflow: visible;
}
.msg-applied-context {
display: flex;
flex: 0 1 100%;
flex-direction: column;
min-width: 0;
max-width: 100%;
margin: 0 0 2px;
border-radius: 0;
background: transparent;
color: var(--text-faint);
}
.msg-applied-context__toggle {
display: flex;
align-items: center;
gap: 4px;
width: 100%;
min-width: 0;
height: 20px;
padding: 1px 4px;
border: 0;
border-radius: inherit;
background: transparent;
color: inherit;
font: inherit;
font-size: 10px;
text-align: left;
cursor: pointer;
transition: color 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.msg-applied-context__toggle:hover {
background: transparent;
color: var(--text-muted);
}
.msg-applied-context__toggle:focus-visible {
outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
outline-offset: 1px;
}
.msg-applied-context__icon,
.msg-applied-context__chevron {
display: inline-flex;
flex: 0 0 auto;
color: var(--text-faint);
}
.msg-applied-context__summary {
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.msg-applied-context__chevron {
transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.msg-applied-context__chevron.is-open {
transform: rotate(180deg);
}
.msg-applied-context__details {
display: flex;
flex-wrap: wrap;
gap: 3px;
padding: 2px 4px 4px;
border-top: 1px solid color-mix(in srgb, var(--text-muted) 7%, transparent);
}
.msg-applied-context__item {
display: inline-flex;
align-items: center;
gap: 3px;
min-width: 0;
padding: 1px 3px;
border: 0;
border-radius: var(--radius-xs);
background: transparent;
color: var(--text-faint);
font: inherit;
font-size: 9.5px;
white-space: nowrap;
}
.msg-applied-context__item.is-action {
cursor: pointer;
}
.msg-applied-context__item.is-action:hover {
color: var(--text);
}
.msg-applied-context__kind {
color: var(--text-faint);
font-size: 8.5px;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.msg-mode-chip {
display: inline-flex;
align-items: center;
gap: 3px;
box-sizing: border-box;
height: 18px;
flex: 0 0 auto;
padding: 1px 5px;
border-radius: var(--radius-sm);
border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
background: color-mix(in srgb, var(--accent-tint) 72%, var(--bg));
color: color-mix(in srgb, var(--accent) 72%, var(--text-strong));
font-size: 12px;
font-weight: 600;
line-height: 12px;
white-space: nowrap;
}
.msg-mode-chip svg {
width: 8px;
height: 8px;
}
.msg-mode-chip--chat {
border-color: color-mix(in srgb, var(--text-soft) 22%, var(--border));
background: color-mix(in srgb, var(--bg-subtle) 78%, #fff);
color: var(--text-muted);
}
.msg-plugin-context {
display: inline-flex;
align-items: center;
justify-content: flex-end;
flex-wrap: nowrap;
flex: 0 1 auto;
gap: 3px;
min-width: 0;
max-width: 100%;
overflow: hidden;
}
.msg-plugin-chip {
display: inline-flex;
align-items: center;
gap: 8px;
margin: 4px 0 6px;
padding: 4px 10px 4px 8px;
border-radius: var(--radius-pill);
background: var(--bg-fill-tertiary);
border: none;
font-size: 12px;
line-height: 1;
color: var(--text-muted);
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-align: left;
appearance: none;
}
.msg-plugin-chip--action {
cursor: pointer;
transition:
background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),
border-color 140ms cubic-bezier(0.23, 1, 0.32, 1),
box-shadow 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.msg-plugin-chip--action:hover {
background: var(--bg-panel);
border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}
.msg-plugin-chip--action:focus-visible {
outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
outline-offset: 2px;
}
.msg-plugin-chip__dot {
width: 3px;
height: 3px;
border-radius: 50%;
background: var(--accent);
flex: 0 0 auto;
}
.msg-plugin-chip--design-system .msg-plugin-chip__dot {
background: #d76445;
}
.msg-plugin-chip__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 11px;
height: 11px;
flex: 0 0 11px;
border-radius: 3px;
background: color-mix(in srgb, var(--text-muted) 10%, var(--bg-subtle));
color: var(--text-muted);
}
.msg-plugin-chip__icon svg {
width: 7px;
height: 7px;
}
.msg-plugin-chip--workspace {
gap: 3px;
padding-left: 2px;
background: color-mix(in srgb, var(--bg-panel) 82%, var(--bg-subtle));
border-color: color-mix(in srgb, var(--text-muted) 18%, var(--border));
}
.msg-plugin-chip--workspace-browser .msg-plugin-chip__icon {
background: color-mix(in srgb, var(--accent) 10%, var(--bg-subtle));
color: var(--accent);
}
.msg-plugin-chip__label {
display: inline-flex;
align-items: center;
flex: 1 1 auto;
gap: 3px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 12px;
}
.msg-plugin-chip__kind {
text-transform: uppercase;
letter-spacing: 0.02em;
font-weight: 600;
font-size: 12px;
flex: 0 0 auto;
color: var(--text-faint);
}
.msg-plugin-chip__title {
color: var(--text);
font-weight: 500;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.msg-plugin-chip__version,
.msg-plugin-chip__task {
color: var(--text-faint);
font-variant-numeric: tabular-nums;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.msg-plugin-chip__task {
border-left: 1px solid var(--bg-fill-secondary);
padding-left: 8px;
}
.msg-plugin-context .context-chip-strip {
justify-content: flex-end;
min-width: 0;
gap: 3px;
}
.msg-plugin-context .context-chip-strip__chip {
box-sizing: border-box;
height: 18px;
max-width: 190px;
overflow: hidden;
border-radius: var(--radius-sm);
font-size: 12px;
line-height: 12px;
}
.msg-plugin-context .context-chip-strip__body {
height: 100%;
gap: 3px;
padding: 1px 5px;
line-height: 12px;
}
.msg-plugin-context .context-chip-strip__icon svg {
width: 7px;
height: 7px;
}
.msg-plugin-context .context-chip-strip__icon::before {
width: 3px;
height: 3px;
margin-right: 3px;
box-shadow: none;
}
.msg-plugin-context .context-chip-strip__kind {
font-size: 12px;
letter-spacing: 0.02em;
}
.msg-plugin-context .context-chip-strip__remove {
width: 14px;
height: 14px;
font-size: 12px;
}
/* Wrapper for user bubble + hover action footer */
.msg.user .user-text-wrap {
position: relative;
display: flex;
flex-direction: column;
align-items: flex-end;
max-width: 100%;
}
.msg.user .user-status-wrap {
display: flex;
justify-content: flex-end;
}
.msg.assistant .op-waiting {
display: inline-flex;
align-items: center;
width: auto;
max-width: min(420px, 100%);
gap: 7px;
padding: 6px 10px;
border: 1px solid color-mix(in srgb, var(--text-muted) 16%, var(--border));
border-radius: var(--radius);
background: color-mix(in srgb, var(--bg-panel) 92%, var(--bg-subtle));
box-shadow: none;
color: var(--text-muted);
font-size: 12px;
font-style: normal;
}
.msg.assistant .op-waiting-dot {
width: 6px;
height: 6px;
flex: 0 0 6px;
}
.msg.assistant .op-waiting-label {
color: var(--text);
font-weight: 600;
}
.msg.assistant .op-waiting-detail {
max-width: 180px;
padding: 1px 5px;
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--text) 5%, var(--bg-subtle));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.msg.assistant .op-waiting-hint {
flex-basis: auto;
color: var(--text-soft);
font-size: 12px;
font-style: italic;
}
.user-status-card {
display: inline-flex;
align-items: center;
gap: 10px;
max-width: min(320px, 100%);
padding: 9px 11px;
border-radius: 14px 14px 4px 14px;
background: var(--bg-fill-tertiary);
border: none;
box-shadow: none;
color: var(--text);
text-align: start;
}
.user-status-card__icon {
width: 28px;
height: 28px;
border-radius: var(--radius);
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
color: var(--accent);
background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.user-status-card__copy {
min-width: 0;
display: grid;
gap: 2px;
}
.user-status-card__copy strong {
font-size: 13px;
line-height: 1.2;
font-weight: 600;
}
.user-status-card__copy span {
font-size: 12px;
line-height: 1.35;
color: var(--text-muted);
}
/* Hover-revealed footer below the user bubble: time + copy (Lobe style) */
.msg.user .user-actions {
display: flex;
align-items: center;
gap: 4px;
margin-top: 4px;
min-height: 20px;
opacity: 0;
transition: opacity 140ms var(--ease-out);
}
.msg.user .user-text-wrap:hover .user-actions,
.msg.user .user-text-wrap:focus-within .user-actions {
opacity: 1;
}
.msg.user .user-copy-btn {
padding: 4px;
border: none;
background: none;
border-radius: var(--radius-sm);
color: var(--text-soft);
cursor: pointer;
display: inline-flex;
transition: color 120ms var(--ease-out), background 120ms var(--ease-out);
}
.msg.user .user-copy-btn:hover {
color: var(--text);
background: var(--bg-subtle);
}
.msg.user .user-copy-btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
@media (hover: none) {
.msg.user .user-actions {
opacity: 1;
}
}
.msg.assistant .prose { margin-top: 8px; }
.msg .artifact-badge {
display: inline-block;
margin-top: 8px;
padding: 2px 8px;
font-size: 12px;
background: var(--accent);
color: white;
border-radius: var(--radius-xs);
}
/* Run recovery uses the shared user-action card. Only the concrete problem and
primary recovery action stay visible; friendly copy plus raw diagnostics are
grouped in one expandable detail area. */
.run-error__details {
display: flex;
flex-direction: column;
gap: 9px;
}
.run-error__description {
margin: 0;
font-size: 13px;
font-weight: 600;
line-height: 1.4;
color: var(--text-strong);
}
.run-error__desc {
margin: 3px 0 0;
font-size: 13px;
line-height: 1.55;
color: var(--text-muted);
max-width: 64ch;
overflow-wrap: anywhere;
}
.run-error__diagnostic {
overflow: hidden;
border: 1px solid var(--border-soft);
border-radius: var(--radius-sm);
background: var(--bg-subtle);
}
.run-error__diagnostic-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 5px 7px 3px 10px;
color: var(--text-soft);