@webless/agent 0.3.2 → 0.4.1

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.
package/dist/react.css CHANGED
@@ -24,7 +24,7 @@
24
24
  "Segoe UI",
25
25
  sans-serif;
26
26
  --as-font-display: "Space Grotesk", sans-serif;
27
- --as-shadow-rail: 0 0 0 1px rgb(42 51 70 / 0.06), -8px 0 24px -12px rgb(18 4 62 / 0.12);
27
+ --as-shadow-rail: 0 0 0 1px color-mix(in srgb, var(--as-text) 6%, transparent), -8px 0 28px -14px color-mix(in srgb, var(--as-text) 22%, transparent);
28
28
  --as-z-rail: 40;
29
29
  --as-z-mobile: 1000;
30
30
  }
@@ -63,6 +63,7 @@
63
63
  inset: 0;
64
64
  pointer-events: none;
65
65
  z-index: var(--as-z-mobile);
66
+ isolation: isolate;
66
67
  }
67
68
  .webless-agent-root__shell {
68
69
  position: fixed;
@@ -105,26 +106,27 @@
105
106
  pointer-events: none;
106
107
  z-index: 1;
107
108
  }
108
- .webless-agent-root__shell--expanded:not(.webless-agent-root__shell--collapsed) .webless-agent-root__backdrop {
109
+ .webless-agent-root__backdrop {
109
110
  position: fixed;
110
111
  inset: 0;
111
112
  z-index: 0;
112
113
  border: none;
113
114
  padding: 0;
114
115
  margin: 0;
115
- background: rgb(18 4 62 / 0.18);
116
+ background: color-mix(in srgb, var(--as-text) 18%, transparent);
116
117
  cursor: pointer;
117
118
  pointer-events: auto;
118
119
  }
120
+ .webless-agent-root__backdrop--mobile {
121
+ background: color-mix(in srgb, var(--as-text) 24%, transparent);
122
+ -webkit-backdrop-filter: blur(1.5px);
123
+ backdrop-filter: blur(1.5px);
124
+ touch-action: none;
125
+ }
119
126
  .webless-agent-root__shell--expanded:not(.webless-agent-root__shell--collapsed) .agent-rail {
120
127
  pointer-events: auto;
121
- width: 95vw;
122
- min-width: 0;
123
- max-width: none;
124
- height: 95dvh;
125
- max-height: 95dvh;
126
128
  }
127
- .webless-agent-root__rail-slot .agent-rail {
129
+ .webless-agent-root__rail-slot .agent-rail:not(.agent-rail--expanded):not(.agent-rail--mobile-fullscreen) {
128
130
  min-width: 0;
129
131
  width: var(--as-rail-max-width);
130
132
  max-width: none;
@@ -142,9 +144,13 @@
142
144
  height: 100%;
143
145
  transform: none;
144
146
  opacity: 1;
145
- pointer-events: auto;
147
+ pointer-events: none;
146
148
  z-index: calc(var(--as-z-mobile) + 1);
147
149
  }
150
+ .webless-agent-root__rail-slot .agent-rail {
151
+ width: 100%;
152
+ pointer-events: auto;
153
+ }
148
154
  }
149
155
 
150
156
  /* src/react/styles/page-shift.css */
@@ -279,28 +285,31 @@ html.webless-agent-page-shift {
279
285
 
280
286
  /* src/react/components/AgentActivityBubble/AgentActivityBubble.css */
281
287
  .agent-activity-bubble {
282
- align-self: flex-start;
288
+ display: flex;
283
289
  width: 100%;
284
290
  max-width: 100%;
285
- display: flex;
286
291
  flex-direction: column;
292
+ align-self: flex-start;
287
293
  align-items: stretch;
288
- gap: 8px;
294
+ gap: 9px;
289
295
  }
290
296
  .agent-activity-bubble__status {
291
297
  display: flex;
292
298
  align-items: center;
293
- gap: 8px;
299
+ gap: 9px;
294
300
  margin: 0;
295
301
  color: var(--as-text-muted);
296
302
  font-size: 12px;
297
303
  font-weight: 650;
304
+ line-height: 1.4;
298
305
  }
299
306
  .agent-activity-bubble__pulse {
300
- width: 7px;
301
- height: 7px;
307
+ width: 8px;
308
+ height: 8px;
309
+ flex: 0 0 8px;
302
310
  border-radius: 999px;
303
311
  background: var(--as-success);
312
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-success) 10%, transparent);
304
313
  }
305
314
  .agent-activity-bubble__pulse.is-active {
306
315
  background: var(--as-brand);
@@ -309,19 +318,19 @@ html.webless-agent-page-shift {
309
318
  }
310
319
  .agent-activity-bubble__pulse.is-error {
311
320
  background: var(--as-danger);
312
- box-shadow: none;
321
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-danger) 10%, transparent);
313
322
  }
314
323
  .agent-activity-bubble__details {
315
324
  overflow: hidden;
316
325
  border: 1px solid var(--as-border);
317
- border-radius: var(--as-radius-md);
318
- background: color-mix(in srgb, var(--as-surface-muted) 62%, var(--as-surface));
326
+ border-radius: 14px;
327
+ background: color-mix(in srgb, var(--as-surface-muted) 48%, var(--as-surface));
319
328
  }
320
329
  .agent-activity-bubble__details summary {
321
330
  display: flex;
331
+ min-height: 42px;
322
332
  align-items: center;
323
- min-height: 36px;
324
- padding: 0 11px;
333
+ padding: 0 13px;
325
334
  color: var(--as-text-muted);
326
335
  cursor: pointer;
327
336
  font-size: 12px;
@@ -332,11 +341,20 @@ html.webless-agent-page-shift {
332
341
  display: none;
333
342
  }
334
343
  .agent-activity-bubble__details summary::after {
335
- content: "+";
344
+ width: 20px;
345
+ height: 20px;
336
346
  margin-left: auto;
347
+ border-radius: 999px;
337
348
  color: var(--as-text-subtle);
338
- font-size: 16px;
349
+ content: "+";
350
+ font-size: 17px;
339
351
  font-weight: 400;
352
+ line-height: 19px;
353
+ text-align: center;
354
+ }
355
+ .agent-activity-bubble__details summary:hover::after {
356
+ background: var(--as-surface-muted);
357
+ color: var(--as-text);
340
358
  }
341
359
  .agent-activity-bubble__details[open] summary::after {
342
360
  content: "\2212";
@@ -345,68 +363,119 @@ html.webless-agent-page-shift {
345
363
  display: grid;
346
364
  gap: 0;
347
365
  margin: 0;
348
- padding: 0 11px 10px;
366
+ padding: 1px 13px 13px;
349
367
  list-style: none;
350
368
  }
351
369
  .agent-activity-bubble__step {
352
370
  position: relative;
353
371
  display: grid;
354
- grid-template-columns: 20px minmax(0, 1fr);
355
- gap: 8px;
356
- min-height: 36px;
357
- padding: 5px 0;
372
+ min-height: 48px;
373
+ grid-template-columns: 28px minmax(0, 1fr);
374
+ align-items: flex-start;
375
+ gap: 10px;
376
+ padding: 6px 0;
358
377
  }
359
378
  .agent-activity-bubble__step:not(:last-child)::after {
360
379
  position: absolute;
361
- top: 25px;
362
- bottom: -5px;
363
- left: 7px;
380
+ top: 32px;
381
+ bottom: -8px;
382
+ left: 13px;
364
383
  width: 1px;
365
384
  background: var(--as-border);
366
385
  content: "";
367
386
  }
368
387
  .agent-activity-bubble__step-icon {
388
+ position: relative;
389
+ z-index: 1;
369
390
  display: inline-flex;
391
+ width: 28px;
392
+ height: 28px;
370
393
  align-items: center;
371
394
  justify-content: center;
372
- width: 16px;
373
- height: 16px;
374
- margin-top: 2px;
395
+ overflow: hidden;
375
396
  border: 1px solid var(--as-border);
376
- border-radius: 999px;
397
+ border-radius: 9px;
377
398
  background: var(--as-surface);
378
- color: var(--as-success);
379
- font-size: 10px;
380
- font-weight: 800;
399
+ color: var(--as-text-muted);
400
+ font-size: 11px;
401
+ font-weight: 750;
402
+ }
403
+ .agent-activity-bubble__step-icon svg {
404
+ width: 15px;
405
+ height: 15px;
406
+ }
407
+ .agent-activity-bubble__step-icon img {
408
+ position: absolute;
409
+ inset: 0;
410
+ width: 100%;
411
+ height: 100%;
412
+ border-radius: inherit;
413
+ background: var(--as-surface);
414
+ object-fit: contain;
415
+ }
416
+ .agent-activity-bubble__step[data-kind=specialist] .agent-activity-bubble__step-icon {
417
+ border-color: color-mix(in srgb, var(--as-brand) 18%, var(--as-border));
418
+ background: var(--as-brand-soft);
419
+ color: var(--as-brand);
381
420
  }
382
421
  .agent-activity-bubble__step[data-state=active] .agent-activity-bubble__step-icon {
383
- border: 4px solid color-mix(in srgb, var(--as-brand) 18%, var(--as-surface));
384
- background: var(--as-brand);
422
+ border-color: color-mix(in srgb, var(--as-brand) 36%, var(--as-border));
423
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-brand) 8%, transparent);
424
+ }
425
+ .agent-activity-bubble__step[data-state=completed] .agent-activity-bubble__step-icon::after {
426
+ position: absolute;
427
+ right: -2px;
428
+ bottom: -2px;
429
+ display: grid;
430
+ width: 11px;
431
+ height: 11px;
432
+ place-items: center;
433
+ border: 2px solid var(--as-surface);
434
+ border-radius: 999px;
435
+ background: var(--as-success);
436
+ color: #fff;
437
+ content: "\2713";
438
+ font-size: 7px;
439
+ line-height: 1;
385
440
  }
386
441
  .agent-activity-bubble__step[data-state=error] .agent-activity-bubble__step-icon {
387
- border-color: color-mix(in srgb, var(--as-danger) 30%, transparent);
388
- background: color-mix(in srgb, var(--as-danger) 8%, var(--as-surface));
442
+ border-color: color-mix(in srgb, var(--as-danger) 30%, var(--as-border));
443
+ background: color-mix(in srgb, var(--as-danger) 7%, var(--as-surface));
389
444
  color: var(--as-danger);
390
445
  }
391
446
  .agent-activity-bubble__step-copy {
392
447
  display: grid;
393
- gap: 2px;
394
448
  min-width: 0;
449
+ gap: 3px;
450
+ padding-top: 2px;
451
+ }
452
+ .agent-activity-bubble__step-heading {
453
+ display: flex;
454
+ min-width: 0;
455
+ align-items: baseline;
456
+ gap: 7px;
395
457
  }
396
- .agent-activity-bubble__step-copy strong {
458
+ .agent-activity-bubble__step-heading strong {
397
459
  overflow: hidden;
398
460
  color: var(--as-text);
399
461
  font-size: 12px;
400
- font-weight: 650;
462
+ font-weight: 680;
401
463
  line-height: 1.35;
402
464
  text-overflow: ellipsis;
403
465
  white-space: nowrap;
404
466
  }
405
- .agent-activity-bubble__step-copy small {
467
+ .agent-activity-bubble__step-heading small {
468
+ flex: 0 0 auto;
406
469
  color: var(--as-text-subtle);
407
- font-size: 11px;
470
+ font-size: 10px;
471
+ font-weight: 550;
408
472
  line-height: 1.35;
409
473
  }
474
+ .agent-activity-bubble__step-detail {
475
+ color: var(--as-text-subtle);
476
+ font-size: 11px;
477
+ line-height: 1.4;
478
+ }
410
479
  @keyframes agent-activity-pulse {
411
480
  50% {
412
481
  opacity: 0.55;
@@ -425,12 +494,13 @@ html.webless-agent-page-shift {
425
494
  gap: 6px;
426
495
  padding: 6px;
427
496
  border: 1px solid var(--as-border);
428
- border-radius: var(--as-radius-lg);
429
- background: var(--as-surface-muted);
497
+ border-radius: 16px;
498
+ background: var(--as-surface);
499
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--as-text) 5%, transparent);
430
500
  }
431
501
  .composer__field:focus-within {
432
- border-color: rgb(111 22 255 / 0.35);
433
- box-shadow: 0 0 0 3px rgb(111 22 255 / 0.1);
502
+ border-color: color-mix(in srgb, var(--as-brand) 42%, var(--as-border));
503
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-brand) 10%, transparent);
434
504
  }
435
505
  .composer__input {
436
506
  flex: 1;
@@ -438,6 +508,7 @@ html.webless-agent-page-shift {
438
508
  border: none;
439
509
  background: transparent;
440
510
  resize: none;
511
+ field-sizing: content;
441
512
  padding: 8px 6px 8px 8px;
442
513
  font-size: 13px;
443
514
  line-height: 1.45;
@@ -457,7 +528,7 @@ html.webless-agent-page-shift {
457
528
  height: 34px;
458
529
  border-radius: 999px;
459
530
  background: var(--as-brand);
460
- color: #fff;
531
+ color: var(--as-visitor-text);
461
532
  display: grid;
462
533
  place-items: center;
463
534
  cursor: pointer;
@@ -478,14 +549,14 @@ html.webless-agent-page-shift {
478
549
  .composer--dock .composer__field {
479
550
  align-items: center;
480
551
  padding: 5px 5px 5px 13px;
481
- background: var(--as-surface-muted);
552
+ background: var(--as-surface);
482
553
  border: 1px solid var(--as-border);
483
554
  border-radius: 999px;
484
555
  box-shadow: none;
485
556
  }
486
557
  .composer--dock .composer__field:focus-within {
487
- border-color: rgb(111 22 255 / 0.35);
488
- box-shadow: 0 0 0 3px rgb(111 22 255 / 0.1);
558
+ border-color: color-mix(in srgb, var(--as-brand) 42%, var(--as-border));
559
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-brand) 10%, transparent);
489
560
  }
490
561
  .composer--dock .composer__input {
491
562
  padding: 11px 0;
@@ -508,10 +579,11 @@ html.webless-agent-page-shift {
508
579
  gap: 8px;
509
580
  }
510
581
  .followups__label {
511
- font-size: 12px;
512
- font-weight: 700;
582
+ font-size: 11px;
583
+ font-weight: 650;
513
584
  color: var(--as-text-subtle);
514
- letter-spacing: 0.02em;
585
+ letter-spacing: 0.055em;
586
+ text-transform: uppercase;
515
587
  }
516
588
  .followups__list {
517
589
  display: flex;
@@ -524,19 +596,34 @@ html.webless-agent-page-shift {
524
596
  background: var(--as-surface);
525
597
  color: var(--as-text);
526
598
  font-size: 13px;
527
- font-weight: 600;
599
+ position: relative;
600
+ font-weight: 580;
528
601
  line-height: 1.4;
529
602
  text-align: left;
530
- border-radius: var(--as-radius-sm);
531
- padding: 10px 12px;
603
+ border-radius: 12px;
604
+ padding: 11px 34px 11px 12px;
532
605
  cursor: pointer;
533
606
  transition: border-color 0.15s ease, background 0.15s ease;
534
607
  word-break: break-word;
535
608
  }
609
+ .followups__chip::after {
610
+ position: absolute;
611
+ top: 50%;
612
+ right: 13px;
613
+ color: var(--as-text-subtle);
614
+ content: "\2192";
615
+ font-size: 13px;
616
+ transform: translateY(-50%);
617
+ transition: transform 150ms ease, color 150ms ease;
618
+ }
536
619
  .followups__chip:hover:not(:disabled) {
537
- border-color: rgb(111 22 255 / 0.25);
620
+ border-color: color-mix(in srgb, var(--as-brand) 28%, var(--as-border));
538
621
  background: var(--as-brand-soft);
539
622
  }
623
+ .followups__chip:hover:not(:disabled)::after {
624
+ color: var(--as-brand);
625
+ transform: translate(2px, -50%);
626
+ }
540
627
  .followups__chip:disabled {
541
628
  opacity: 0.5;
542
629
  cursor: not-allowed;
@@ -570,13 +657,16 @@ html.webless-agent-page-shift {
570
657
  white-space: nowrap;
571
658
  text-align: left;
572
659
  }
660
+ .followups__chip--dock::after {
661
+ display: none;
662
+ }
573
663
 
574
664
  /* src/react/components/MessageBubble/MessageBubble.css */
575
665
  .message-bubble {
576
666
  display: flex;
577
667
  flex-direction: column;
578
668
  gap: 8px;
579
- max-width: 92%;
669
+ max-width: 86%;
580
670
  }
581
671
  .message-bubble--visitor {
582
672
  align-self: flex-end;
@@ -590,21 +680,23 @@ html.webless-agent-page-shift {
590
680
  .message-bubble__text {
591
681
  margin: 0;
592
682
  padding: 10px 12px;
593
- border-radius: var(--as-radius-md);
594
- font-size: 13px;
595
- line-height: 1.5;
683
+ border-radius: 14px;
684
+ font-size: 14px;
685
+ line-height: 1.55;
596
686
  word-break: break-word;
597
687
  }
598
688
  .message-bubble--visitor .message-bubble__text {
599
689
  background: var(--as-visitor-bubble);
600
690
  color: var(--as-visitor-text);
601
- border-bottom-right-radius: 4px;
691
+ border-bottom-right-radius: 5px;
602
692
  }
603
693
  .message-bubble--agent .message-bubble__text {
604
- background: var(--as-surface-muted);
694
+ width: 100%;
695
+ padding: 0;
696
+ border: none;
697
+ border-radius: 0;
698
+ background: transparent;
605
699
  color: var(--as-text);
606
- border: 1px solid var(--as-border);
607
- border-bottom-left-radius: 4px;
608
700
  }
609
701
  .message-bubble__markdown > :first-child {
610
702
  margin-top: 0;
@@ -637,7 +729,7 @@ html.webless-agent-page-shift {
637
729
  padding: 0;
638
730
  border: 0;
639
731
  background: transparent;
640
- color: inherit;
732
+ color: var(--as-brand);
641
733
  font: inherit;
642
734
  text-decoration: underline;
643
735
  text-underline-offset: 2px;
@@ -656,64 +748,80 @@ html.webless-agent-page-shift {
656
748
  /* src/react/components/AgentRail/AgentRail.css */
657
749
  .agent-rail {
658
750
  --rail-width: var(--as-rail-max-width);
751
+ position: relative;
752
+ z-index: var(--as-z-rail);
659
753
  display: flex;
660
- flex-direction: column;
661
754
  width: var(--rail-width);
662
- max-width: var(--rail-width);
663
755
  min-width: var(--rail-width);
756
+ max-width: var(--rail-width);
664
757
  height: 100%;
665
758
  max-height: 100dvh;
759
+ flex-direction: column;
666
760
  overflow: hidden;
667
- background: var(--as-surface);
668
761
  border-left: 1px solid var(--as-border);
762
+ background: var(--as-surface);
669
763
  box-shadow: var(--as-shadow-rail);
670
764
  color: var(--as-text);
671
765
  font-family: var(--as-font-body);
672
- position: relative;
673
- z-index: var(--as-z-rail);
766
+ }
767
+ .agent-rail:focus {
768
+ outline: none;
674
769
  }
675
770
  .agent-rail__header {
771
+ position: relative;
772
+ z-index: 1;
676
773
  flex-shrink: 0;
677
- display: flex;
678
- flex-direction: column;
679
- gap: 10px;
680
- padding: 14px;
774
+ padding: 12px 14px;
775
+ border-bottom: 1px solid var(--as-border);
776
+ background: color-mix(in srgb, var(--as-surface) 96%, var(--as-surface-muted));
681
777
  }
682
778
  .agent-rail__brand-row {
683
779
  display: grid;
684
- grid-template-columns: 32px 1fr 32px;
685
- align-items: center;
686
- min-height: 32px;
687
780
  min-width: 0;
781
+ min-height: 36px;
782
+ grid-template-columns: 36px minmax(0, 1fr) auto;
783
+ align-items: center;
784
+ gap: 8px;
688
785
  }
689
786
  .agent-rail__identity {
690
787
  grid-column: 2;
691
- grid-row: 1;
692
788
  display: flex;
789
+ min-width: 0;
693
790
  align-items: center;
694
791
  justify-content: center;
695
792
  gap: 8px;
696
- min-width: 0;
697
793
  }
698
794
  .agent-rail__brand-label {
699
795
  overflow: hidden;
700
796
  font-family: var(--as-font-display);
701
797
  font-size: 14px;
702
- font-weight: 600;
703
- letter-spacing: -0.01em;
704
- line-height: 1;
798
+ font-weight: 650;
799
+ letter-spacing: -0.015em;
800
+ line-height: 1.2;
705
801
  text-align: center;
706
802
  text-overflow: ellipsis;
707
803
  white-space: nowrap;
708
804
  }
709
- .agent-rail__brand-mark {
805
+ .agent-rail__brand-mark,
806
+ .agent-rail__welcome-mark {
710
807
  position: relative;
711
- width: 24px;
712
- height: 24px;
713
- flex: 0 0 24px;
808
+ display: inline-flex;
809
+ align-items: center;
810
+ justify-content: center;
811
+ flex-shrink: 0;
812
+ background: var(--as-brand);
813
+ color: var(--as-visitor-text);
814
+ font-weight: 750;
815
+ }
816
+ .agent-rail__brand-mark {
817
+ width: 25px;
818
+ height: 25px;
819
+ flex-basis: 25px;
714
820
  border-radius: 8px;
821
+ font-size: 11px;
715
822
  }
716
- .agent-rail__brand-logo {
823
+ .agent-rail__brand-logo,
824
+ .agent-rail__welcome-logo {
717
825
  position: absolute;
718
826
  inset: 0;
719
827
  width: 100%;
@@ -722,242 +830,344 @@ html.webless-agent-page-shift {
722
830
  background: var(--as-surface);
723
831
  object-fit: contain;
724
832
  }
725
- .agent-rail__brand-mark {
726
- display: inline-flex;
727
- align-items: center;
728
- justify-content: center;
729
- background: var(--as-brand);
730
- color: var(--as-visitor-text);
731
- font-size: 11px;
732
- font-weight: 750;
733
- }
734
833
  .agent-rail__brand-spacer {
735
- width: 32px;
736
- height: 32px;
834
+ width: 36px;
835
+ height: 36px;
836
+ }
837
+ .agent-rail__actions {
838
+ grid-column: 3;
839
+ display: flex;
840
+ align-items: center;
841
+ justify-content: flex-end;
842
+ gap: 2px;
737
843
  }
738
844
  .agent-rail__collapse,
739
845
  .agent-rail__close,
846
+ .agent-rail__new-chat,
740
847
  .agent-rail__expand {
741
848
  appearance: none;
742
- border: none;
743
- background: transparent;
744
- color: var(--as-text-subtle);
745
- width: 32px;
746
- height: 32px;
747
- margin: 0;
748
- padding: 0;
749
- border-radius: 8px;
750
849
  display: inline-flex;
850
+ width: 36px;
851
+ height: 36px;
852
+ flex-shrink: 0;
751
853
  align-items: center;
752
854
  justify-content: center;
855
+ margin: 0;
856
+ padding: 0;
857
+ border: none;
858
+ border-radius: 10px;
859
+ background: transparent;
860
+ color: var(--as-text-muted);
753
861
  cursor: pointer;
754
- flex-shrink: 0;
755
- grid-row: 1;
862
+ transition:
863
+ background 150ms ease,
864
+ color 150ms ease,
865
+ opacity 150ms ease;
756
866
  }
757
867
  .agent-rail__collapse,
758
868
  .agent-rail__close {
759
869
  grid-column: 1;
760
870
  justify-self: start;
761
871
  }
762
- .agent-rail__expand {
763
- grid-column: 3;
764
- justify-self: end;
765
- }
766
872
  .agent-rail__collapse:hover,
767
873
  .agent-rail__close:hover,
874
+ .agent-rail__new-chat:hover:not(:disabled),
768
875
  .agent-rail__expand:hover {
769
876
  background: var(--as-surface-muted);
770
877
  color: var(--as-text);
771
878
  }
879
+ .agent-rail__collapse:focus-visible,
880
+ .agent-rail__close:focus-visible,
881
+ .agent-rail__new-chat:focus-visible,
882
+ .agent-rail__expand:focus-visible {
883
+ outline: 2px solid var(--as-brand);
884
+ outline-offset: 1px;
885
+ }
886
+ .agent-rail__new-chat:disabled {
887
+ opacity: 0.32;
888
+ cursor: default;
889
+ }
772
890
  .agent-rail__collapse svg,
773
891
  .agent-rail__close svg,
892
+ .agent-rail__new-chat svg,
774
893
  .agent-rail__expand svg {
775
- width: 16px;
776
- height: 16px;
894
+ width: 17px;
895
+ height: 17px;
777
896
  }
778
897
  .agent-rail__transcript {
779
- flex: 1 1 auto;
780
898
  min-height: 0;
781
- overflow-y: auto;
899
+ flex: 1 1 auto;
782
900
  overflow-x: hidden;
901
+ overflow-y: auto;
783
902
  overscroll-behavior: contain;
784
- padding: 14px 12px;
785
- display: flex;
786
- flex-direction: column;
787
- gap: 14px;
903
+ background: var(--as-surface);
788
904
  scroll-behavior: smooth;
905
+ scrollbar-color: color-mix(in srgb, var(--as-text) 18%, transparent) transparent;
906
+ scrollbar-width: thin;
789
907
  -webkit-overflow-scrolling: touch;
790
908
  }
909
+ .agent-rail__thread {
910
+ display: flex;
911
+ width: 100%;
912
+ min-height: 100%;
913
+ flex-direction: column;
914
+ gap: 16px;
915
+ margin: 0 auto;
916
+ padding: 20px 16px 26px;
917
+ }
918
+ .agent-rail__welcome {
919
+ display: flex;
920
+ min-height: 100%;
921
+ flex: 1 0 auto;
922
+ flex-direction: column;
923
+ justify-content: center;
924
+ gap: 22px;
925
+ padding: 28px 2px 18px;
926
+ }
927
+ .agent-rail__welcome-mark {
928
+ width: 42px;
929
+ height: 42px;
930
+ border-radius: 13px;
931
+ box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--as-brand) 70%, transparent);
932
+ font-size: 16px;
933
+ }
934
+ .agent-rail__welcome-copy {
935
+ display: grid;
936
+ gap: 9px;
937
+ }
938
+ .agent-rail__welcome-copy h2 {
939
+ margin: 0;
940
+ color: var(--as-text);
941
+ font-family: var(--as-font-display);
942
+ font-size: clamp(21px, 3vw, 25px);
943
+ font-weight: 650;
944
+ letter-spacing: -0.035em;
945
+ line-height: 1.15;
946
+ }
947
+ .agent-rail__welcome-copy p {
948
+ max-width: 42ch;
949
+ margin: 0;
950
+ color: var(--as-text-muted);
951
+ font-size: 13px;
952
+ line-height: 1.55;
953
+ }
791
954
  .agent-rail__timeline-slot,
792
955
  .agent-rail__followups-slot {
793
956
  flex-shrink: 0;
794
957
  }
958
+ .agent-rail__error {
959
+ display: flex;
960
+ align-items: center;
961
+ justify-content: space-between;
962
+ gap: 12px;
963
+ padding: 12px;
964
+ border: 1px solid color-mix(in srgb, var(--as-danger) 24%, var(--as-border));
965
+ border-radius: var(--as-radius-md);
966
+ background: color-mix(in srgb, var(--as-danger) 6%, var(--as-surface));
967
+ color: var(--as-text);
968
+ }
969
+ .agent-rail__error div {
970
+ display: grid;
971
+ gap: 3px;
972
+ min-width: 0;
973
+ }
974
+ .agent-rail__error strong {
975
+ font-size: 12px;
976
+ font-weight: 700;
977
+ }
978
+ .agent-rail__error p {
979
+ margin: 0;
980
+ color: var(--as-text-muted);
981
+ font-size: 12px;
982
+ line-height: 1.4;
983
+ }
984
+ .agent-rail__error button {
985
+ appearance: none;
986
+ flex: 0 0 auto;
987
+ padding: 7px 10px;
988
+ border: 1px solid color-mix(in srgb, var(--as-brand) 26%, var(--as-border));
989
+ border-radius: 999px;
990
+ background: var(--as-surface);
991
+ color: var(--as-text);
992
+ cursor: pointer;
993
+ font-size: 12px;
994
+ font-weight: 650;
995
+ }
996
+ .agent-rail__error button:hover {
997
+ background: var(--as-brand-soft);
998
+ }
999
+ .agent-rail__error button:focus-visible {
1000
+ outline: 2px solid var(--as-brand);
1001
+ outline-offset: 2px;
1002
+ }
795
1003
  .agent-rail__composer-wrap {
1004
+ position: relative;
1005
+ z-index: 1;
796
1006
  flex-shrink: 0;
797
- padding: 12px 12px 14px;
1007
+ padding: 12px 14px 13px;
798
1008
  border-top: 1px solid var(--as-border);
799
- background: var(--as-surface);
1009
+ background: color-mix(in srgb, var(--as-surface) 96%, var(--as-surface-muted));
800
1010
  }
801
1011
  .agent-rail__footer {
802
- margin-top: 8px;
803
- display: flex;
804
- flex-direction: column;
805
- gap: 4px;
1012
+ margin-top: 7px;
806
1013
  }
807
- .agent-rail__footer-disclaimer {
1014
+ .agent-rail__footer p {
808
1015
  margin: 0;
809
- text-align: center;
810
- font-size: 11px;
811
1016
  color: var(--as-text-subtle);
1017
+ font-size: 10.5px;
812
1018
  line-height: 1.35;
813
- }
814
- .agent-rail__footer-note {
815
- margin: 0;
816
1019
  text-align: center;
817
- font-size: 11px;
818
- color: var(--as-text-subtle);
819
- line-height: 1.35;
820
- }
821
- .agent-rail--mobile-fullscreen {
822
- position: fixed;
823
- inset: 0;
824
- width: 100%;
825
- max-width: none;
826
- min-width: 0;
827
- height: 100dvh;
828
- max-height: 100dvh;
829
- overflow: hidden;
830
- z-index: var(--as-z-mobile);
831
- border-left: none;
832
- box-shadow: none;
833
1020
  }
834
1021
  .agent-rail--expanded {
835
1022
  position: fixed;
836
1023
  top: 50%;
837
1024
  left: 50%;
838
- width: 95vw;
839
- height: 95dvh;
840
- max-width: none;
1025
+ z-index: calc(var(--as-z-mobile) + 1);
1026
+ width: min(960px, calc(100vw - 48px));
841
1027
  min-width: 0;
842
- max-height: 95dvh;
1028
+ max-width: 960px;
1029
+ height: min(860px, calc(100dvh - 48px));
1030
+ max-height: calc(100dvh - 48px);
1031
+ overflow: hidden;
843
1032
  transform: translate(-50%, -50%);
844
- z-index: calc(var(--as-z-mobile) + 1);
845
- background: var(--as-surface);
846
1033
  border: 1px solid var(--as-border);
847
- border-radius: var(--as-radius-lg);
848
- box-shadow: 0 0 0 1px rgb(42 51 70 / 0.04), 0 28px 80px -24px rgb(18 4 62 / 0.35);
1034
+ border-radius: 22px;
1035
+ background: var(--as-surface);
1036
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--as-text) 8%, transparent), 0 32px 90px -30px color-mix(in srgb, var(--as-text) 46%, transparent);
849
1037
  transition:
850
1038
  width 320ms cubic-bezier(0.22, 1, 0.36, 1),
851
1039
  height 320ms cubic-bezier(0.22, 1, 0.36, 1),
852
1040
  transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
853
1041
  border-radius 320ms cubic-bezier(0.22, 1, 0.36, 1),
854
1042
  box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1);
855
- overflow: hidden;
856
1043
  }
857
- .agent-rail--expanded .agent-rail__header,
858
- .agent-rail--expanded .agent-rail__transcript,
859
- .agent-rail--expanded .agent-rail__dock-wrap {
860
- background: var(--as-surface);
1044
+ .agent-rail--expanded .agent-rail__thread {
1045
+ max-width: 760px;
1046
+ padding: 28px 24px 36px;
861
1047
  }
862
- .agent-rail--expanded .agent-rail__transcript {
863
- padding: 20px 24px 25px;
864
- align-items: center;
1048
+ .agent-rail--expanded .agent-rail__welcome {
1049
+ width: 100%;
1050
+ max-width: 680px;
1051
+ margin: 0 auto;
865
1052
  }
866
- .agent-rail--expanded .agent-rail__transcript .message-bubble {
867
- width: 85%;
868
- max-width: 85%;
1053
+ .agent-rail--expanded .agent-rail__composer-wrap {
1054
+ padding: 16px 24px 18px;
869
1055
  }
870
- .agent-rail--expanded .agent-rail__transcript .message-bubble__text {
871
- font-size: 16px;
872
- padding: 12px 14px;
1056
+ .agent-rail--expanded .agent-rail__composer-wrap > .composer,
1057
+ .agent-rail--expanded .agent-rail__footer {
1058
+ width: min(712px, 100%);
1059
+ margin-right: auto;
1060
+ margin-left: auto;
873
1061
  }
874
- .agent-rail--expanded .agent-rail__transcript .tool-timeline__streaming-text {
875
- font-size: 16px;
876
- padding: 12px 14px;
1062
+ .agent-rail--expanded .agent-rail__footer {
1063
+ margin-top: 8px;
877
1064
  }
878
- .agent-rail--expanded .agent-rail__transcript .message-bubble--visitor {
879
- align-self: center;
880
- align-items: flex-end;
1065
+ .agent-rail--mobile-fullscreen {
1066
+ position: fixed;
1067
+ inset: auto 0 0;
1068
+ z-index: calc(var(--as-z-mobile) + 1);
1069
+ width: 100%;
1070
+ min-width: 0;
1071
+ max-width: none;
1072
+ height: min(78dvh, 720px);
1073
+ min-height: min(520px, calc(100dvh - 12px));
1074
+ max-height: calc(100dvh - 8px);
1075
+ overflow: hidden;
1076
+ border: 1px solid var(--as-border);
1077
+ border-bottom: none;
1078
+ border-radius: 22px 22px 0 0;
1079
+ background: var(--as-surface);
1080
+ box-shadow: 0 -24px 72px -28px color-mix(in srgb, var(--as-text) 42%, transparent);
881
1081
  }
882
- .agent-rail--expanded .agent-rail__transcript .message-bubble--agent {
883
- align-self: center;
884
- align-items: flex-start;
1082
+ .agent-rail--mobile-fullscreen .agent-rail__header {
1083
+ padding-top: 16px;
885
1084
  }
886
- .agent-rail--expanded .agent-rail__transcript .agent-activity-bubble,
887
- .agent-rail--expanded .agent-rail__transcript [role=alert] {
888
- align-self: center;
889
- align-items: flex-start;
890
- width: 85%;
891
- max-width: 85%;
1085
+ .agent-rail--mobile-fullscreen .agent-rail__brand-row {
1086
+ grid-template-columns: minmax(0, 1fr) auto 40px;
892
1087
  }
893
- .agent-rail--expanded .agent-rail__dock-wrap {
894
- flex-shrink: 0;
895
- width: 70%;
896
- max-width: 70%;
897
- align-self: center;
898
- padding: 18px 0 24px;
899
- display: flex;
900
- flex-direction: column;
901
- align-items: flex-start;
902
- gap: 10px;
1088
+ .agent-rail--mobile-fullscreen .agent-rail__identity {
1089
+ grid-column: 1;
1090
+ justify-content: flex-start;
903
1091
  }
904
- .agent-rail--expanded .agent-rail__dock-followups {
905
- width: 100%;
1092
+ .agent-rail--mobile-fullscreen .agent-rail__actions {
1093
+ grid-column: 2;
906
1094
  }
907
- .agent-rail--expanded .agent-rail__dock-followups .followups__scroll {
908
- justify-content: flex-start;
1095
+ .agent-rail--mobile-fullscreen .agent-rail__close {
1096
+ grid-column: 3;
1097
+ grid-row: 1;
1098
+ justify-self: end;
909
1099
  }
910
- .agent-rail--expanded .agent-rail__dock {
911
- display: flex;
912
- flex-direction: column;
913
- gap: 10px;
914
- width: 100%;
915
- padding: 12px;
916
- border: 1px solid var(--as-border);
917
- border-radius: calc(var(--as-radius-lg) + 4px);
918
- background: var(--as-surface);
1100
+ .agent-rail--mobile-fullscreen .agent-rail__close,
1101
+ .agent-rail--mobile-fullscreen .agent-rail__new-chat {
1102
+ width: 40px;
1103
+ height: 40px;
919
1104
  }
920
- .agent-rail--expanded .agent-rail__footer {
921
- margin-top: 0;
922
- width: 100%;
1105
+ .agent-rail--mobile-fullscreen .agent-rail__header::before {
1106
+ position: absolute;
1107
+ top: 7px;
1108
+ left: 50%;
1109
+ width: 34px;
1110
+ height: 4px;
1111
+ border-radius: 999px;
1112
+ background: color-mix(in srgb, var(--as-text) 16%, transparent);
1113
+ content: "";
1114
+ transform: translateX(-50%);
1115
+ }
1116
+ .agent-rail--mobile-fullscreen .agent-rail__thread {
1117
+ padding: 20px 16px 24px;
1118
+ }
1119
+ .agent-rail--mobile-fullscreen .agent-rail__welcome {
1120
+ padding-top: 20px;
1121
+ padding-bottom: 12px;
1122
+ }
1123
+ .agent-rail--mobile-fullscreen .agent-rail__composer-wrap {
1124
+ padding: 11px 12px max(12px, env(safe-area-inset-bottom));
923
1125
  }
924
1126
  .agent-rail--mobile-fullscreen .agent-rail__close {
925
- display: grid;
1127
+ display: inline-flex;
926
1128
  }
927
1129
  .agent-rail--mobile-fullscreen .agent-rail__collapse {
928
1130
  display: none;
929
1131
  }
930
- @media (prefers-reduced-motion: reduce) {
931
- .agent-rail--expanded {
932
- transition: none;
933
- }
934
- }
935
1132
  @media (max-width: 767px) {
936
- .agent-rail {
937
- position: fixed;
938
- inset: 0;
1133
+ .agent-rail:not(.agent-rail--mobile-fullscreen) {
939
1134
  width: 100%;
940
- max-width: none;
941
1135
  min-width: 0;
942
- height: 100dvh;
943
- max-height: 100dvh;
944
- overflow: hidden;
945
- z-index: var(--as-z-mobile);
946
- border-left: none;
947
- box-shadow: none;
1136
+ max-width: none;
948
1137
  }
949
1138
  .agent-rail .agent-rail__close {
950
- display: grid;
1139
+ display: inline-flex;
951
1140
  }
952
- .agent-rail .agent-rail__collapse {
1141
+ .agent-rail .agent-rail__collapse,
1142
+ .agent-rail .agent-rail__expand {
953
1143
  display: none;
954
1144
  }
1145
+ .agent-rail__welcome-copy h2 {
1146
+ font-size: 23px;
1147
+ }
1148
+ .agent-rail__error {
1149
+ align-items: flex-start;
1150
+ flex-direction: column;
1151
+ }
1152
+ }
1153
+ @media (max-width: 767px) and (max-height: 620px) {
1154
+ .agent-rail--mobile-fullscreen {
1155
+ height: calc(100dvh - 8px);
1156
+ }
1157
+ .agent-rail--mobile-fullscreen .agent-rail__welcome {
1158
+ justify-content: flex-start;
1159
+ }
955
1160
  }
956
1161
  @media (min-width: 768px) {
957
1162
  .agent-rail .agent-rail__close {
958
1163
  display: none !important;
959
1164
  }
960
1165
  }
1166
+ @media (prefers-reduced-motion: reduce) {
1167
+ .agent-rail--expanded {
1168
+ transition: none;
1169
+ }
1170
+ }
961
1171
 
962
1172
  /* src/react/components/AssistEdgeTab/AssistEdgeTab.css */
963
1173
  .assist-edge-tab {
@@ -983,7 +1193,7 @@ html.webless-agent-page-shift {
983
1193
  cursor: pointer;
984
1194
  opacity: 0;
985
1195
  pointer-events: none;
986
- box-shadow: -6px 0 20px -12px rgb(18 4 62 / 0.28);
1196
+ box-shadow: -6px 0 20px -12px color-mix(in srgb, var(--as-text) 28%, transparent);
987
1197
  transition:
988
1198
  transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
989
1199
  opacity 240ms ease,
@@ -1140,7 +1350,7 @@ html.webless-agent-page-shift {
1140
1350
  --tab-fill: var(--as-brand);
1141
1351
  --tab-ink: #fff;
1142
1352
  --tab-line: transparent;
1143
- box-shadow: -8px 0 22px -10px rgb(111 22 255 / 0.55);
1353
+ box-shadow: -8px 0 22px -10px color-mix(in srgb, var(--as-brand) 55%, transparent);
1144
1354
  }
1145
1355
  .assist-edge-tab--fill.assist-edge-tab--right,
1146
1356
  .assist-edge-tab--fill.assist-edge-tab--left {
@@ -1172,6 +1382,59 @@ html.webless-agent-page-shift {
1172
1382
  min-height: 148px;
1173
1383
  width: 36px;
1174
1384
  }
1385
+ .assist-edge-tab--mobile,
1386
+ .assist-edge-tab--mobile.assist-edge-tab--right,
1387
+ .assist-edge-tab--mobile.assist-edge-tab--left,
1388
+ .assist-edge-tab--mobile.assist-edge-tab--top,
1389
+ .assist-edge-tab--mobile.assist-edge-tab--bottom {
1390
+ top: auto;
1391
+ right: max(14px, env(safe-area-inset-right));
1392
+ bottom: max(14px, env(safe-area-inset-bottom));
1393
+ left: auto;
1394
+ width: auto;
1395
+ min-width: 0;
1396
+ max-width: min(220px, calc(100vw - 28px));
1397
+ height: 48px;
1398
+ min-height: 48px;
1399
+ padding: 0 17px 0 13px;
1400
+ flex-direction: row;
1401
+ justify-content: center;
1402
+ gap: 9px;
1403
+ border: 1px solid color-mix(in srgb, var(--as-brand) 18%, var(--as-border));
1404
+ border-radius: 999px;
1405
+ background: var(--as-surface);
1406
+ color: var(--as-text);
1407
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--as-text) 8%, transparent), 0 12px 32px -12px color-mix(in srgb, var(--as-text) 32%, transparent);
1408
+ transform: translateY(calc(100% + 24px));
1409
+ }
1410
+ .assist-edge-tab--mobile.is-visible,
1411
+ .assist-edge-tab--mobile.is-visible:hover {
1412
+ transform: translateY(0);
1413
+ }
1414
+ .assist-edge-tab--mobile.is-visible:hover {
1415
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--as-text) 8%, transparent), 0 14px 36px -12px color-mix(in srgb, var(--as-text) 38%, transparent);
1416
+ }
1417
+ .assist-edge-tab--mobile .assist-edge-tab__mark {
1418
+ width: 22px;
1419
+ height: 22px;
1420
+ flex-basis: 22px;
1421
+ border-radius: 7px;
1422
+ background: var(--as-brand);
1423
+ color: var(--as-visitor-text);
1424
+ font-size: 10px;
1425
+ font-weight: 750;
1426
+ }
1427
+ .assist-edge-tab--mobile .assist-edge-tab__label {
1428
+ min-width: 0;
1429
+ overflow: hidden;
1430
+ color: var(--as-text);
1431
+ font-size: 14px;
1432
+ letter-spacing: -0.01em;
1433
+ text-overflow: ellipsis;
1434
+ white-space: nowrap;
1435
+ writing-mode: initial;
1436
+ transform: none;
1437
+ }
1175
1438
  }
1176
1439
  @media (prefers-reduced-motion: reduce) {
1177
1440
  .assist-edge-tab,