-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.css
More file actions
1668 lines (1587 loc) · 94.5 KB
/
Copy pathchat.css
File metadata and controls
1668 lines (1587 loc) · 94.5 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.css — chat-specific styles, including the base .chat-* rules used by
Chat()/ChatMessage() (chat/threads.js, chat/message.js): .chat, .chat-head,
.chat-thread, .chat-msg, .chat-avatar, .chat-bubble, .chat-stack,
.chat-empty. This file also carries the AgentChat kit styles (the reusable
multi-agent orchestration chat surface, .agentchat-*). */
/* Base chat surface — the default (non-flat) messenger layout: left/right
avatar-disc + colored-bubble turns. .chat-msg-flat further down overrides
these to the claude.ai/code full-width turn style; these are the rules it
overrides FROM, and were previously entirely undefined, so the default
layout rendered on raw flex/browser defaults (unstyled bubble shape, no
avatar depth, no defined thread padding) until a Chat() consumer supplied
its own colliding class names. */
.chat {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
.chat-head {
display: flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2-75) var(--space-3);
border-bottom: 1px solid var(--panel-3, color-mix(in oklab, var(--fg) 10%, transparent));
flex-shrink: 0;
}
.chat-head .ds-chat-title { font-size: var(--fs-sm); font-weight: var(--fw-medium); margin: 0; }
.chat-head .sub { font-size: var(--fs-tiny); color: var(--fg-3); }
.chat-head .spread { flex: 1; }
.chat-thread {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: var(--space-3);
padding: var(--space-3) var(--space-3) var(--space-4);
/* A short thread must not stretch its one message across the whole
viewport height — pack content to the bottom (where the composer is)
instead of centering it in a sea of empty space above and below. */
justify-content: flex-end;
}
.chat-empty {
margin: auto;
max-width: var(--measure-narrow, 60ch);
text-align: center;
padding: var(--space-5) var(--space-3);
color: var(--fg-3);
}
.chat-empty-title { font-size: var(--fs-lg); font-weight: var(--fw-medium); color: var(--fg-2); margin: 0 0 var(--space-1); }
.chat-empty-sub { font-size: var(--fs-sm); margin: 0; }
.chat-msg {
display: flex;
gap: var(--space-2);
align-items: flex-start;
max-width: 100%;
}
.chat-msg.you { flex-direction: row-reverse; }
.chat-msg.centered { justify-content: center; text-align: center; }
.chat-avatar {
width: 32px;
height: 32px;
flex-shrink: 0;
border-radius: 50%;
background: var(--bg-3);
color: var(--fg);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: var(--fs-tiny);
font-weight: var(--fw-medium);
/* Depth over a flat solid-color disc: a hairline inset ring plus the same
soft shadow --panel-shadow uses elsewhere, so avatars read as a real
surface element instead of a wireframe placeholder. */
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fg) 10%, transparent), 0 1px 2px color-mix(in oklab, var(--fg) 10%, transparent);
}
.chat-stack {
display: flex;
flex-direction: column;
gap: var(--space-1);
max-width: 70%;
min-width: 0;
}
.chat-msg.you .chat-stack { align-items: flex-end; }
.chat-bubble {
padding: var(--space-2) var(--space-2-75);
background: var(--bg-2);
color: var(--fg);
/* r-2, not a pill — a pill-capsule bubble read as a generic chat-template
shape inconsistent with every other rounded element in the app (which
all use the r-0..r-3 scale, never 999px). */
border-radius: var(--r-2);
line-height: var(--lh-base, 1.5);
word-break: break-word;
font-size: var(--fs-sm);
}
.chat-msg.you .chat-bubble { background: var(--accent); color: var(--accent-fg); }
.chat-meta { display: flex; gap: var(--space-1-5); font-size: var(--fs-nano); color: var(--fg-3); padding: 0 var(--space-1); }
.agentchat {
display: flex;
flex-direction: column;
min-height: 0;
flex: 1;
gap: var(--space-2, 8px);
/* The chat tab opts out of .ws-main's padding (mainFlush) so the thread can
manage its own --measure centering, but that left every direct child -
controls row, heading, empty-state, composer - flush against the column
edge with zero gutter (the crumb bar above keeps its own padding, so the
content below visibly touched the edge the crumb text did not). A
uniform inline gutter here restores breathing room for every row without
disturbing --measure centering (it centers within this padded box). */
padding-inline: var(--space-5);
}
/* agent + model picker, new/stop, status — wraps on narrow widths */
.agentchat-controls {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-2, 8px);
}
.agentchat-controls .select,
.agentchat-controls [role="combobox"] { min-width: 130px; max-width: 240px; }
.agentchat-controls .ds-select { min-width: 130px; max-width: 240px; }
/* One shared control metric for the most-seen chrome row (mirrors the
.ds-dash-toolbar precedent): selects, buttons, export acts all 32px / r-1. */
/* The 28px right pad is OFF-SCALE ON PURPOSE: it is not rhythm but clearance
for the native select's dropdown arrow, which the UA draws at a fixed inset.
Snapping to --space-5 (32px) or --space-4 (24px) either wastes a column of
text width or lets long option labels run under the arrow. */
.agentchat-controls .ds-select { min-height: 32px; padding: var(--space-1) 28px var(--space-1) var(--space-2-5); font-size: var(--fs-sm); border-radius: var(--r-1); }
.agentchat-controls .btn, .agentchat-controls .btn-primary { padding: var(--space-1-5) var(--space-2-75); min-height: 32px; border-radius: var(--r-1); font-weight: 500; }
@media (pointer: coarse) {
.agentchat-controls .ds-select, .agentchat-controls .btn, .agentchat-controls .btn-primary { min-height: 44px; }
}
/* Narrow viewports: let the agent/model selects share the row two-up, then
stack full-width on the smallest screens, and drop the status to its own
line so nothing is squeezed below a usable tap size. */
@media (max-width: 640px) {
.agentchat-controls .select,
.agentchat-controls .ds-select,
.agentchat-controls [role="combobox"] { flex: 1 1 45%; max-width: none; }
.agentchat-status { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 360px) {
.agentchat-controls .select,
.agentchat-controls .ds-select,
.agentchat-controls [role="combobox"] { flex-basis: 100%; }
}
/* The .4em/.5em gaps on this status line, .agentchat-head below, and the
narrow-viewport .agentchat-controls override are em-based ON PURPOSE, not
un-migrated literals: each is the gap between a label and its own inline
text/disc, so it must track that element's font-size (these rows are scaled
by font-size alone at narrow widths). A --space-* px rung would hold the gap
fixed while the type around it shrank. */
.agentchat-status {
display: inline-flex;
align-items: center;
gap: .4em;
white-space: nowrap;
margin-left: auto;
font-size: var(--fs-tiny);
color: var(--fg-3);
}
/* status disc — a CSS-drawn dot, not a glyph; pulses while streaming */
.agentchat-status .status-dot-disc {
flex: none; width: 8px; height: 8px; border-radius: 50%;
background: var(--fg-3);
}
.agentchat-status .status-dot-disc.status-dot-live {
background: var(--accent);
animation: agentchat-pulse 2s infinite;
}
@keyframes agentchat-pulse {
0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
70% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 0%, transparent); }
100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
.agentchat-status .status-dot-disc { animation: none !important; }
}
/* working-directory bar */
.agentchat-cwd {
display: flex;
align-items: center;
gap: var(--space-2, 8px);
font-size: var(--fs-tiny);
color: var(--fg-3);
flex-wrap: wrap;
}
.agentchat-cwd-text {
font-family: var(--ff-mono);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
/* 60ch overflows narrow phones; clamp to the viewport so the path ellipsizes
instead of pushing the row wider than the screen. */
max-width: min(60ch, 60vw);
}
.agentchat-cwd-btn {
background: none;
border: 1px solid var(--rule);
color: inherit;
border-radius: var(--r-1);
padding: var(--space-hair) var(--space-2);
cursor: pointer;
font: inherit;
}
.agentchat-cwd-btn:hover { border-color: var(--accent); }
.agentchat-cwd-btn:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
.agentchat-cwd-input {
flex: 1;
min-width: 12ch;
background: var(--bg-2);
border: var(--bw-hair) solid var(--rule);
color: var(--fg);
border-radius: var(--r-1);
padding: var(--space-1) var(--space-2);
font: inherit;
}
.agentchat-cwd-input:focus-visible { outline: none; box-shadow: var(--focus-ring-inset); }
.agentchat-cwd-input[aria-invalid='true'] { border-color: var(--flame); box-shadow: inset 0 0 0 var(--bw-hair) var(--flame); }
.agentchat-cwd-input[aria-busy='true'] { border-color: var(--fg-3); box-shadow: inset 0 0 0 var(--bw-hair) var(--fg-3); }
/* cwd practicality upgrade: editing mode stacks the input row plus any
optional roots/recent/browse rows the host wires, instead of a single flat
row - each sub-row wraps independently at narrow widths. */
.agentchat-cwd-editing { flex-direction: column; align-items: stretch; }
.agentchat-cwd-row { display: flex; align-items: center; gap: var(--space-2, 8px); flex-wrap: wrap; }
.agentchat-cwd-roots, .agentchat-cwd-recent {
display: flex; align-items: center; gap: var(--space-1-75); flex-wrap: wrap;
}
.agentchat-cwd-recent-label { font-size: var(--fs-tiny); color: var(--fg-3); }
.agentchat-cwd-chip {
background: var(--bg-2); border: var(--bw-hair) solid var(--rule); color: var(--fg-2);
border-radius: var(--r-pill); padding: var(--space-half) var(--space-2-5); font: inherit; font-size: var(--fs-tiny);
cursor: pointer;
}
.agentchat-cwd-chip:hover { border-color: var(--accent); color: var(--fg); }
.agentchat-cwd-chip:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
.agentchat-cwd-browse {
border: var(--bw-hair) solid var(--rule); border-radius: var(--r-1);
padding: var(--space-2, 8px); background: var(--bg-2);
display: flex; flex-direction: column; gap: var(--space-1-75);
max-height: 220px;
}
.agentchat-cwd-browse-list { overflow-y: auto; display: flex; flex-direction: column; max-height: 160px; }
.agentchat-cwd-browse-item {
background: none; border: none; color: var(--fg-2); text-align: left;
padding: var(--space-1-75) var(--space-2); border-radius: var(--r-1); font: inherit; font-size: var(--fs-tiny);
cursor: pointer;
}
.agentchat-cwd-browse-item:hover, .agentchat-cwd-browse-item:focus-visible { background: var(--bg-3, var(--bg)); color: var(--fg); }
.agentchat-cwd-browse-loading, .agentchat-cwd-browse-empty { padding: var(--space-1-75) var(--space-2); font-size: var(--fs-tiny); color: var(--fg-3); }
/* head + thread */
.agentchat-head {
display: flex;
align-items: baseline;
gap: .5em;
}
.agentchat-title { font-size: 1em; margin: 0; }
.agentchat-sub { font-size: var(--fs-tiny); color: var(--fg-3); }
/* Optional inline content viewer beside the thread (sidePanel prop) - a
docstudio-cue addition (its chat view keeps a document/PDF preview open
next to the conversation rather than in a separate tab). SplitPanel (an
existing kit primitive) owns the resizable layout; these rules only shape
the two panes' internal structure. */
.agentchat.has-side-panel { gap: 0; }
.agentchat.has-side-panel > .ds-ep-split { flex: 1; min-height: 0; }
.agentchat-main-col { display: flex; flex-direction: column; min-height: 0; height: 100%; gap: var(--space-2, 8px); }
.agentchat-side-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; border-left: var(--bw-hair) solid var(--bg-3); }
.agentchat-side-panel-head {
display: flex; align-items: center; justify-content: space-between;
padding: var(--space-2, 8px) var(--space-3, 16px); border-bottom: var(--bw-hair) solid var(--bg-3);
flex: 0 0 auto;
}
.agentchat-side-panel-title { font-size: var(--fs-tiny); font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: var(--tr-label); }
.agentchat-side-panel-close {
display: inline-flex; align-items: center; justify-content: center;
background: none; border: none; color: var(--fg-3); cursor: pointer;
padding: var(--space-1); border-radius: var(--r-1);
}
.agentchat-side-panel-close:hover { background: var(--bg-2); color: var(--fg); }
.agentchat-side-panel-close:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
.agentchat-side-panel-body { flex: 1; min-height: 0; overflow: auto; }
@media (max-width: 900px) {
/* A resizable side-by-side split is impractical below tablet width - stack
the preview under the thread instead of horizontally squeezing both. */
.agentchat.has-side-panel > .ds-ep-split.horiz { flex-direction: column; }
.agentchat-side-panel { border-left: none; border-top: var(--bw-hair) solid var(--bg-3); max-height: 45vh; }
}
/* Thread wrapper hosts the absolutely-positioned jump-to-latest button. */
.agentchat-thread-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.agentchat-thread {
flex: 1;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: calc(var(--space-2, 8px) * var(--density, 1));
}
/* Jump-to-latest: hidden until the thread scroll listener adds .show. */
.agentchat-jump {
position: absolute; right: 16px; bottom: 12px; z-index: var(--z-raised);
display: none; align-items: center; gap: .35em;
/* em, not --space-*: this pill must scale with its own --fs-tiny text so the
capsule stays proportional when a host overrides the chat font size. A px
rung would fix the padding while the label grew/shrank inside it. */
padding: .4em .8em; font: inherit; font-size: var(--fs-tiny); cursor: pointer;
border-radius: var(--r-pill); border: var(--bw-hair) solid var(--rule);
background: var(--bg-2); color: var(--fg-2, var(--fg));
box-shadow: 0 2px 8px color-mix(in srgb, var(--fg) 14%, transparent);
}
.agentchat-jump.show { display: inline-flex; }
.agentchat-jump:hover { background: var(--bg-3); }
.agentchat-jump:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
/* Streaming caret: a thin blinking bar at the live edge of an assistant turn. */
.chat-stream-caret {
/* margin-left:1px is OFF-SCALE ON PURPOSE — a hairline optical nudge that
separates the caret bar from the last glyph without reading as a space
character. --space-hair (2px) is already wide enough to look like one. */
display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
vertical-align: text-bottom; background: var(--accent, var(--fg));
animation: chat-caret-blink 1s step-end infinite;
}
@keyframes chat-caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-stream-caret { animation: none; opacity: .8; } }
/* Per-message hover-revealed action row (copy / retry / edit). */
.chat-msg-actions { display: flex; gap: var(--space-hair); margin-top: var(--space-half); opacity: 0; transition: opacity var(--dur-snap, .12s) var(--ease, ease); }
.chat-msg:hover .chat-msg-actions, .chat-msg:focus-within .chat-msg-actions { opacity: 1; }
/* Flat (community) rows float the action pill at the top-right corner,
matching stoat's MessageToolbar (top:-18px; right:16px; box-shadow pill)
instead of sitting in normal flow below the bubble. */
.chat-msg.chat-msg-flat { position: relative; }
.chat-msg-actions.chat-msg-actions-float {
position: absolute; top: calc(-1 * var(--space-3)); right: var(--space-2);
margin-top: 0; padding: var(--space-hair); gap: 0;
background: var(--bg-2); border-radius: var(--r-1, 8px);
box-shadow: var(--shadow-1); z-index: var(--z-raised);
}
.chat-msg-actions-float .chat-msg-action { min-width: 26px; }
.chat-msg-actions-float .chat-msg-action-label { display: none; }
.chat-msg-action {
display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
min-width: 26px; height: 26px; padding: 0 var(--space-1-75); cursor: pointer;
border: none; border-radius: var(--r-1, 8px); background: none; color: var(--fg-3);
font-family: var(--ff-body); font-size: var(--fs-tiny);
}
.chat-msg-action-label { font-size: var(--fs-tiny); }
.chat-msg-action:hover { background: var(--bg-2); color: var(--fg); }
.chat-msg-action:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; opacity: 1; }
.chat-msg-action.is-copied { color: var(--accent-ink); opacity: 1; }
/* Empty state: a fresh thread is an invitation, not a void.
The em-based gap/padding through this block and the suggestion chips below
are OFF the --space-* px scale ON PURPOSE: the empty state is typeset copy
whose rhythm must track its own font-size (hosts scale this panel down on
narrow viewports via font-size alone). Fixed px rungs here would decouple
the chip padding from the label and break the capsule proportions. */
.agentchat-empty {
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: .4em;
text-align: center;
padding: var(--space-6, 32px) var(--space-4, 16px);
color: var(--fg-3);
max-width: 46ch;
}
.agentchat-empty-title { margin: 0; font-size: 1.05em; color: var(--fg-2, var(--fg)); }
.agentchat-empty-sub { margin: 0; font-size: var(--fs-sm); }
.agentchat-empty-suggestions, .chat-empty-suggestions {
display: flex;
flex-wrap: wrap;
gap: .5em;
justify-content: center;
margin-top: .5em;
}
.agentchat-empty-suggestion, .chat-empty-suggestion {
cursor: pointer;
font: inherit;
font-size: var(--fs-tiny);
padding: .4em .8em;
border-radius: var(--r-pill);
border: 1px solid color-mix(in srgb, var(--fg) 16%, transparent);
background: color-mix(in srgb, var(--fg) 5%, transparent);
color: var(--fg-2, var(--fg));
}
.agentchat-empty-suggestion:hover, .chat-empty-suggestion:hover { background: color-mix(in srgb, var(--accent, var(--fg)) 12%, transparent); }
.agentchat-empty-suggestion:focus-visible, .chat-empty-suggestion:focus-visible { outline: 2px solid var(--accent, var(--fg)); outline-offset: var(--focus-offset); }
/* Follow-up chips (contextual, based on the last turn) vs empty-state seed
chips (generic starter ideas) previously shared identical DOM shape with no
visual signal distinguishing them - a dashed border reads as "derived from
context" without introducing a new color/shape language. */
.agentchat-followup { border-style: dashed; }
/* Guided install path in the empty state: copy line + monospaced command rows
(each with its own copy button) + a recheck button. No animation. */
.agentchat-install {
margin-top: var(--space-4, 16px);
display: flex;
flex-direction: column;
gap: var(--space-2, 8px);
text-align: left;
width: 100%;
}
.agentchat-install-text { margin: 0; font-size: var(--fs-sm); color: var(--fg-3); }
.agentchat-install-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1, 4px); }
.agentchat-install-row {
display: flex; align-items: center; gap: var(--space-2, 8px);
padding: var(--space-1, 4px) var(--space-2, 8px);
border: var(--bw-hair) solid var(--rule);
border-radius: var(--r-1, 8px);
background: var(--bg-2);
}
.agentchat-install-agent { flex: 0 0 auto; font-size: var(--fs-tiny); color: var(--fg-3); min-width: 8ch; }
.agentchat-install-cmd {
flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
font-family: var(--ff-mono); font-size: var(--fs-sm); color: var(--fg-2, var(--fg));
}
.agentchat-install-copy {
flex: 0 0 auto; cursor: pointer; padding: var(--space-hair) var(--space-2); min-height: 24px;
border: var(--bw-hair) solid var(--bg-3); border-radius: var(--r-1, 8px);
background: none; color: var(--fg-3);
font-family: var(--ff-body); font-size: var(--fs-tiny);
}
.agentchat-install-copy:hover { background: var(--bg-3); color: var(--fg); }
.agentchat-install-copy:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; }
.agentchat-install-actions { display: flex; justify-content: flex-start; }
/* Host-supplied transcript export actions riding the controls row. */
.agentchat-export-act {
cursor: pointer; padding: var(--space-1) var(--space-2-5); min-height: 32px;
border: var(--bw-hair) solid var(--bg-3); border-radius: var(--r-1, 8px);
background: none; color: var(--fg-3);
font-family: var(--ff-body); font-size: var(--fs-tiny);
}
.agentchat-export-act:hover { background: var(--bg-2); color: var(--fg); }
.agentchat-export-act:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; }
/* "working" tail: a long silent tool call shouldn't read as frozen.
em gap/padding here and on .chat-thinking below is deliberate — both tails
are inline status text sized off --fs-tiny, and their inset must shrink with
the type, not sit on a fixed px rung. */
.agentchat-working {
display: flex;
align-items: center;
gap: .5em;
padding: .3em .2em;
color: var(--fg-3);
font-size: var(--fs-tiny);
}
.agentchat-working-text { color: var(--fg-3); }
/* Self-contained dots (chat-thinking-dots lives in a kit sheet not bundled
into this DS distribution, so the agentchat tail draws its own). */
.agentchat-working .chat-thinking-dots { display: inline-flex; gap: var(--space-half); }
.agentchat-working .chat-thinking-dots span {
width: 5px; height: 5px; border-radius: 50%;
background: var(--fg); opacity: .4;
animation: agentchat-dot-bounce 1.2s infinite ease-in-out;
}
.agentchat-working .chat-thinking-dots span:nth-child(2) { animation-delay: .15s; }
.agentchat-working .chat-thinking-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes agentchat-dot-bounce {
0%, 80%, 100% { transform: scale(.6); opacity: .3; }
40% { transform: scale(1); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
.agentchat-working .chat-thinking-dots span { animation: none; opacity: .7; }
}
/* Standalone thinking part (ThinkingNode renders .chat-bubble.chat-thinking with
.chat-thinking-dots + .chat-thinking-text OUTSIDE the .agentchat-working tail).
Without these base rules the dots are invisible empty spans and the text has
no muted tone. Reuse the agentchat-dot-bounce keyframe. */
.chat-thinking { display: flex; align-items: center; gap: .5em; color: var(--fg-3); font-size: var(--fs-tiny); background: none; padding: .3em .2em; }
.chat-thinking-text { color: var(--fg-3); }
.chat-thinking-dots { display: inline-flex; gap: var(--space-half); }
.chat-thinking-dots span {
width: 5px; height: 5px; border-radius: 50%;
background: var(--fg); opacity: .4;
animation: agentchat-dot-bounce 1.2s infinite ease-in-out;
}
.chat-thinking-dots span:nth-child(2) { animation-delay: .15s; }
.chat-thinking-dots span:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
.chat-thinking-dots span { animation: none; opacity: .7; }
}
/* Responsive: the control cluster + cwd bar must stay usable on phones/tablets.
The cwd path can't eat the row beside its label + buttons on a narrow screen. */
.agentchat-controls { flex-wrap: wrap; }
.agentchat-cwd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(60ch, 60vw); }
@media (max-width: 900px) {
.agentchat-controls .ds-select { min-width: 110px; max-width: 180px; }
}
@media (max-width: 640px) {
.agentchat-cwd-text { max-width: 42vw; }
.agentchat-controls { gap: .4em; }
}
/* 360px: buttons fill full width so they remain tappable at the narrowest phones */
@media (max-width: 400px) {
.agentchat-controls .btn, .agentchat-controls .btn-primary,
.agentchat-controls button { flex: 1 1 100%; }
}
/* Coarse-pointer (touch): raise cwd button to 44px minimum tap target */
@media (pointer: coarse) {
.agentchat-cwd-btn, .agentchat-cwd-chip, .agentchat-cwd-browse-item { min-height: 44px; }
}
/* ----------------------------------------------------------------------------
Global status disc — a CSS-drawn status indicator (no text glyph) usable
outside .agentchat-status (session rows, dashboard cards). Tone via modifier.
---------------------------------------------------------------------------- */
/* Single canonical status disc — one source for live/error/connecting/stale
everywhere (crumb dot, conversation row, dashboard card, composer status).
The app's index.html disc/pulse override is deleted in favour of this. Only
the -live disc pulses; -stale is deliberately static (a stuck session must NOT
read as busy). Pulse colour is derived from --accent via color-mix so it
tracks the theme instead of a hardcoded rgba. */
.status-dot-disc {
display: inline-block; width: 8px; height: 8px; border-radius: 50%;
background: var(--fg-3); flex: 0 0 auto;
}
/* Each variant carries a non-colour channel (fill vs halo vs hollow ring) so the
states stay distinguishable for colour-blind users and when stale/connecting
would otherwise share a hue. Mirrors the rail-tone shape differentiation. */
/* One canonical stale tone (disc + word + rail share it) — a muted grey-warn,
deliberately desaturated so it is NOT the saturated --amber used by
connecting/connecting-stream (which would re-collide hues).
The mix is grey-dominant, NOT warn-dominant: at 70% --warn this measured
1.09:1 against --bg in dark theme (and 1.28:1 on a panel) as the `idle` word
in .ds-dash-status and .seg.is-idle — text that is present but effectively
unreadable. --fg-3 is the tier-3 TEXT tone and already carries a legible
contrast, so leading with it keeps the warn hue as a tint while restoring
readability. Measured after the change in a live browser. */
:root { --stale: color-mix(in oklab, var(--fg-3) 78%, var(--warn)); }
/* Live: a persistent faint concentric ring (resting shape channel, independent
of motion) with the pulse layered on top — so even at the pulse trough the
disc reads as solid-fill + ring, never a bare solid that aliases stale. */
.status-dot-disc.status-dot-live { background: var(--accent-ink); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-ink) 30%, transparent); animation: status-disc-pulse 1.8s ease-in-out infinite; }
.status-dot-disc.status-dot-error { background: var(--flame); box-shadow: 0 0 0 1.5px color-mix(in oklab, var(--flame) 38%, transparent); }
.status-dot-disc.status-dot-connecting { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
/* Stale: a muted ring with a hollow centre — silhouette distinct from live's
filled disc and connecting's amber hollow ring (hue + inset core). */
.status-dot-disc.status-dot-stale { background: transparent; box-shadow: inset 0 0 0 1px var(--stale), inset 0 0 0 3px var(--bg); }
@keyframes status-disc-pulse {
/* First shadow is the persistent resting ring; second is the animated halo —
the ring is always present so the trough never collapses to a bare solid. */
0%, 100% { box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent), 0 0 0 2px color-mix(in oklab, var(--accent) 55%, transparent); }
50% { box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent), 0 0 0 6px color-mix(in oklab, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
/* The base rule already carries the persistent ring; just stop the pulse. */
.status-dot-disc.status-dot-live { animation: none; }
}
/* ----------------------------------------------------------------------------
ConversationList — left-rail "Chats" column.
---------------------------------------------------------------------------- */
.ds-sessions { display: flex; flex-direction: column; min-height: 0; height: 100%; }
/* agentgui's search-results export row sits as a sibling ABOVE ConversationList
(not threaded through any of its props) - the wrapper must replicate the
same flex-column layout .ds-sessions itself uses so ConversationList's own
internal scroll region isn't broken by an extra non-flex ancestor. */
.agentgui-search-rail-wrap { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.agentgui-search-export-row { flex: 0 0 auto; padding: var(--space-2) var(--space-3) 0; }
/* One row: quiet icon new-chat beside the search. The list's new-chat must not
repeat the rail's primary CTA - two identical green buttons on screen at
once read as a layout mistake, and the rail action already owns 'new'. */
.ds-session-head { flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; gap: var(--space-2); padding: var(--space-3); border-bottom: var(--bw-hair) solid var(--bg-3); }
.ds-session-new {
display: inline-flex; align-items: center; justify-content: center; gap: 0;
flex: 0 0 auto; order: 2;
width: 36px; min-height: 36px; padding: 0;
background: transparent; color: var(--fg-2);
border: var(--bw-hair) solid var(--rule);
border-radius: var(--r-1); cursor: pointer; font-family: var(--ff-body);
font-size: var(--fs-sm); font-weight: 500;
}
.ds-session-new > span { display: none; }
.ds-session-new:hover { background: var(--bg-2); color: var(--fg); }
/* Rail filter uses the shared .ds-search-input primitive (provides bg/border/
radius/focus-ring); only the rail layout + touch floor live here. */
.ds-session-head .ds-search-input { order: 1; flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 0 var(--space-2-5); }
.ds-session-new:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
/* Touch floor (must FOLLOW the base rules - same specificity, order decides). */
@media (pointer: coarse) {
.ds-session-new { width: 44px; min-height: 44px; }
.ds-session-head .ds-search-input { min-height: 44px; }
}
.ds-session-list, .ds-session-groups { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-2); }
.ds-session-loadmore {
width: 100%; margin-top: var(--space-1); padding: var(--space-2) var(--space-2-75);
font-size: var(--fs-sm); font-family: inherit; color: var(--fg-3);
background: none; border: var(--bw-hair) dashed var(--rule); border-radius: var(--r-1);
cursor: pointer; text-align: center;
}
.ds-session-loadmore:hover { color: var(--fg); border-color: var(--fg-3); }
.ds-session-loadmore:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
@media (pointer: coarse) { .ds-session-loadmore { min-height: 44px; } }
/* Grouped rows (Today/Yesterday/...) lay out like the flat list; the section
label sticks to the top of the scroll area for Claude-Desktop-style headers. */
.ds-session-group { display: flex; flex-direction: column; }
.ds-session-group-rows { display: flex; flex-direction: column; gap: var(--space-hair); }
.ds-session-group-label { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg-1, var(--bg)); font-size: var(--fs-tiny); font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: var(--tr-label); padding: var(--space-2) var(--space-2) var(--space-1); }
.ds-session-row {
position: relative; display: flex; align-items: center; gap: var(--space-2);
width: 100%; padding: var(--space-2); min-height: 52px; margin-bottom: var(--space-hair);
background: transparent; border: none; border-radius: var(--r-1);
cursor: pointer; text-align: left; color: var(--fg);
}
.ds-session-row:hover { background: var(--bg-2); }
.ds-session-row:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: calc(var(--focus-offset) * -1); }
.ds-session-row.active { background: var(--accent-tint); box-shadow: inset 2px 0 0 var(--accent); }
.ds-session-row.rail-green::before, .ds-session-row.rail-purple::before, .ds-session-row.rail-flame::before {
content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: var(--r-hair);
}
/* Rail tones MUST match .row.rail-* in app-shell.css so the same semantic state
reads as one colour across the conversation list and content rows. */
.ds-session-row.rail-green::before { background: var(--accent-ink); }
.ds-session-row.rail-purple::before { background: var(--purple-2); }
.ds-session-row.rail-flame::before { background: var(--flame); }
.ds-session-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-hair); }
.ds-session-title { font-size: var(--fs-sm); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-session-sub { font-size: var(--fs-tiny); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-session-meta { display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; }
.ds-session-agent { font-size: var(--fs-tiny); color: var(--fg-3); }
/* New-activity cue is a hollow accent RING so it stays shape-distinct from the
running live disc (a solid pulsing accent dot) for colour-blind / reduced-motion users. */
.ds-session-unread { width: 8px; height: 8px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); display: inline-block; flex: none; }
.ds-session-state { padding: var(--space-5) var(--space-3); text-align: center; color: var(--fg-3); font-size: var(--fs-sm); }
.ds-session-state-error { color: var(--flame); }
/* Fork/branch tree nesting — child sessions indent under their parent with a
collapse toggle and a small branch glyph, mirroring pi-web's SessionSidebar
tree without reimplementing its inline-style React component. */
.ds-session-row-nested { position: relative; }
.ds-session-tree-toggle {
flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
width: 16px; height: 16px; padding: 0; background: none; border: none;
color: var(--fg-3); cursor: pointer; transform: rotate(0deg); transition: transform var(--dur-snap) var(--ease);
}
.ds-session-tree-toggle.open { transform: rotate(90deg); }
.ds-session-tree-toggle:hover { color: var(--fg); }
.ds-session-fork-icon { flex: 0 0 auto; display: inline-flex; color: var(--fg-3); }
/* Hover-revealed rename/delete row actions. */
.ds-session-row-actions { flex: 0 0 auto; display: none; align-items: center; gap: var(--space-1); }
.ds-session-row:hover .ds-session-row-actions,
.ds-session-row:focus-within .ds-session-row-actions { display: flex; }
.ds-session-row-action {
display: inline-flex; align-items: center; justify-content: center;
width: 24px; height: 24px; padding: 0; background: var(--bg-2); border: var(--border-w) solid var(--border);
border-radius: var(--r-1); color: var(--fg-3); cursor: pointer;
}
.ds-session-row-action:hover { background: var(--bg-3); color: var(--fg); border-color: var(--fg-3); }
.ds-session-row-action-danger:hover { background: color-mix(in srgb, var(--flame) 12%, var(--bg-2)); color: var(--flame); border-color: var(--flame); }
@media (pointer: coarse) { .ds-session-row-action { min-width: 44px; min-height: 44px; } }
/* Inline rename — the row's title area swaps for a text input at the same
height; no modal, matches the row-in-place edit pattern used elsewhere. */
.ds-session-rename-input {
flex: 1; min-width: 0; font-size: var(--fs-sm); font-family: inherit; color: var(--fg);
background: var(--bg); border: var(--border-w) solid var(--accent); border-radius: var(--r-1);
padding: var(--space-1) var(--space-2);
}
.ds-session-rename-input:focus-visible { outline: none; box-shadow: var(--focus-ring-inset); }
/* Inline delete confirm — same row height, two flat buttons, no modal;
mirrors SessionDashboard's arm-then-confirm bulk-stop control. */
.ds-session-confirm-msg { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-session-confirm-actions { flex: 0 0 auto; display: flex; gap: var(--space-1); }
.ds-session-confirm-delete, .ds-session-confirm-cancel {
font-size: var(--fs-tiny); font-weight: 600; padding: var(--space-1) var(--space-2);
border-radius: var(--r-1); cursor: pointer;
}
.ds-session-confirm-delete { background: var(--flame); border: none; color: var(--bg); }
.ds-session-confirm-delete:hover { filter: brightness(1.1); }
.ds-session-confirm-cancel { background: var(--bg-2); border: var(--border-w) solid var(--border); color: var(--fg-2); }
.ds-session-confirm-cancel:hover { background: var(--bg-3); color: var(--fg); }
@media (pointer: coarse) { .ds-session-confirm-delete, .ds-session-confirm-cancel { min-height: 44px; } }
/* ----------------------------------------------------------------------------
SessionDashboard — grid of live-session cards.
---------------------------------------------------------------------------- */
.ds-dash { display: flex; flex-direction: column; min-height: 0; }
.ds-dash-header { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-3); row-gap: var(--space-2); flex-wrap: wrap; padding: var(--space-3) var(--space-4) 0; }
.ds-dash-count { font-size: var(--fs-sm); color: var(--fg-2); font-weight: 600; }
/* Stop is a quiet destructive control in chrome, not a page-level red CTA;
it only goes loud while ARMED (the one-shot press-again confirm). */
.ds-dash-header .btn, .ds-dash-header .btn-primary {
margin-left: 0;
padding: var(--space-1-5) var(--space-2-75); min-height: 32px; border-radius: var(--r-1); font-weight: 500;
}
.ds-dash-header .btn-primary.danger {
background: transparent; color: var(--warn);
border: var(--bw-hair) solid var(--warn);
}
.ds-dash-header .btn-primary.danger:hover {
background: color-mix(in oklab, var(--warn) 12%, transparent); color: var(--warn);
}
/* --ink, not --paper, on the armed fill: --warn (#FF5A52) is a light-ish red,
so paper-on-warn measures 2.72:1 (below the 4.5:1 floor) while ink-on-warn
measures 6.27:1. This is the same --accent/--accent-ink split the token layer
documents -- a saturated fill needs the dark text tone, not the light one. */
.ds-dash-header .btn-primary.danger.is-armed { background: var(--warn); color: var(--ink); border-color: var(--warn); }
.ds-dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-2); padding: var(--space-3); }
@media (min-width: 1500px) { .ds-dash-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.ds-dash-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); background: var(--bg-2); border: var(--bw-hair) solid var(--bg-3); border-radius: var(--r-1); }
/* Compact density — one line per session. The comfortable card stacks title +
head + meta + actions as four flex rows and measured 208px tall on a real
dashboard, so a 439px viewport showed two sessions at once; a command center
whose job is scanning many sessions cannot afford a third of a screen each.
Compact keeps every fact and drops only the per-card action row (reachable by
opening the session), laying head and meta side by side instead of stacked.
The grid also collapses to a single column: a min-240px card grid beside
one-line rows would put unrelated sessions shoulder to shoulder and destroy
the vertical scan the density exists to create. */
.ds-dash-grid.is-compact { grid-template-columns: 1fr; gap: 0; padding: var(--space-1) var(--space-2); }
/* nowrap, not wrap: with wrapping allowed a long value pushes the next cluster
onto its own line and the row grows. Measured that way -- rows came out 37 /
55 / 75 / 176px instead of one height, the 176px case being a long phase
label that expanded the head to 498px and squeezed meta to 202px so its
contents stacked. Every child now elides instead of wrapping, which is what
keeps a density a density. */
.ds-dash-card.is-compact {
flex-direction: row; align-items: baseline; flex-wrap: nowrap;
gap: var(--space-2); padding: var(--space-1-75) var(--space-2);
background: transparent; border: 0; border-radius: 0;
border-bottom: var(--bw-hair) solid var(--bg-3);
overflow: hidden;
}
/* The head carries status + agent + model; it may shrink and elide rather than
expand past its content and starve the meta cluster. */
.ds-dash-card.is-compact .ds-dash-card-head {
flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap;
}
.ds-dash-card.is-compact .ds-dash-agent,
.ds-dash-card.is-compact .ds-dash-model,
.ds-dash-card.is-compact .ds-dash-status {
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
/* meta takes the remaining width and stays on one line, so a long cwd elides
rather than wrapping the row to two lines and defeating the density. */
.ds-dash-card.is-compact .ds-dash-meta {
flex: 1 1 0; min-width: 0; display: flex; flex-direction: row;
align-items: baseline; gap: var(--space-2); overflow: hidden;
flex-wrap: nowrap; white-space: nowrap;
}
.ds-dash-card.is-compact .ds-dash-stat,
.ds-dash-card.is-compact .ds-dash-activity {
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.ds-dash-card.is-compact .ds-dash-cwd {
min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ds-dash-card.is-compact .ds-dash-activity { flex: 0 0 auto; margin-inline-start: auto; }
/* The selected/active affordances are inset shadows on the comfortable card;
with no border to sit inside, compact carries them as a leading rule. */
.ds-dash-card.is-compact.is-active { box-shadow: inset 2px 0 0 var(--accent); }
.ds-dash-card.is-compact:last-child { border-bottom: 0; }
/* Visual weight follows the status the host already computes -- it does NOT
invent a severity. A dense list where every row paints identically makes the
reader scan all of them; the point of ranking rows is that the eye should
land on the one that needs attention. `error` is reserved by the host for
something genuinely wrong (a blocked gate, an unparseable state, a dispatch
that never completed), `running` for live work, `stale` for idle -- so those
three get three weights and nothing else changes. */
/* Measured baseline before choosing these: .ds-dash-agent is already
font-weight 600 / color --fg, and .ds-dash-cwd is already --fg-3. So the
differentiator cannot BE --fg-3 (that is the default) -- error must rise
above the baseline and idle must fall below it. */
.ds-dash-card.is-compact.is-error { box-shadow: inset 2px 0 0 var(--flame); }
.ds-dash-card.is-compact.is-error .ds-dash-agent { font-weight: 700; color: var(--fg); }
.ds-dash-card.is-compact.is-running .ds-dash-agent { font-weight: 600; color: var(--fg); }
/* Idle recedes by weight and by the tier-2 tone -- NOT by opacity, which would
scale every child including the status word and drop it under the contrast
floor. --fg-2 stays a real text tone. */
.ds-dash-card.is-compact.is-stale .ds-dash-agent { font-weight: 400; color: var(--fg-2); }
.ds-dash-card.is-error { border-color: var(--flame); }
.ds-dash-card-head { display: flex; align-items: center; gap: var(--space-2); }
.ds-dash-status { font-size: var(--fs-tiny); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tr-caps); }
/* running tone unified on --accent (the later is-running rule + the live disc all
use --accent); the dead var(--green) duplicate that lived here was removed. */
.ds-dash-status.is-error { color: var(--flame); }
.ds-dash-agent { font-size: var(--fs-body); font-weight: 600; color: var(--fg); }
.ds-dash-model { font-family: var(--ff-mono); font-size: var(--fs-tiny); color: var(--fg-3); margin-left: auto; }
.ds-dash-meta { display: flex; flex-direction: column; gap: var(--space-hair); }
.ds-dash-cwd { font-family: var(--ff-mono); font-size: var(--fs-tiny); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dash-stat { font-family: var(--ff-mono); font-size: var(--fs-tiny); color: var(--fg-2); }
.ds-dash-stat-cost { color: var(--fg); font-weight: 600; }
.ds-dash-activity { font-size: var(--fs-tiny); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dash-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.ds-dash-state { padding: var(--space-6) var(--space-4); text-align: center; color: var(--fg-3); font-size: var(--fs-body); }
.ds-dash-state-error { color: var(--flame); }
@media (max-width: 640px) {
.ds-dash-grid { grid-template-columns: 1fr; padding: var(--space-3); }
}
/* ----------------------------------------------------------------------------
ContextPane — compact right-hand context panel for the chat surface.
---------------------------------------------------------------------------- */
.ds-context { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); }
.ds-context .panel { background: var(--bg-2); border: var(--bw-hair) solid var(--bg-3); border-radius: var(--r-2); }
.ds-context .row .meta { font-family: var(--ff-mono); font-size: var(--fs-xs); color: var(--fg-2); }
.ds-context .row .sub { font-size: var(--fs-xs); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-context-actions { display: flex; gap: var(--space-2); }
/* Lighter fact groups for secondary context blocks (conversation/last turn/
recent files): a small caps label + Row list with no card chrome, so a
2-row fact doesn't compete visually with the primary bordered panel above
it. Separated from neighbors by a hairline rule, not a border box. */
.ds-context-group { padding-top: var(--space-3); border-top: var(--bw-hair) solid var(--rule); }
.ds-context-group-label {
font-size: var(--fs-tiny); font-weight: 600; color: var(--fg-3);
letter-spacing: var(--tr-caps); text-transform: uppercase;
padding: 0 0 var(--space-2);
}
.ds-context-group .row + .row { margin-top: var(--space-hair); }
/* ----------------------------------------------------------------------------
ContextMeter / ContextTreemap / ContextXRayPanel — token/cost breakdown
surfaces added alongside ContextPane. Tone classes share one small
vocabulary (system/user/assistant/other) across all three components so a
segment's color pairs up wherever it appears.
---------------------------------------------------------------------------- */
.ds-context-meter { display: flex; flex-direction: column; gap: var(--space-1); }
.ds-context-meter-track {
display: flex; width: 100%; height: 8px; border-radius: var(--r-hair);
overflow: hidden; background: var(--bg-3);
}
.ds-context-meter-seg { display: block; height: 100%; }
.ds-context-meter-seg-system { background: var(--sky); }
.ds-context-meter-seg-user { background: var(--green-2); }
.ds-context-meter-seg-assistant { background: var(--purple-2); }
.ds-context-meter-seg-other { background: var(--fg-3); }
.ds-context-meter-foot {
display: flex; justify-content: space-between; font-size: var(--fs-tiny); color: var(--fg-3);
}
.ds-context-treemap { display: block; width: 100%; height: auto; border-radius: var(--r-1); }
.ds-context-treemap-rect { stroke: var(--bg); stroke-width: 1; }
.ds-context-treemap-rect-system { fill: var(--sky); }
.ds-context-treemap-rect-user { fill: var(--green-2); }
.ds-context-treemap-rect-assistant { fill: var(--purple-2); }
.ds-context-treemap-rect-other { fill: var(--fg-3); }
.ds-context-treemap-label { font-size: var(--fs-pico); fill: var(--on-accent); font-family: var(--ff-body); }
.ds-context-treemap-empty { padding: var(--space-3); color: var(--fg-3); font-size: var(--fs-sm); }
.ds-context-xray-head { display: flex; align-items: center; gap: var(--space-1-75); width: 100%; }
.ds-context-xray-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ds-context-xray-dot-system { background: var(--sky); }
.ds-context-xray-dot-user { background: var(--green-2); }
.ds-context-xray-dot-assistant { background: var(--purple-2); }
.ds-context-xray-dot-other { background: var(--fg-3); }
.ds-context-xray-label { flex: 1; }
.ds-context-xray-value { color: var(--fg-3); font-family: var(--ff-mono); font-size: var(--fs-xs); }
.ds-context-xray-body { display: flex; flex-direction: column; gap: var(--space-1); }
.ds-context-xray-row { display: flex; justify-content: space-between; font-size: var(--fs-tiny); color: var(--fg-2); }
.ds-context-xray-empty { padding: var(--space-3); color: var(--fg-3); font-size: var(--fs-sm); }
/* ============================================================================
Cohesion sweep (gui-cohesion.js): one-product polish across surfaces.
============================================================================ */
/* --- A1/A2/E3: per-block code copy. The <pre> is wrapped in .chat-code-block
(position:relative) so the copy button sits top-right and reveals on hover/
focus-within, matching the .chat-msg-actions pattern. The structured CodeNode
head + preview head place the button inline (always visible). --- */
.chat-code-block { position: relative; }
.chat-code-copy {
position: absolute; top: 6px; right: 6px;
display: inline-flex; align-items: center; justify-content: center;
min-width: 48px; min-height: 24px; padding: var(--space-hair) var(--space-2);
border: var(--bw-hair) solid var(--bg-3); border-radius: var(--r-1, 8px);
background: var(--bg-2); color: var(--fg-2); cursor: pointer;
font-family: var(--ff-body); font-size: var(--fs-tiny);
opacity: 0; transition: opacity var(--dur-snap, .12s) var(--ease, ease);
}
.chat-code-block:hover .chat-code-copy, .chat-code-block:focus-within .chat-code-copy { opacity: 1; }
.chat-code-copy.is-copied { color: var(--accent-ink); border-color: var(--accent); }
.chat-code-copy:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; opacity: 1; }
/* Head-placed copy (structured CodeNode + FilePreviewCode) is always visible. */
.chat-code-head .spread { flex: 1; }
.chat-code-copy-head { position: static; opacity: 1; }
/* --- B1: streaming pre shell — monospaced bubble while a fenced block streams,
so it does not reflow prose->block on settle. --- */
.chat-stream-pre pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--ff-mono); font-size: var(--fs-sm); }
/* Persistent minimal chrome so a fenced block does not pop a border + lang tab +
copy button only on settle - the streaming slab already reads as a code block. */
.chat-stream-pre { position: relative; }
.chat-stream-pre pre {
border: var(--bw-hair) solid var(--rule); border-radius: var(--r-1);
padding: var(--space-3); background: color-mix(in oklab, var(--fg) 4%, transparent);
}
/* .cm-composer-wrap / the reply-preview banner now live in
src/css/app-shell/chat-polish.css (the always-loaded app-shell barrel) so
every consumer of either sheet gets one definition instead of two
divergent ones cascading against each other. */
/* --- A5: composer context line (agent / model / cwd at point of typing). --- */
.chat-composer-context {
display: block; width: 100%; text-align: left; padding: var(--space-1) var(--space-3) 0;
background: none; border: none; cursor: default; color: var(--fg-3);
font-family: var(--ff-mono); font-size: var(--fs-tiny);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Below ~480px a single nowrap line silently truncates most of the agent /
model / cwd context (no way to recover it - no title attr on the container,
only on individual bits). Let it wrap instead of clipping. */
@media (max-width: 480px) {
.chat-composer-context { white-space: normal; overflow: visible; text-overflow: clip; }
}
button.chat-composer-context { cursor: pointer; }
button.chat-composer-context:hover { color: var(--fg-2); }
button.chat-composer-context:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: var(--focus-offset); }
/* Composer send/cancel button row: a non-wrapping cluster pinned to the
bottom-right of the flex-end composer (was unstyled, so the send button
could wrap below the textarea instead of anchoring like claude.ai/code). */
.chat-composer-toolbar { display: flex; align-items: center; gap: var(--space-1); flex: 0 0 auto; margin-left: auto; align-self: flex-end; }
/* File-picker input stays in the DOM (so .click() works) but never visible or
in the tab order -- the visible affordance is the paperclip button above it. */
.chat-composer-attach-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* Unify the toolbar cluster on one 32px / --r-1 square metric (the round 40px
ghost buttons + 36px square send read as two button systems; the kit moved
.btn* off --r-pill). chat.css loads after app-shell.css so this wins by order. */
.chat-composer-toolbar .composer-btn,
.chat-composer-toolbar .send { width: 32px; height: 32px; border-radius: var(--r-1); }
@media (pointer: coarse) {
.chat-composer-toolbar .composer-btn,
.chat-composer-toolbar .send { width: 44px; height: 44px; }
}
/* --- B2: follow-up chips below the last settled assistant turn. --- */
.agentchat-followups { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
/* --- C1: stale/idle dashboard status (static, NOT pulsing). --- */
.ds-dash-status.is-stale { color: var(--stale); }
.ds-dash-status.is-running { color: var(--accent-ink); }
/* --- C2: dashboard sort/filter toolbar + stream-state line. --- */
/* The toolbar is part of the ONE header row (count | heartbeat ... filter,
sort, errors-only, stop): compact controls that align on a shared 32px
height, never a stacked full-width form column. */
.ds-dash-toolbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ds-dash-toolbar .ds-search-input {
width: 200px; min-height: 32px; padding: var(--space-1-5) var(--space-2-5);
font-size: var(--fs-sm); border-radius: var(--r-1);
}
.ds-dash-toolbar .ds-select, .ds-dash-toolbar select {
min-height: 32px; padding: var(--space-1) var(--space-2-5); font-size: var(--fs-sm);
width: auto; border-radius: var(--r-1);
}
.ds-dash-stream { font-size: var(--fs-tiny); color: var(--fg-3); }
.ds-dash-stream.is-connected { color: var(--accent-ink); }
.ds-dash-stream.is-lost { color: var(--flame); }
.ds-dash-stream.is-connecting { color: var(--amber); }
.ds-dash-header .spread { flex: 1; }
.ds-dash-errors-toggle {
padding: var(--space-1) var(--space-2-5); min-height: 32px; border: var(--bw-hair) solid var(--bg-3);
border-radius: var(--r-1); background: var(--bg-2); color: var(--fg-2);
cursor: pointer; font-family: var(--ff-body); font-size: var(--fs-tiny);
}
.ds-dash-errors-toggle.active { background: var(--accent-tint); color: var(--fg); border-color: var(--accent); }
.ds-dash-errors-toggle:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; }
/* --- C3: per-card select checkbox. --- */
.ds-dash-select {
display: inline-flex; align-items: center; justify-content: center;
min-width: 24px; min-height: 24px; padding: 0; cursor: pointer;
border: none; background: none; color: var(--fg-3);
font-family: var(--ff-mono); font-size: var(--fs-sm);
}
.ds-dash-select[aria-checked="true"] { color: var(--accent-ink); }
.ds-dash-select:focus-visible { outline: var(--focus-w) solid var(--focus-color); outline-offset: 1px; }
/* --- C5: active dashboard card (current conversation). --- */
.ds-dash-card.is-active { box-shadow: inset 2px 0 0 var(--accent); }
.ds-dash-card.is-selected { background: var(--accent-tint); }
/* Stale/idle card: a positive amber inset bar (mirrors is-active) so a stuck
agent is flagged in a dense grid, not merely faded near-invisibly. The word
'idle' co-carries state, so this stays colour-blind safe. */
.ds-dash-card.is-stale { box-shadow: inset 2px 0 0 var(--stale); }