@webless/agent 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,24 +106,25 @@
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
129
  .webless-agent-root__rail-slot .agent-rail {
128
130
  min-width: 0;
@@ -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,45 +285,52 @@ 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);
307
316
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--as-brand) 12%, transparent);
308
317
  animation: agent-activity-pulse 1.8s ease-in-out infinite;
309
318
  }
319
+ .agent-activity-bubble__pulse.is-error {
320
+ background: var(--as-danger);
321
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--as-danger) 10%, transparent);
322
+ }
310
323
  .agent-activity-bubble__details {
311
324
  overflow: hidden;
312
325
  border: 1px solid var(--as-border);
313
- border-radius: var(--as-radius-md);
314
- 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));
315
328
  }
316
329
  .agent-activity-bubble__details summary {
317
330
  display: flex;
331
+ min-height: 42px;
318
332
  align-items: center;
319
- min-height: 36px;
320
- padding: 0 11px;
333
+ padding: 0 13px;
321
334
  color: var(--as-text-muted);
322
335
  cursor: pointer;
323
336
  font-size: 12px;
@@ -328,11 +341,20 @@ html.webless-agent-page-shift {
328
341
  display: none;
329
342
  }
330
343
  .agent-activity-bubble__details summary::after {
331
- content: "+";
344
+ width: 20px;
345
+ height: 20px;
332
346
  margin-left: auto;
347
+ border-radius: 999px;
333
348
  color: var(--as-text-subtle);
334
- font-size: 16px;
349
+ content: "+";
350
+ font-size: 17px;
335
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);
336
358
  }
337
359
  .agent-activity-bubble__details[open] summary::after {
338
360
  content: "\2212";
@@ -341,68 +363,119 @@ html.webless-agent-page-shift {
341
363
  display: grid;
342
364
  gap: 0;
343
365
  margin: 0;
344
- padding: 0 11px 10px;
366
+ padding: 1px 13px 13px;
345
367
  list-style: none;
346
368
  }
347
369
  .agent-activity-bubble__step {
348
370
  position: relative;
349
371
  display: grid;
350
- grid-template-columns: 20px minmax(0, 1fr);
351
- gap: 8px;
352
- min-height: 36px;
353
- 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;
354
377
  }
355
378
  .agent-activity-bubble__step:not(:last-child)::after {
356
379
  position: absolute;
357
- top: 25px;
358
- bottom: -5px;
359
- left: 7px;
380
+ top: 32px;
381
+ bottom: -8px;
382
+ left: 13px;
360
383
  width: 1px;
361
384
  background: var(--as-border);
362
385
  content: "";
363
386
  }
364
387
  .agent-activity-bubble__step-icon {
388
+ position: relative;
389
+ z-index: 1;
365
390
  display: inline-flex;
391
+ width: 28px;
392
+ height: 28px;
366
393
  align-items: center;
367
394
  justify-content: center;
368
- width: 16px;
369
- height: 16px;
370
- margin-top: 2px;
395
+ overflow: hidden;
371
396
  border: 1px solid var(--as-border);
372
- border-radius: 999px;
397
+ border-radius: 9px;
373
398
  background: var(--as-surface);
374
- color: var(--as-success);
375
- font-size: 10px;
376
- 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);
377
420
  }
378
421
  .agent-activity-bubble__step[data-state=active] .agent-activity-bubble__step-icon {
379
- border: 4px solid color-mix(in srgb, var(--as-brand) 18%, var(--as-surface));
380
- 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;
381
440
  }
382
441
  .agent-activity-bubble__step[data-state=error] .agent-activity-bubble__step-icon {
383
- border-color: color-mix(in srgb, var(--as-danger) 30%, transparent);
384
- 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));
385
444
  color: var(--as-danger);
386
445
  }
387
446
  .agent-activity-bubble__step-copy {
388
447
  display: grid;
389
- gap: 2px;
390
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;
391
457
  }
392
- .agent-activity-bubble__step-copy strong {
458
+ .agent-activity-bubble__step-heading strong {
393
459
  overflow: hidden;
394
460
  color: var(--as-text);
395
461
  font-size: 12px;
396
- font-weight: 650;
462
+ font-weight: 680;
397
463
  line-height: 1.35;
398
464
  text-overflow: ellipsis;
399
465
  white-space: nowrap;
400
466
  }
401
- .agent-activity-bubble__step-copy small {
467
+ .agent-activity-bubble__step-heading small {
468
+ flex: 0 0 auto;
402
469
  color: var(--as-text-subtle);
403
- font-size: 11px;
470
+ font-size: 10px;
471
+ font-weight: 550;
404
472
  line-height: 1.35;
405
473
  }
474
+ .agent-activity-bubble__step-detail {
475
+ color: var(--as-text-subtle);
476
+ font-size: 11px;
477
+ line-height: 1.4;
478
+ }
406
479
  @keyframes agent-activity-pulse {
407
480
  50% {
408
481
  opacity: 0.55;
@@ -421,12 +494,13 @@ html.webless-agent-page-shift {
421
494
  gap: 6px;
422
495
  padding: 6px;
423
496
  border: 1px solid var(--as-border);
424
- border-radius: var(--as-radius-lg);
425
- 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);
426
500
  }
427
501
  .composer__field:focus-within {
428
- border-color: rgb(111 22 255 / 0.35);
429
- 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);
430
504
  }
431
505
  .composer__input {
432
506
  flex: 1;
@@ -434,6 +508,7 @@ html.webless-agent-page-shift {
434
508
  border: none;
435
509
  background: transparent;
436
510
  resize: none;
511
+ field-sizing: content;
437
512
  padding: 8px 6px 8px 8px;
438
513
  font-size: 13px;
439
514
  line-height: 1.45;
@@ -453,7 +528,7 @@ html.webless-agent-page-shift {
453
528
  height: 34px;
454
529
  border-radius: 999px;
455
530
  background: var(--as-brand);
456
- color: #fff;
531
+ color: var(--as-visitor-text);
457
532
  display: grid;
458
533
  place-items: center;
459
534
  cursor: pointer;
@@ -474,14 +549,14 @@ html.webless-agent-page-shift {
474
549
  .composer--dock .composer__field {
475
550
  align-items: center;
476
551
  padding: 5px 5px 5px 13px;
477
- background: var(--as-surface-muted);
552
+ background: var(--as-surface);
478
553
  border: 1px solid var(--as-border);
479
554
  border-radius: 999px;
480
555
  box-shadow: none;
481
556
  }
482
557
  .composer--dock .composer__field:focus-within {
483
- border-color: rgb(111 22 255 / 0.35);
484
- 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);
485
560
  }
486
561
  .composer--dock .composer__input {
487
562
  padding: 11px 0;
@@ -504,10 +579,11 @@ html.webless-agent-page-shift {
504
579
  gap: 8px;
505
580
  }
506
581
  .followups__label {
507
- font-size: 12px;
508
- font-weight: 700;
582
+ font-size: 11px;
583
+ font-weight: 650;
509
584
  color: var(--as-text-subtle);
510
- letter-spacing: 0.02em;
585
+ letter-spacing: 0.055em;
586
+ text-transform: uppercase;
511
587
  }
512
588
  .followups__list {
513
589
  display: flex;
@@ -520,19 +596,34 @@ html.webless-agent-page-shift {
520
596
  background: var(--as-surface);
521
597
  color: var(--as-text);
522
598
  font-size: 13px;
523
- font-weight: 600;
599
+ position: relative;
600
+ font-weight: 580;
524
601
  line-height: 1.4;
525
602
  text-align: left;
526
- border-radius: var(--as-radius-sm);
527
- padding: 10px 12px;
603
+ border-radius: 12px;
604
+ padding: 11px 34px 11px 12px;
528
605
  cursor: pointer;
529
606
  transition: border-color 0.15s ease, background 0.15s ease;
530
607
  word-break: break-word;
531
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
+ }
532
619
  .followups__chip:hover:not(:disabled) {
533
- border-color: rgb(111 22 255 / 0.25);
620
+ border-color: color-mix(in srgb, var(--as-brand) 28%, var(--as-border));
534
621
  background: var(--as-brand-soft);
535
622
  }
623
+ .followups__chip:hover:not(:disabled)::after {
624
+ color: var(--as-brand);
625
+ transform: translate(2px, -50%);
626
+ }
536
627
  .followups__chip:disabled {
537
628
  opacity: 0.5;
538
629
  cursor: not-allowed;
@@ -566,13 +657,16 @@ html.webless-agent-page-shift {
566
657
  white-space: nowrap;
567
658
  text-align: left;
568
659
  }
660
+ .followups__chip--dock::after {
661
+ display: none;
662
+ }
569
663
 
570
664
  /* src/react/components/MessageBubble/MessageBubble.css */
571
665
  .message-bubble {
572
666
  display: flex;
573
667
  flex-direction: column;
574
668
  gap: 8px;
575
- max-width: 92%;
669
+ max-width: 86%;
576
670
  }
577
671
  .message-bubble--visitor {
578
672
  align-self: flex-end;
@@ -586,21 +680,23 @@ html.webless-agent-page-shift {
586
680
  .message-bubble__text {
587
681
  margin: 0;
588
682
  padding: 10px 12px;
589
- border-radius: var(--as-radius-md);
590
- font-size: 13px;
591
- line-height: 1.5;
683
+ border-radius: 14px;
684
+ font-size: 14px;
685
+ line-height: 1.55;
592
686
  word-break: break-word;
593
687
  }
594
688
  .message-bubble--visitor .message-bubble__text {
595
689
  background: var(--as-visitor-bubble);
596
690
  color: var(--as-visitor-text);
597
- border-bottom-right-radius: 4px;
691
+ border-bottom-right-radius: 5px;
598
692
  }
599
693
  .message-bubble--agent .message-bubble__text {
600
- background: var(--as-surface-muted);
694
+ width: 100%;
695
+ padding: 0;
696
+ border: none;
697
+ border-radius: 0;
698
+ background: transparent;
601
699
  color: var(--as-text);
602
- border: 1px solid var(--as-border);
603
- border-bottom-left-radius: 4px;
604
700
  }
605
701
  .message-bubble__markdown > :first-child {
606
702
  margin-top: 0;
@@ -633,7 +729,7 @@ html.webless-agent-page-shift {
633
729
  padding: 0;
634
730
  border: 0;
635
731
  background: transparent;
636
- color: inherit;
732
+ color: var(--as-brand);
637
733
  font: inherit;
638
734
  text-decoration: underline;
639
735
  text-underline-offset: 2px;
@@ -652,64 +748,80 @@ html.webless-agent-page-shift {
652
748
  /* src/react/components/AgentRail/AgentRail.css */
653
749
  .agent-rail {
654
750
  --rail-width: var(--as-rail-max-width);
751
+ position: relative;
752
+ z-index: var(--as-z-rail);
655
753
  display: flex;
656
- flex-direction: column;
657
754
  width: var(--rail-width);
658
- max-width: var(--rail-width);
659
755
  min-width: var(--rail-width);
756
+ max-width: var(--rail-width);
660
757
  height: 100%;
661
758
  max-height: 100dvh;
759
+ flex-direction: column;
662
760
  overflow: hidden;
663
- background: var(--as-surface);
664
761
  border-left: 1px solid var(--as-border);
762
+ background: var(--as-surface);
665
763
  box-shadow: var(--as-shadow-rail);
666
764
  color: var(--as-text);
667
765
  font-family: var(--as-font-body);
668
- position: relative;
669
- z-index: var(--as-z-rail);
766
+ }
767
+ .agent-rail:focus {
768
+ outline: none;
670
769
  }
671
770
  .agent-rail__header {
771
+ position: relative;
772
+ z-index: 1;
672
773
  flex-shrink: 0;
673
- display: flex;
674
- flex-direction: column;
675
- gap: 10px;
676
- 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));
677
777
  }
678
778
  .agent-rail__brand-row {
679
779
  display: grid;
680
- grid-template-columns: 32px 1fr 32px;
681
- align-items: center;
682
- min-height: 32px;
683
780
  min-width: 0;
781
+ min-height: 36px;
782
+ grid-template-columns: 36px minmax(0, 1fr) auto;
783
+ align-items: center;
784
+ gap: 8px;
684
785
  }
685
786
  .agent-rail__identity {
686
787
  grid-column: 2;
687
- grid-row: 1;
688
788
  display: flex;
789
+ min-width: 0;
689
790
  align-items: center;
690
791
  justify-content: center;
691
792
  gap: 8px;
692
- min-width: 0;
693
793
  }
694
794
  .agent-rail__brand-label {
695
795
  overflow: hidden;
696
796
  font-family: var(--as-font-display);
697
797
  font-size: 14px;
698
- font-weight: 600;
699
- letter-spacing: -0.01em;
700
- line-height: 1;
798
+ font-weight: 650;
799
+ letter-spacing: -0.015em;
800
+ line-height: 1.2;
701
801
  text-align: center;
702
802
  text-overflow: ellipsis;
703
803
  white-space: nowrap;
704
804
  }
705
- .agent-rail__brand-mark {
805
+ .agent-rail__brand-mark,
806
+ .agent-rail__welcome-mark {
706
807
  position: relative;
707
- width: 24px;
708
- height: 24px;
709
- 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;
710
820
  border-radius: 8px;
821
+ font-size: 11px;
711
822
  }
712
- .agent-rail__brand-logo {
823
+ .agent-rail__brand-logo,
824
+ .agent-rail__welcome-logo {
713
825
  position: absolute;
714
826
  inset: 0;
715
827
  width: 100%;
@@ -718,242 +830,344 @@ html.webless-agent-page-shift {
718
830
  background: var(--as-surface);
719
831
  object-fit: contain;
720
832
  }
721
- .agent-rail__brand-mark {
722
- display: inline-flex;
723
- align-items: center;
724
- justify-content: center;
725
- background: var(--as-brand);
726
- color: var(--as-visitor-text);
727
- font-size: 11px;
728
- font-weight: 750;
729
- }
730
833
  .agent-rail__brand-spacer {
731
- width: 32px;
732
- 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;
733
843
  }
734
844
  .agent-rail__collapse,
735
845
  .agent-rail__close,
846
+ .agent-rail__new-chat,
736
847
  .agent-rail__expand {
737
848
  appearance: none;
738
- border: none;
739
- background: transparent;
740
- color: var(--as-text-subtle);
741
- width: 32px;
742
- height: 32px;
743
- margin: 0;
744
- padding: 0;
745
- border-radius: 8px;
746
849
  display: inline-flex;
850
+ width: 36px;
851
+ height: 36px;
852
+ flex-shrink: 0;
747
853
  align-items: center;
748
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);
749
861
  cursor: pointer;
750
- flex-shrink: 0;
751
- grid-row: 1;
862
+ transition:
863
+ background 150ms ease,
864
+ color 150ms ease,
865
+ opacity 150ms ease;
752
866
  }
753
867
  .agent-rail__collapse,
754
868
  .agent-rail__close {
755
869
  grid-column: 1;
756
870
  justify-self: start;
757
871
  }
758
- .agent-rail__expand {
759
- grid-column: 3;
760
- justify-self: end;
761
- }
762
872
  .agent-rail__collapse:hover,
763
873
  .agent-rail__close:hover,
874
+ .agent-rail__new-chat:hover:not(:disabled),
764
875
  .agent-rail__expand:hover {
765
876
  background: var(--as-surface-muted);
766
877
  color: var(--as-text);
767
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
+ }
768
890
  .agent-rail__collapse svg,
769
891
  .agent-rail__close svg,
892
+ .agent-rail__new-chat svg,
770
893
  .agent-rail__expand svg {
771
- width: 16px;
772
- height: 16px;
894
+ width: 17px;
895
+ height: 17px;
773
896
  }
774
897
  .agent-rail__transcript {
775
- flex: 1 1 auto;
776
898
  min-height: 0;
777
- overflow-y: auto;
899
+ flex: 1 1 auto;
778
900
  overflow-x: hidden;
901
+ overflow-y: auto;
779
902
  overscroll-behavior: contain;
780
- padding: 14px 12px;
781
- display: flex;
782
- flex-direction: column;
783
- gap: 14px;
903
+ background: var(--as-surface);
784
904
  scroll-behavior: smooth;
905
+ scrollbar-color: color-mix(in srgb, var(--as-text) 18%, transparent) transparent;
906
+ scrollbar-width: thin;
785
907
  -webkit-overflow-scrolling: touch;
786
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
+ }
787
954
  .agent-rail__timeline-slot,
788
955
  .agent-rail__followups-slot {
789
956
  flex-shrink: 0;
790
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
+ }
791
1003
  .agent-rail__composer-wrap {
1004
+ position: relative;
1005
+ z-index: 1;
792
1006
  flex-shrink: 0;
793
- padding: 12px 12px 14px;
1007
+ padding: 12px 14px 13px;
794
1008
  border-top: 1px solid var(--as-border);
795
- background: var(--as-surface);
1009
+ background: color-mix(in srgb, var(--as-surface) 96%, var(--as-surface-muted));
796
1010
  }
797
1011
  .agent-rail__footer {
798
- margin-top: 8px;
799
- display: flex;
800
- flex-direction: column;
801
- gap: 4px;
1012
+ margin-top: 7px;
802
1013
  }
803
- .agent-rail__footer-disclaimer {
1014
+ .agent-rail__footer p {
804
1015
  margin: 0;
805
- text-align: center;
806
- font-size: 11px;
807
1016
  color: var(--as-text-subtle);
1017
+ font-size: 10.5px;
808
1018
  line-height: 1.35;
809
- }
810
- .agent-rail__footer-note {
811
- margin: 0;
812
1019
  text-align: center;
813
- font-size: 11px;
814
- color: var(--as-text-subtle);
815
- line-height: 1.35;
816
- }
817
- .agent-rail--mobile-fullscreen {
818
- position: fixed;
819
- inset: 0;
820
- width: 100%;
821
- max-width: none;
822
- min-width: 0;
823
- height: 100dvh;
824
- max-height: 100dvh;
825
- overflow: hidden;
826
- z-index: var(--as-z-mobile);
827
- border-left: none;
828
- box-shadow: none;
829
1020
  }
830
1021
  .agent-rail--expanded {
831
1022
  position: fixed;
832
1023
  top: 50%;
833
1024
  left: 50%;
834
- width: 95vw;
835
- height: 95dvh;
836
- max-width: none;
1025
+ z-index: calc(var(--as-z-mobile) + 1);
1026
+ width: min(960px, calc(100vw - 48px));
837
1027
  min-width: 0;
838
- max-height: 95dvh;
1028
+ max-width: 960px;
1029
+ height: min(860px, calc(100dvh - 48px));
1030
+ max-height: calc(100dvh - 48px);
1031
+ overflow: hidden;
839
1032
  transform: translate(-50%, -50%);
840
- z-index: calc(var(--as-z-mobile) + 1);
841
- background: var(--as-surface);
842
1033
  border: 1px solid var(--as-border);
843
- border-radius: var(--as-radius-lg);
844
- 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);
845
1037
  transition:
846
1038
  width 320ms cubic-bezier(0.22, 1, 0.36, 1),
847
1039
  height 320ms cubic-bezier(0.22, 1, 0.36, 1),
848
1040
  transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
849
1041
  border-radius 320ms cubic-bezier(0.22, 1, 0.36, 1),
850
1042
  box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1);
851
- overflow: hidden;
852
1043
  }
853
- .agent-rail--expanded .agent-rail__header,
854
- .agent-rail--expanded .agent-rail__transcript,
855
- .agent-rail--expanded .agent-rail__dock-wrap {
856
- background: var(--as-surface);
1044
+ .agent-rail--expanded .agent-rail__thread {
1045
+ max-width: 760px;
1046
+ padding: 28px 24px 36px;
857
1047
  }
858
- .agent-rail--expanded .agent-rail__transcript {
859
- padding: 20px 24px 25px;
860
- align-items: center;
1048
+ .agent-rail--expanded .agent-rail__welcome {
1049
+ width: 100%;
1050
+ max-width: 680px;
1051
+ margin: 0 auto;
861
1052
  }
862
- .agent-rail--expanded .agent-rail__transcript .message-bubble {
863
- width: 85%;
864
- max-width: 85%;
1053
+ .agent-rail--expanded .agent-rail__composer-wrap {
1054
+ padding: 16px 24px 18px;
865
1055
  }
866
- .agent-rail--expanded .agent-rail__transcript .message-bubble__text {
867
- font-size: 16px;
868
- 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;
869
1061
  }
870
- .agent-rail--expanded .agent-rail__transcript .tool-timeline__streaming-text {
871
- font-size: 16px;
872
- padding: 12px 14px;
1062
+ .agent-rail--expanded .agent-rail__footer {
1063
+ margin-top: 8px;
873
1064
  }
874
- .agent-rail--expanded .agent-rail__transcript .message-bubble--visitor {
875
- align-self: center;
876
- 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);
877
1081
  }
878
- .agent-rail--expanded .agent-rail__transcript .message-bubble--agent {
879
- align-self: center;
880
- align-items: flex-start;
1082
+ .agent-rail--mobile-fullscreen .agent-rail__header {
1083
+ padding-top: 16px;
881
1084
  }
882
- .agent-rail--expanded .agent-rail__transcript .agent-activity-bubble,
883
- .agent-rail--expanded .agent-rail__transcript [role=alert] {
884
- align-self: center;
885
- align-items: flex-start;
886
- width: 85%;
887
- max-width: 85%;
1085
+ .agent-rail--mobile-fullscreen .agent-rail__brand-row {
1086
+ grid-template-columns: minmax(0, 1fr) auto 40px;
888
1087
  }
889
- .agent-rail--expanded .agent-rail__dock-wrap {
890
- flex-shrink: 0;
891
- width: 70%;
892
- max-width: 70%;
893
- align-self: center;
894
- padding: 18px 0 24px;
895
- display: flex;
896
- flex-direction: column;
897
- align-items: flex-start;
898
- gap: 10px;
1088
+ .agent-rail--mobile-fullscreen .agent-rail__identity {
1089
+ grid-column: 1;
1090
+ justify-content: flex-start;
899
1091
  }
900
- .agent-rail--expanded .agent-rail__dock-followups {
901
- width: 100%;
1092
+ .agent-rail--mobile-fullscreen .agent-rail__actions {
1093
+ grid-column: 2;
902
1094
  }
903
- .agent-rail--expanded .agent-rail__dock-followups .followups__scroll {
904
- justify-content: flex-start;
1095
+ .agent-rail--mobile-fullscreen .agent-rail__close {
1096
+ grid-column: 3;
1097
+ grid-row: 1;
1098
+ justify-self: end;
905
1099
  }
906
- .agent-rail--expanded .agent-rail__dock {
907
- display: flex;
908
- flex-direction: column;
909
- gap: 10px;
910
- width: 100%;
911
- padding: 12px;
912
- border: 1px solid var(--as-border);
913
- border-radius: calc(var(--as-radius-lg) + 4px);
914
- 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;
915
1104
  }
916
- .agent-rail--expanded .agent-rail__footer {
917
- margin-top: 0;
918
- 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));
919
1125
  }
920
1126
  .agent-rail--mobile-fullscreen .agent-rail__close {
921
- display: grid;
1127
+ display: inline-flex;
922
1128
  }
923
1129
  .agent-rail--mobile-fullscreen .agent-rail__collapse {
924
1130
  display: none;
925
1131
  }
926
- @media (prefers-reduced-motion: reduce) {
927
- .agent-rail--expanded {
928
- transition: none;
929
- }
930
- }
931
1132
  @media (max-width: 767px) {
932
- .agent-rail {
933
- position: fixed;
934
- inset: 0;
1133
+ .agent-rail:not(.agent-rail--mobile-fullscreen) {
935
1134
  width: 100%;
936
- max-width: none;
937
1135
  min-width: 0;
938
- height: 100dvh;
939
- max-height: 100dvh;
940
- overflow: hidden;
941
- z-index: var(--as-z-mobile);
942
- border-left: none;
943
- box-shadow: none;
1136
+ max-width: none;
944
1137
  }
945
1138
  .agent-rail .agent-rail__close {
946
- display: grid;
1139
+ display: inline-flex;
947
1140
  }
948
- .agent-rail .agent-rail__collapse {
1141
+ .agent-rail .agent-rail__collapse,
1142
+ .agent-rail .agent-rail__expand {
949
1143
  display: none;
950
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
+ }
951
1160
  }
952
1161
  @media (min-width: 768px) {
953
1162
  .agent-rail .agent-rail__close {
954
1163
  display: none !important;
955
1164
  }
956
1165
  }
1166
+ @media (prefers-reduced-motion: reduce) {
1167
+ .agent-rail--expanded {
1168
+ transition: none;
1169
+ }
1170
+ }
957
1171
 
958
1172
  /* src/react/components/AssistEdgeTab/AssistEdgeTab.css */
959
1173
  .assist-edge-tab {
@@ -979,7 +1193,7 @@ html.webless-agent-page-shift {
979
1193
  cursor: pointer;
980
1194
  opacity: 0;
981
1195
  pointer-events: none;
982
- 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);
983
1197
  transition:
984
1198
  transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
985
1199
  opacity 240ms ease,
@@ -1136,7 +1350,7 @@ html.webless-agent-page-shift {
1136
1350
  --tab-fill: var(--as-brand);
1137
1351
  --tab-ink: #fff;
1138
1352
  --tab-line: transparent;
1139
- 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);
1140
1354
  }
1141
1355
  .assist-edge-tab--fill.assist-edge-tab--right,
1142
1356
  .assist-edge-tab--fill.assist-edge-tab--left {
@@ -1168,6 +1382,59 @@ html.webless-agent-page-shift {
1168
1382
  min-height: 148px;
1169
1383
  width: 36px;
1170
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
+ }
1171
1438
  }
1172
1439
  @media (prefers-reduced-motion: reduce) {
1173
1440
  .assist-edge-tab,