@agentiffai/design 0.1.5 → 0.1.7

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.
Files changed (43) hide show
  1. package/dist/{Window-CukhSS8T.d.cts → StreamStatusIndicator-DM5n4MI1.d.cts} +141 -4
  2. package/dist/{Window-CukhSS8T.d.ts → StreamStatusIndicator-DM5n4MI1.d.ts} +141 -4
  3. package/dist/copilotkit/index.cjs +974 -222
  4. package/dist/copilotkit/index.cjs.map +1 -1
  5. package/dist/copilotkit/index.d.cts +10 -2
  6. package/dist/copilotkit/index.d.ts +10 -2
  7. package/dist/copilotkit/index.js +972 -223
  8. package/dist/copilotkit/index.js.map +1 -1
  9. package/dist/index.cjs +1829 -175
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +17 -3
  12. package/dist/index.d.ts +17 -3
  13. package/dist/index.js +1822 -176
  14. package/dist/index.js.map +1 -1
  15. package/dist/layout/index.cjs +85 -50
  16. package/dist/layout/index.cjs.map +1 -1
  17. package/dist/layout/index.d.cts +10 -3
  18. package/dist/layout/index.d.ts +10 -3
  19. package/dist/layout/index.js +85 -50
  20. package/dist/layout/index.js.map +1 -1
  21. package/dist/theme/index.cjs +6 -1
  22. package/dist/theme/index.cjs.map +1 -1
  23. package/dist/theme/index.d.cts +8 -0
  24. package/dist/theme/index.d.ts +8 -0
  25. package/dist/theme/index.js +6 -1
  26. package/dist/theme/index.js.map +1 -1
  27. package/dist/workflow/index.cjs +995 -0
  28. package/dist/workflow/index.cjs.map +1 -0
  29. package/dist/workflow/index.d.cts +168 -0
  30. package/dist/workflow/index.d.ts +168 -0
  31. package/dist/workflow/index.js +986 -0
  32. package/dist/workflow/index.js.map +1 -0
  33. package/package.json +15 -3
  34. package/public/assets/avatar-transparent-bg.png +0 -0
  35. package/public/assets/icon-set/Icon-arrow-left-fill.svg +1 -0
  36. package/public/assets/icon-set/Icon-check-fill.svg +3 -0
  37. package/public/assets/icon-set/Icon-close-fill.svg +3 -0
  38. package/public/assets/icon-set/Icon-hourglass-line.svg +3 -0
  39. package/public/assets/icon-set/Icon-loader-2-line.svg +3 -0
  40. package/public/assets/icon-set/Icon-radio-button-line.svg +3 -0
  41. package/public/assets/icon-set/Icon-shield-check-fill.svg +3 -0
  42. package/public/assets/icon-set/Icon-shield-cross-fill.svg +3 -0
  43. package/public/assets/icon-set/logout-box-fill.svg +1 -0
@@ -464,6 +464,20 @@ var MessageContainer = styled4__default.default.div`
464
464
  align-items: flex-start;
465
465
  padding: 8px 0;
466
466
  max-width: 100%;
467
+
468
+ /* Fade in and slide up animation */
469
+ animation: fadeInSlideUp 0.4s ease-out;
470
+
471
+ @keyframes fadeInSlideUp {
472
+ from {
473
+ opacity: 0;
474
+ transform: translateY(10px);
475
+ }
476
+ to {
477
+ opacity: 1;
478
+ transform: translateY(0);
479
+ }
480
+ }
467
481
  `;
468
482
  var AvatarContainer = styled4__default.default.div`
469
483
  flex-shrink: 0;
@@ -473,25 +487,24 @@ var Avatar = styled4__default.default.img`
473
487
  height: 32px;
474
488
  border-radius: 50%;
475
489
  object-fit: cover;
476
- background-color: #e5e7eb;
490
+ background-color: transparent;
477
491
  `;
478
492
  var AvatarInitials = styled4__default.default.div`
479
493
  width: 32px;
480
494
  height: 32px;
481
495
  border-radius: 50%;
482
- background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
483
- color: white;
496
+ overflow: hidden;
484
497
  display: flex;
485
498
  align-items: center;
486
499
  justify-content: center;
487
- font-size: 12px;
488
- font-weight: 600;
489
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
490
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
500
+ background-color: #1e3a5f; /* Dark blue background */
501
+ padding: 4px; /* Make the avatar image smaller inside the circle */
502
+ box-sizing: border-box;
491
503
 
492
- svg {
493
- width: 18px;
494
- height: 18px;
504
+ img {
505
+ width: 100%;
506
+ height: 100%;
507
+ object-fit: contain;
495
508
  }
496
509
  `;
497
510
  var ContentContainer = styled4__default.default.div`
@@ -499,11 +512,13 @@ var ContentContainer = styled4__default.default.div`
499
512
  min-width: 0;
500
513
  `;
501
514
  var MessageContent = styled4__default.default.div`
502
- background-color: #2c2c2e;
515
+ background-color: rgba(45, 45, 61, 0.7); /* Semi-transparent dark gray with 70% opacity */
516
+ backdrop-filter: blur(10px);
517
+ -webkit-backdrop-filter: blur(10px);
503
518
  padding: 12px 16px;
504
- border-radius: 16px;
519
+ border-radius: 12px; /* Match design tokens */
505
520
  border-top-left-radius: 4px;
506
- color: #e5e5e7;
521
+ color: #FFFFFF; /* White text from design tokens */
507
522
  font-size: 14px;
508
523
  line-height: 1.5;
509
524
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
@@ -515,8 +530,10 @@ var LoadingDots2 = styled4__default.default.div`
515
530
  display: flex;
516
531
  gap: 6px;
517
532
  padding: 12px 16px;
518
- background-color: #2c2c2e;
519
- border-radius: 16px;
533
+ background-color: rgba(45, 45, 61, 0.7); /* Match MessageContent with transparency */
534
+ backdrop-filter: blur(10px);
535
+ -webkit-backdrop-filter: blur(10px);
536
+ border-radius: 12px; /* Match design tokens */
520
537
  border-top-left-radius: 4px;
521
538
  width: fit-content;
522
539
  `;
@@ -667,20 +684,136 @@ var FileAttachment = ({
667
684
  }
668
685
  );
669
686
  };
687
+ var Container = styled4__default.default.div`
688
+ font-family: ${(props) => props.variant === "code" ? '"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace' : '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'};
689
+ white-space: pre-wrap;
690
+ word-break: break-word;
691
+ line-height: 1.5;
692
+ `;
693
+ var Cursor = styled4__default.default.span`
694
+ display: inline-block;
695
+ width: 2px;
696
+ height: 1em;
697
+ background-color: currentColor;
698
+ margin-left: 2px;
699
+ vertical-align: text-bottom;
700
+ animation: blink 1s infinite;
701
+
702
+ @keyframes blink {
703
+ 0%,
704
+ 49% {
705
+ opacity: 1;
706
+ }
707
+ 50%,
708
+ 100% {
709
+ opacity: 0;
710
+ }
711
+ }
712
+ `;
713
+ var StreamingText2 = ({
714
+ content,
715
+ isStreaming = false,
716
+ typingSpeed: _typingSpeed = 50,
717
+ // Not used - streaming shows chunks as they arrive
718
+ cursor = true,
719
+ variant = "default",
720
+ onStreamComplete,
721
+ className
722
+ }) => {
723
+ const [displayedText, setDisplayedText] = react.useState("");
724
+ react.useEffect(() => {
725
+ if (isStreaming) {
726
+ setDisplayedText(content);
727
+ return;
728
+ }
729
+ if (!isStreaming && displayedText !== content) {
730
+ setDisplayedText(content);
731
+ if (onStreamComplete) {
732
+ onStreamComplete();
733
+ }
734
+ }
735
+ }, [content, isStreaming, onStreamComplete, displayedText]);
736
+ const showCursor = isStreaming && cursor;
737
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { variant, className, children: [
738
+ displayedText,
739
+ showCursor && /* @__PURE__ */ jsxRuntime.jsx(Cursor, {})
740
+ ] });
741
+ };
742
+ StreamingText2.displayName = "StreamingText";
670
743
  var AttachmentsContainer = styled4__default.default.div`
671
744
  display: flex;
672
745
  flex-direction: column;
673
746
  gap: 8px;
674
747
  margin-top: 12px;
675
748
  `;
749
+ var ActionButton = styled4__default.default.button`
750
+ display: inline-flex;
751
+ align-items: center;
752
+ gap: 4px;
753
+ padding: 4px 8px;
754
+ font-size: 12px;
755
+ font-weight: 500;
756
+ color: #9CA3AF;
757
+ background: rgba(255, 255, 255, 0.05);
758
+ border: 1px solid rgba(255, 255, 255, 0.1);
759
+ border-radius: 6px;
760
+ cursor: pointer;
761
+ transition: all 0.15s ease-in-out;
762
+
763
+ &:hover {
764
+ background: rgba(255, 255, 255, 0.1);
765
+ border-color: rgba(255, 255, 255, 0.2);
766
+ color: #FFFFFF;
767
+ }
768
+
769
+ &:active {
770
+ transform: scale(0.98);
771
+ }
772
+ `;
773
+ var ActionsContainer2 = styled4__default.default.div`
774
+ display: flex;
775
+ gap: 6px;
776
+ flex-wrap: wrap;
777
+ margin-top: 8px;
778
+ `;
779
+ var MessageTime = styled4__default.default.time`
780
+ font-size: 11px;
781
+ color: #6B7280;
782
+ margin-top: 4px;
783
+ display: block;
784
+ `;
785
+ var StreamingIndicator = styled4__default.default.span`
786
+ display: inline-block;
787
+ width: 4px;
788
+ height: 4px;
789
+ margin-left: 4px;
790
+ background-color: #459FB9;
791
+ border-radius: 50%;
792
+ animation: pulse 1.5s ease-in-out infinite;
793
+
794
+ @keyframes pulse {
795
+ 0%,
796
+ 100% {
797
+ opacity: 0.3;
798
+ transform: scale(0.8);
799
+ }
800
+ 50% {
801
+ opacity: 1;
802
+ transform: scale(1.2);
803
+ }
804
+ }
805
+ `;
676
806
  var AssistantMessage = ({
677
807
  content = "",
678
808
  avatarUrl,
679
809
  avatarInitials: _avatarInitials = "AI",
680
810
  isLoading = false,
811
+ isStreaming = false,
681
812
  className,
682
813
  attachments = [],
683
- enableMarkdown: _enableMarkdown = false
814
+ enableMarkdown = false,
815
+ timestamp,
816
+ actions = []
684
817
  }) => {
685
818
  const renderContent = () => {
686
819
  if (isLoading) {
@@ -691,12 +824,29 @@ var AssistantMessage = ({
691
824
  ] });
692
825
  }
693
826
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
694
- content && /* @__PURE__ */ jsxRuntime.jsx(MessageContent, { children: content }),
695
- attachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(AttachmentsContainer, { children: attachments.map((attachment, index) => /* @__PURE__ */ jsxRuntime.jsx(FileAttachment, { ...attachment }, `${attachment.title}-${index}`)) })
827
+ content && /* @__PURE__ */ jsxRuntime.jsxs(MessageContent, { children: [
828
+ /* @__PURE__ */ jsxRuntime.jsx(
829
+ StreamingText2,
830
+ {
831
+ content,
832
+ isStreaming,
833
+ typingSpeed: 30,
834
+ cursor: false,
835
+ variant: enableMarkdown ? "markdown" : "default"
836
+ }
837
+ ),
838
+ isStreaming && /* @__PURE__ */ jsxRuntime.jsx(StreamingIndicator, {})
839
+ ] }),
840
+ attachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(AttachmentsContainer, { children: attachments.map((attachment, index) => /* @__PURE__ */ jsxRuntime.jsx(FileAttachment, { ...attachment }, `${attachment.title}-${index}`)) }),
841
+ timestamp && /* @__PURE__ */ jsxRuntime.jsx(MessageTime, { children: timestamp }),
842
+ actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ActionsContainer2, { children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(ActionButton, { onClick: action.onClick, children: [
843
+ action.icon,
844
+ action.label
845
+ ] }, index)) })
696
846
  ] });
697
847
  };
698
848
  return /* @__PURE__ */ jsxRuntime.jsxs(MessageContainer, { className, children: [
699
- /* @__PURE__ */ jsxRuntime.jsx(AvatarContainer, { children: avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: avatarUrl, alt: "Assistant avatar" }) : /* @__PURE__ */ jsxRuntime.jsx(AvatarInitials, { children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 13a4 4 0 0 1 0 8c-2.142 0-4-1.79-4-4h-2a4 4 0 1 1-.535-2h3.07A4 4 0 0 1 17 13M2 12v-2h2V7a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v3h2v2z" }) }) }) }),
849
+ /* @__PURE__ */ jsxRuntime.jsx(AvatarContainer, { children: avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: avatarUrl, alt: "Assistant avatar" }) : /* @__PURE__ */ jsxRuntime.jsx(AvatarInitials, { children: /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: "/assets/avatar-transparent-bg.png", alt: "AI Assistant" }) }) }),
700
850
  /* @__PURE__ */ jsxRuntime.jsx(ContentContainer, { children: renderContent() })
701
851
  ] });
702
852
  };
@@ -710,11 +860,40 @@ var dotPulse3 = styled4.keyframes`
710
860
  transform: scale(1);
711
861
  }
712
862
  `;
713
- var Container = styled4__default.default.div`
863
+ var pulse = styled4.keyframes`
864
+ 0%, 100% {
865
+ opacity: 0.5;
866
+ transform: scale(1);
867
+ }
868
+ 50% {
869
+ opacity: 1;
870
+ transform: scale(1.2);
871
+ }
872
+ `;
873
+ var wave = styled4.keyframes`
874
+ 0%, 40%, 100% {
875
+ transform: translateY(0);
876
+ }
877
+ 20% {
878
+ transform: translateY(-8px);
879
+ }
880
+ `;
881
+ var getSizeValue = (size = "md") => {
882
+ switch (size) {
883
+ case "sm":
884
+ return { padding: "8px 12px", avatar: "32px", icon: "16px", fontSize: "12px", dotSize: "4px" };
885
+ case "lg":
886
+ return { padding: "16px 20px", avatar: "48px", icon: "24px", fontSize: "16px", dotSize: "8px" };
887
+ case "md":
888
+ default:
889
+ return { padding: "12px 16px", avatar: "40px", icon: "20px", fontSize: "14px", dotSize: "6px" };
890
+ }
891
+ };
892
+ var Container2 = styled4__default.default.div`
714
893
  display: inline-flex;
715
894
  align-items: center;
716
895
  gap: 12px;
717
- padding: 12px 16px;
896
+ padding: ${(props) => getSizeValue(props.size).padding};
718
897
  background-color: #2c2c2e;
719
898
  border-radius: 16px;
720
899
  box-shadow: none;
@@ -724,19 +903,19 @@ var Container = styled4__default.default.div`
724
903
  margin: 0 auto;
725
904
  `;
726
905
  var Avatar2 = styled4__default.default.div`
727
- width: 40px;
728
- height: 40px;
906
+ width: ${(props) => getSizeValue(props.size).avatar};
907
+ height: ${(props) => getSizeValue(props.size).avatar};
729
908
  border-radius: 50%;
730
- background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
909
+ background: linear-gradient(135deg, #1e5a6b 0%, #2a7a8f 100%); /* Darker teal gradient */
731
910
  display: flex;
732
911
  align-items: center;
733
912
  justify-content: center;
734
913
  flex-shrink: 0;
735
- box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
914
+ box-shadow: 0 2px 8px rgba(44, 176, 171, 0.3); /* Teal shadow */
736
915
  `;
737
916
  var HeadphonesIcon = styled4__default.default.svg`
738
- width: 20px;
739
- height: 20px;
917
+ width: ${(props) => getSizeValue(props.size).icon};
918
+ height: ${(props) => getSizeValue(props.size).icon};
740
919
  color: #FFFFFF;
741
920
  `;
742
921
  var Content = styled4__default.default.div`
@@ -747,18 +926,29 @@ var Content = styled4__default.default.div`
747
926
  var LoadingDots3 = styled4__default.default.div`
748
927
  display: flex;
749
928
  align-items: center;
750
- gap: 4px;
929
+ gap: ${(props) => props.variant === "wave" ? "2px" : "4px"};
751
930
  padding: 0 4px;
752
931
  `;
753
932
  var Dot2 = styled4__default.default.span`
754
- width: 6px;
755
- height: 6px;
933
+ width: ${(props) => getSizeValue(props.size).dotSize};
934
+ height: ${(props) => getSizeValue(props.size).dotSize};
756
935
  border-radius: 50%;
757
936
  background-color: #8e8e93;
758
- animation: ${dotPulse3} 1.4s ease-in-out infinite;
937
+ animation: ${(props) => {
938
+ switch (props.variant) {
939
+ case "pulse":
940
+ return pulse;
941
+ case "wave":
942
+ return wave;
943
+ case "dots":
944
+ default:
945
+ return dotPulse3;
946
+ }
947
+ }}
948
+ 1.4s ease-in-out infinite;
759
949
  `;
760
950
  var Message2 = styled4__default.default.span`
761
- font-size: 14px;
951
+ font-size: ${(props) => getSizeValue(props.size).fontSize};
762
952
  color: #e5e5e7;
763
953
  font-weight: 400;
764
954
  line-height: 1.5;
@@ -767,26 +957,50 @@ var Message2 = styled4__default.default.span`
767
957
  function AssistantThinking({
768
958
  message = "Analyzing data, please wait...",
769
959
  className,
770
- ariaLabel = "Assistant is thinking"
960
+ ariaLabel = "Assistant is thinking",
961
+ variant = "dots",
962
+ size = "md"
771
963
  }) {
772
964
  const containerRef = react.useRef(null);
965
+ const renderLoadingIndicator = () => {
966
+ switch (variant) {
967
+ case "dots":
968
+ return /* @__PURE__ */ jsxRuntime.jsxs(LoadingDots3, { "aria-hidden": "true", size, children: [
969
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "0ms" }, size }),
970
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "150ms" }, size }),
971
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "300ms" }, size })
972
+ ] });
973
+ case "pulse":
974
+ return /* @__PURE__ */ jsxRuntime.jsx(LoadingDots3, { "aria-hidden": "true", size, variant: "pulse", children: /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "0ms" }, size, variant: "pulse" }) });
975
+ case "wave":
976
+ return /* @__PURE__ */ jsxRuntime.jsxs(LoadingDots3, { "aria-hidden": "true", size, variant: "wave", children: [
977
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "0ms" }, size, variant: "wave" }),
978
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "100ms" }, size, variant: "wave" }),
979
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "200ms" }, size, variant: "wave" }),
980
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "300ms" }, size, variant: "wave" }),
981
+ /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "400ms" }, size, variant: "wave" })
982
+ ] });
983
+ case "text":
984
+ return null;
985
+ // Just show the message with no indicator
986
+ default:
987
+ return null;
988
+ }
989
+ };
773
990
  return /* @__PURE__ */ jsxRuntime.jsxs(
774
- Container,
991
+ Container2,
775
992
  {
776
993
  ref: containerRef,
777
994
  className,
778
995
  role: "status",
779
996
  "aria-live": "polite",
780
997
  "aria-label": ariaLabel,
998
+ size,
781
999
  children: [
782
- /* @__PURE__ */ jsxRuntime.jsx(Avatar2, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(HeadphonesIcon, { viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 13a4 4 0 0 1 0 8c-2.142 0-4-1.79-4-4h-2a4 4 0 1 1-.535-2h3.07A4 4 0 0 1 17 13M2 12v-2h2V7a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v3h2v2z" }) }) }),
1000
+ /* @__PURE__ */ jsxRuntime.jsx(Avatar2, { "aria-hidden": "true", size, children: /* @__PURE__ */ jsxRuntime.jsx(HeadphonesIcon, { viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 13a4 4 0 0 1 0 8c-2.142 0-4-1.79-4-4h-2a4 4 0 1 1-.535-2h3.07A4 4 0 0 1 17 13M2 12v-2h2V7a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v3h2v2z" }) }) }),
783
1001
  /* @__PURE__ */ jsxRuntime.jsxs(Content, { children: [
784
- /* @__PURE__ */ jsxRuntime.jsxs(LoadingDots3, { "aria-hidden": "true", children: [
785
- /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "0ms" } }),
786
- /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "150ms" } }),
787
- /* @__PURE__ */ jsxRuntime.jsx(Dot2, { style: { animationDelay: "300ms" } })
788
- ] }),
789
- /* @__PURE__ */ jsxRuntime.jsx(Message2, { children: message })
1002
+ renderLoadingIndicator(),
1003
+ /* @__PURE__ */ jsxRuntime.jsx(Message2, { size, children: message })
790
1004
  ] })
791
1005
  ]
792
1006
  }
@@ -806,12 +1020,9 @@ var AssistantMessageAdapter = ({
806
1020
  // markdownTagRenderers,
807
1021
  // ImageRenderer,
808
1022
  }) => {
809
- if (isLoading) {
1023
+ if (isLoading || isGenerating && !message?.content) {
810
1024
  return /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." });
811
1025
  }
812
- if (isGenerating && !message?.content) {
813
- return /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Generating response..." });
814
- }
815
1026
  const content = message?.content || "";
816
1027
  const attachments = [];
817
1028
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -819,7 +1030,8 @@ var AssistantMessageAdapter = ({
819
1030
  {
820
1031
  content,
821
1032
  avatarInitials: "AI",
822
- isLoading: isGenerating,
1033
+ isLoading: false,
1034
+ isStreaming: isGenerating,
823
1035
  attachments,
824
1036
  enableMarkdown: true
825
1037
  }
@@ -837,7 +1049,6 @@ var StyledUserMessage = styled4__default.default.button`
837
1049
  font-size: 14px;
838
1050
  font-weight: 400;
839
1051
  line-height: 1.4;
840
- color: #ffffff;
841
1052
  border: none;
842
1053
  cursor: default;
843
1054
  user-select: none;
@@ -846,34 +1057,37 @@ var StyledUserMessage = styled4__default.default.button`
846
1057
  position: relative;
847
1058
  text-align: left;
848
1059
 
849
- /* Pill shape - fully rounded ends */
850
- border-radius: 999px;
851
-
852
- /* Purple to blue gradient (left to right) */
853
- background: linear-gradient(90deg, #8B5CF6 0%, #5B8DEF 100%);
1060
+ /* Force override CopilotKit's default user message styles */
1061
+ && {
1062
+ background: #1C3A4E !important; /* Darker brand blue - darker than secondary */
1063
+ color: #FFFFFF !important; /* White text on dark blue background */
1064
+ border-radius: 999px !important; /* Pill shape - fully rounded ends */
1065
+ }
854
1066
 
855
- /* Subtle shadow and glow effect */
1067
+ /* Subtle shadow and glow effect - darker blue */
856
1068
  box-shadow:
857
- 0 2px 8px rgba(91, 141, 239, 0.25),
858
- 0 1px 3px rgba(139, 92, 246, 0.15);
1069
+ 0 2px 8px rgba(28, 58, 78, 0.25),
1070
+ 0 1px 3px rgba(28, 58, 78, 0.15);
859
1071
 
860
1072
  /* Smooth transitions */
861
1073
  transition: all 0.2s ease-in-out;
862
1074
 
863
- /* Speech bubble tail */
1075
+ /* Speech bubble tail - darker blue to match bubble */
864
1076
  &::after {
865
1077
  content: '';
866
1078
  position: absolute;
867
- bottom: -4px;
868
- right: -6px;
869
- width: 18px;
870
- height: 18px;
871
- background: #5B8DEF;
1079
+ bottom: -6px;
1080
+ right: 12px;
1081
+ width: 14px;
1082
+ height: 14px;
1083
+ background: #1C3A4E !important; /* Force override - darker blue */
872
1084
  transform: rotate(45deg);
873
- border-radius: 0 0 16px 0;
1085
+ border-radius: 0 0 4px 0;
1086
+ clip-path: polygon(0 0, 100% 100%, 0 100%);
874
1087
  box-shadow:
875
- 2px 2px 4px rgba(91, 141, 239, 0.15);
1088
+ 2px 2px 4px rgba(28, 58, 78, 0.15);
876
1089
  transition: all 0.2s ease-in-out;
1090
+ z-index: -1;
877
1091
  }
878
1092
 
879
1093
  /* Hover state - only for button elements */
@@ -881,12 +1095,12 @@ var StyledUserMessage = styled4__default.default.button`
881
1095
  transform: translateY(-1px);
882
1096
  cursor: pointer;
883
1097
  box-shadow:
884
- 0 4px 12px rgba(91, 141, 239, 0.35),
885
- 0 2px 6px rgba(139, 92, 246, 0.25);
1098
+ 0 4px 12px rgba(28, 58, 78, 0.35),
1099
+ 0 2px 6px rgba(28, 58, 78, 0.25);
886
1100
 
887
1101
  &::after {
888
1102
  box-shadow:
889
- 3px 3px 6px rgba(91, 141, 239, 0.2);
1103
+ 3px 3px 6px rgba(28, 58, 78, 0.2);
890
1104
  }
891
1105
  }
892
1106
 
@@ -894,24 +1108,24 @@ var StyledUserMessage = styled4__default.default.button`
894
1108
  &[role="button"]:active:not(:disabled) {
895
1109
  transform: translateY(0);
896
1110
  box-shadow:
897
- 0 1px 4px rgba(91, 141, 239, 0.2),
898
- 0 1px 2px rgba(139, 92, 246, 0.1);
1111
+ 0 1px 4px rgba(28, 58, 78, 0.2),
1112
+ 0 1px 2px rgba(28, 58, 78, 0.1);
899
1113
 
900
1114
  &::after {
901
1115
  box-shadow:
902
- 1px 1px 2px rgba(91, 141, 239, 0.1);
1116
+ 1px 1px 2px rgba(28, 58, 78, 0.1);
903
1117
  }
904
1118
  }
905
1119
 
906
1120
  ${({ $isPressed }) => $isPressed && styled4.css`
907
1121
  transform: translateY(0) scale(0.98);
908
1122
  box-shadow:
909
- 0 1px 4px rgba(91, 141, 239, 0.2),
910
- 0 1px 2px rgba(139, 92, 246, 0.1);
1123
+ 0 1px 4px rgba(28, 58, 78, 0.2),
1124
+ 0 1px 2px rgba(28, 58, 78, 0.1);
911
1125
 
912
1126
  &::after {
913
1127
  box-shadow:
914
- 1px 1px 2px rgba(91, 141, 239, 0.1);
1128
+ 1px 1px 2px rgba(28, 58, 78, 0.1);
915
1129
  }
916
1130
  `}
917
1131
 
@@ -921,12 +1135,12 @@ var StyledUserMessage = styled4__default.default.button`
921
1135
  }
922
1136
 
923
1137
  &:focus-visible {
924
- outline: 2px solid #5B8DEF;
1138
+ outline: 2px solid #1C3A4E;
925
1139
  outline-offset: 3px;
926
1140
  box-shadow:
927
- 0 4px 12px rgba(91, 141, 239, 0.35),
928
- 0 2px 6px rgba(139, 92, 246, 0.25),
929
- 0 0 0 3px rgba(91, 141, 239, 0.1);
1141
+ 0 4px 12px rgba(28, 58, 78, 0.35),
1142
+ 0 2px 6px rgba(28, 58, 78, 0.25),
1143
+ 0 0 0 3px rgba(28, 58, 78, 0.1);
930
1144
  }
931
1145
 
932
1146
  /* Disabled state */
@@ -988,6 +1202,20 @@ var UserMessageWrapper = styled4__default.default.div`
988
1202
  justify-content: flex-end;
989
1203
  width: 100%;
990
1204
  padding: 8px 0;
1205
+
1206
+ /* Fade in and slide up animation */
1207
+ animation: fadeInSlideUp 0.3s ease-out;
1208
+
1209
+ @keyframes fadeInSlideUp {
1210
+ from {
1211
+ opacity: 0;
1212
+ transform: translateY(10px);
1213
+ }
1214
+ to {
1215
+ opacity: 1;
1216
+ transform: translateY(0);
1217
+ }
1218
+ }
991
1219
  `;
992
1220
  var UserMessageAdapter = ({
993
1221
  message,
@@ -1011,7 +1239,9 @@ var ChatInputContainer = styled4__default.default.div`
1011
1239
  flex-direction: column;
1012
1240
  width: 100%;
1013
1241
  padding: 8px;
1014
- background: transparent;
1242
+ background-color: rgba(25, 25, 25, 0.6);
1243
+ backdrop-filter: blur(10px);
1244
+ -webkit-backdrop-filter: blur(10px);
1015
1245
  border-radius: 0;
1016
1246
  box-shadow: none;
1017
1247
  box-sizing: border-box;
@@ -1074,16 +1304,17 @@ var InputWrapper = styled4__default.default.div`
1074
1304
  align-items: center;
1075
1305
  gap: 10px;
1076
1306
  padding: 10px 14px;
1077
- background-color: #2c2c2e;
1078
- border: 1px solid #3a3a3c;
1307
+ background-color: rgba(25, 25, 25, 0.4);
1308
+ border: 1px solid rgba(58, 58, 60, 0.3);
1079
1309
  border-radius: 12px;
1080
1310
  transition: all 0.2s ease;
1081
1311
  width: 100%;
1082
1312
  box-sizing: border-box;
1083
1313
 
1084
1314
  &:focus-within {
1085
- border-color: #5B9FFF;
1086
- background-color: #323234;
1315
+ /* Subtle focus indication without bold colored border */
1316
+ border-color: rgba(255, 255, 255, 0.3);
1317
+ background-color: rgba(50, 50, 52, 0.6);
1087
1318
  }
1088
1319
  `;
1089
1320
  var InputField = styled4__default.default.input`
@@ -1170,6 +1401,9 @@ var ChatInput = ({
1170
1401
  },
1171
1402
  inputRef
1172
1403
  );
1404
+ const handleDirectChange = (e) => {
1405
+ setValue(e.target.value);
1406
+ };
1173
1407
  const handleKeyDown = (e) => {
1174
1408
  if (e.key === "Enter") {
1175
1409
  e.preventDefault();
@@ -1186,8 +1420,6 @@ var ChatInput = ({
1186
1420
  const handleSuggestionClick = (suggestionText) => {
1187
1421
  if (onSuggestionSelect && !isDisabled && !isReadOnly) {
1188
1422
  onSuggestionSelect(suggestionText);
1189
- setValue(suggestionText);
1190
- inputRef.current?.focus();
1191
1423
  }
1192
1424
  };
1193
1425
  const canSubmit = currentValue.trim().length > 0 && !isDisabled && !isReadOnly;
@@ -1210,9 +1442,11 @@ var ChatInput = ({
1210
1442
  type: "text",
1211
1443
  placeholder,
1212
1444
  onKeyDown: handleKeyDown,
1445
+ onChange: handleDirectChange,
1213
1446
  autoFocus,
1214
1447
  disabled: isDisabled,
1215
- readOnly: isReadOnly
1448
+ readOnly: isReadOnly,
1449
+ value: currentValue
1216
1450
  }
1217
1451
  ),
1218
1452
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1289,11 +1523,39 @@ var InputAdapter = ({
1289
1523
  isVisible = true
1290
1524
  }) => {
1291
1525
  const [value, setValue] = react.useState("");
1526
+ const [isSubmitting, setIsSubmitting] = react.useState(false);
1292
1527
  const handleSubmit = async (message) => {
1293
- if (!message.trim() || inProgress) return;
1294
- await onSend(message);
1295
- setValue("");
1528
+ if (!message.trim()) {
1529
+ console.log("[InputAdapter] handleSubmit: empty message, ignoring");
1530
+ return;
1531
+ }
1532
+ setIsSubmitting(true);
1533
+ try {
1534
+ await onSend(message);
1535
+ setValue("");
1536
+ } catch (error) {
1537
+ console.error("[InputAdapter] Error sending message:", error);
1538
+ } finally {
1539
+ setIsSubmitting(false);
1540
+ }
1541
+ };
1542
+ const handleSuggestionSelect = async (suggestion) => {
1543
+ if (!suggestion.trim()) {
1544
+ return;
1545
+ }
1546
+ if (inProgress || isSubmitting) {
1547
+ return;
1548
+ }
1549
+ setIsSubmitting(true);
1550
+ try {
1551
+ await onSend(suggestion);
1552
+ } catch (error) {
1553
+ console.error("[InputAdapter] Error sending suggestion:", error);
1554
+ } finally {
1555
+ setIsSubmitting(false);
1556
+ }
1296
1557
  };
1558
+ const shouldDisableInput = isSubmitting;
1297
1559
  return /* @__PURE__ */ jsxRuntime.jsx(
1298
1560
  ChatInput,
1299
1561
  {
@@ -1301,18 +1563,13 @@ var InputAdapter = ({
1301
1563
  onChange: setValue,
1302
1564
  onSubmit: handleSubmit,
1303
1565
  placeholder: "Ask, write or search for anything...",
1304
- isDisabled: inProgress,
1566
+ isDisabled: shouldDisableInput,
1305
1567
  autoFocus: isVisible,
1306
1568
  "aria-label": "Chat message input",
1307
1569
  suggestions: [
1308
- { text: "Create in-depth analysis" },
1309
- { text: "Identify actionable tasks" },
1310
- { text: "Summarize key points" }
1570
+ { text: "Explore workflows" }
1311
1571
  ],
1312
- onSuggestionSelect: (suggestion) => {
1313
- setValue(suggestion);
1314
- handleSubmit(suggestion);
1315
- }
1572
+ onSuggestionSelect: handleSuggestionSelect
1316
1573
  }
1317
1574
  );
1318
1575
  };
@@ -1321,14 +1578,16 @@ var HeaderContainer = styled4__default.default.header`
1321
1578
  display: flex;
1322
1579
  align-items: center;
1323
1580
  justify-content: space-between;
1324
- padding: 8px;
1325
- background-color: #2c2c2e;
1326
- border-bottom: 1px solid #3a3a3c;
1327
- min-height: 60px;
1581
+ padding: 6px 8px;
1582
+ background-color: rgba(25, 25, 25, 0.6);
1583
+ backdrop-filter: blur(10px);
1584
+ -webkit-backdrop-filter: blur(10px);
1585
+ border-bottom: 1px solid rgba(58, 58, 60, 0.3);
1586
+ min-height: 44px;
1328
1587
  box-sizing: border-box;
1329
1588
 
1330
1589
  @media (min-width: 640px) {
1331
- padding: 12px;
1590
+ padding: 8px 12px;
1332
1591
  }
1333
1592
  `;
1334
1593
  var HeaderContent = styled4__default.default.div`
@@ -1367,7 +1626,7 @@ var HeaderActions = styled4__default.default.div`
1367
1626
  gap: ${({ theme }) => theme?.spacing?.xs ?? "4px"};
1368
1627
  margin-left: ${({ theme }) => theme?.spacing?.md ?? "16px"};
1369
1628
  `;
1370
- var ActionButton = styled4__default.default.button`
1629
+ var ActionButton2 = styled4__default.default.button`
1371
1630
  display: inline-flex;
1372
1631
  align-items: center;
1373
1632
  justify-content: center;
@@ -1437,7 +1696,7 @@ var Header = ({
1437
1696
  subtitle && /* @__PURE__ */ jsxRuntime.jsx(HeaderSubtitle, { children: subtitle })
1438
1697
  ] }),
1439
1698
  /* @__PURE__ */ jsxRuntime.jsxs(HeaderActions, { children: [
1440
- onMinimize && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { ref: minimizeRef, ...minimizeProps, "data-action": "minimize", children: /* @__PURE__ */ jsxRuntime.jsxs(
1699
+ onMinimize && /* @__PURE__ */ jsxRuntime.jsx(ActionButton2, { ref: minimizeRef, ...minimizeProps, "data-action": "minimize", children: /* @__PURE__ */ jsxRuntime.jsxs(
1441
1700
  "svg",
1442
1701
  {
1443
1702
  width: "16",
@@ -1452,7 +1711,7 @@ var Header = ({
1452
1711
  ]
1453
1712
  }
1454
1713
  ) }),
1455
- onClose && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { ref: closeRef, ...closeProps, "data-action": "close", children: /* @__PURE__ */ jsxRuntime.jsxs(
1714
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(ActionButton2, { ref: closeRef, ...closeProps, "data-action": "close", children: /* @__PURE__ */ jsxRuntime.jsxs(
1456
1715
  "svg",
1457
1716
  {
1458
1717
  width: "16",
@@ -1472,41 +1731,18 @@ var Header = ({
1472
1731
  ] });
1473
1732
  };
1474
1733
  Header.displayName = "Header";
1475
- var MessagesContainer = styled4__default.default.div`
1476
- display: flex;
1477
- flex-direction: column;
1478
- flex: 1;
1479
- overflow: hidden;
1480
- background-color: #1c1c1e;
1481
- padding: 8px;
1482
- gap: 12px;
1483
- box-sizing: border-box;
1484
-
1485
- /* Ensure proper scrolling behavior for child components */
1486
- position: relative;
1487
- min-height: 0;
1488
-
1489
- /* Desktop padding */
1490
- @media (min-width: 640px) {
1491
- padding: 12px;
1492
- }
1493
- `;
1494
- var Messages = ({
1495
- children,
1496
- className,
1497
- ariaLabel = "Messages"
1498
- }) => {
1499
- return /* @__PURE__ */ jsxRuntime.jsx(MessagesContainer, { className, role: "region", "aria-label": ariaLabel, children });
1500
- };
1501
- Messages.displayName = "Messages";
1502
1734
  var WindowContainer = styled4__default.default.div`
1503
1735
  display: flex;
1504
1736
  flex-direction: column;
1505
- background-color: #1c1c1e;
1506
- border-radius: 0;
1507
- box-shadow: none;
1737
+ /* Glassmorphism effect */
1738
+ background: transparent;
1739
+ backdrop-filter: blur(3.8px);
1740
+ -webkit-backdrop-filter: blur(3.8px);
1741
+ border: 1px solid rgba(255, 255, 255, 0.25);
1742
+ border-radius: 16px;
1743
+ box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
1508
1744
  overflow: hidden;
1509
- transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
1745
+ transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
1510
1746
  position: relative;
1511
1747
 
1512
1748
  /* Default dimensions */
@@ -1589,67 +1825,84 @@ var Window = ({
1589
1825
  };
1590
1826
  Window.displayName = "Window";
1591
1827
  var GlobalSidebarStyles = styled4.createGlobalStyle`
1592
- /* Override CopilotKit's default positioning - start off-screen */
1828
+ /* Override CopilotKit's default positioning - keep sidebar container in place */
1593
1829
  .copilotKitSidebar {
1594
1830
  position: fixed !important;
1595
- right: -100vw !important;
1831
+ top: 0 !important;
1832
+ right: 0 !important;
1596
1833
  bottom: 0 !important;
1597
- transition: right 0.3s ease !important;
1834
+ left: 0 !important;
1835
+ width: 100vw !important;
1836
+ height: 100vh !important;
1837
+ pointer-events: none !important;
1838
+ z-index: 1001 !important;
1598
1839
  }
1599
1840
 
1600
- /* Move sidebar container into view when expanded */
1841
+ /* Keep sidebar container always visible (the window inside will animate) */
1601
1842
  .copilotKitSidebarContentWrapper.sidebarExpanded .copilotKitSidebar {
1602
- right: 0 !important;
1843
+ pointer-events: auto !important;
1603
1844
  }
1604
1845
 
1605
- /* Mobile-first: Full viewport sidebar */
1606
- .copilotKitSidebar .copilotKitWindow {
1846
+ /* Mobile-first: Glassmorphism sidebar with rounded corners */
1847
+ /* Target the actual dialog element that gets rendered */
1848
+ .copilotKitSidebar [role="dialog"] {
1607
1849
  /* Override CopilotKit defaults for mobile */
1608
1850
  position: fixed !important;
1609
- top: 0 !important;
1610
- right: 0 !important;
1611
- bottom: 0 !important;
1612
- left: auto !important;
1613
- width: 100vw !important;
1614
- height: 100vh !important;
1615
- max-width: 100vw !important;
1616
- max-height: 100vh !important;
1851
+ top: 10px !important;
1852
+ right: 10px !important;
1853
+ /* Reserve space for Android nav buttons - matches NavHorizontal approach */
1854
+ bottom: max(90px, env(safe-area-inset-bottom, 90px)) !important;
1855
+ left: 10px !important;
1856
+ width: calc(100vw - 20px) !important;
1857
+ /* Adjust height to account for bottom safe area */
1858
+ height: calc(100vh - 20px - max(80px, env(safe-area-inset-bottom, 80px))) !important;
1859
+ max-width: calc(100vw - 20px) !important;
1860
+ max-height: calc(100vh - 20px - max(80px, env(safe-area-inset-bottom, 80px))) !important;
1617
1861
  margin: 0 !important;
1618
- border-radius: 0 !important;
1862
+ border-radius: 16px !important;
1619
1863
  z-index: 1001 !important;
1620
1864
 
1621
- /* Hidden by default - translateX(100%) moves it off-screen to the right */
1865
+ /* Glassmorphism effect */
1866
+ background: rgba(255, 255, 255, 0.26) !important;
1867
+ box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
1868
+ backdrop-filter: blur(11.1px) !important;
1869
+ -webkit-backdrop-filter: blur(11.1px) !important;
1870
+ border: 1px solid rgba(255, 255, 255, 0.3) !important;
1871
+
1872
+ /* Smooth slide transition */
1873
+ transition: transform 0.3s ease, visibility 0.3s ease, opacity 0.3s ease !important;
1874
+ }
1875
+
1876
+ /* Hidden by default */
1877
+ .copilotKitSidebarContentWrapper:not(.sidebarExpanded) .copilotKitSidebar [role="dialog"] {
1622
1878
  transform: translateX(100%) !important;
1623
1879
  visibility: hidden !important;
1624
1880
  pointer-events: none !important;
1625
1881
  opacity: 0 !important;
1626
- display: none !important;
1627
-
1628
- /* Smooth slide transition */
1629
- transition: transform 0.3s ease, visibility 0.3s ease, opacity 0.3s ease !important;
1630
1882
  }
1631
1883
 
1632
- /* When window has .open class (CopilotKit's native class), show it */
1633
- .copilotKitSidebar .copilotKitWindow.open {
1634
- display: flex !important;
1884
+ /* Visible when expanded */
1885
+ .copilotKitSidebarContentWrapper.sidebarExpanded .copilotKitSidebar [role="dialog"] {
1635
1886
  transform: translateX(0) !important;
1636
1887
  visibility: visible !important;
1637
1888
  pointer-events: auto !important;
1638
1889
  opacity: 1 !important;
1639
1890
  }
1640
1891
 
1641
- /* Desktop: Sidebar panel on the right (640px = CopilotKit's breakpoint) */
1892
+ /* Desktop: Sidebar panel on the right with glassmorphism (640px = CopilotKit's breakpoint) */
1642
1893
  @media (min-width: 640px) {
1643
- .copilotKitSidebar .copilotKitWindow {
1894
+ .copilotKitSidebar [role="dialog"] {
1644
1895
  inset: auto !important;
1645
- top: 0 !important;
1646
- right: 0 !important;
1647
- bottom: 0 !important;
1896
+ top: 10px !important;
1897
+ right: 10px !important;
1898
+ /* Reserve space for Android nav buttons on desktop too */
1899
+ bottom: max(90px, env(safe-area-inset-bottom, 90px)) !important;
1648
1900
  left: auto !important;
1649
1901
  width: 28rem !important;
1650
- height: 100vh !important;
1902
+ /* Adjust height to account for bottom safe area */
1903
+ height: calc(100vh - 20px - max(80px, env(safe-area-inset-bottom, 80px))) !important;
1651
1904
  max-width: 28rem !important;
1652
- max-height: 100vh !important;
1905
+ max-height: calc(100vh - 20px - max(80px, env(safe-area-inset-bottom, 80px))) !important;
1653
1906
  }
1654
1907
  }
1655
1908
 
@@ -1668,6 +1921,74 @@ var GlobalSidebarStyles = styled4.createGlobalStyle`
1668
1921
  display: flex !important;
1669
1922
  }
1670
1923
  }
1924
+
1925
+ /* Fix messages container background */
1926
+ .copilotKitMessages {
1927
+ background-color: transparent !important;
1928
+ }
1929
+
1930
+ /* Fade-in animation for new messages */
1931
+ @keyframes messagesFadeIn {
1932
+ from {
1933
+ opacity: 0;
1934
+ transform: translateY(8px);
1935
+ }
1936
+ to {
1937
+ opacity: 1;
1938
+ transform: translateY(0);
1939
+ }
1940
+ }
1941
+
1942
+ .copilotKitMessage {
1943
+ animation: messagesFadeIn 0.3s ease-out;
1944
+ }
1945
+
1946
+ /* Override CopilotKit suggestions to be single-row with horizontal scroll */
1947
+ div[role="list"][aria-label*="Suggested"] {
1948
+ display: flex !important;
1949
+ flex-wrap: nowrap !important; /* Force single row */
1950
+ gap: 8px !important;
1951
+ padding: 4px 0 !important;
1952
+
1953
+ /* Horizontal scrolling */
1954
+ overflow-x: auto !important;
1955
+ overflow-y: hidden !important;
1956
+
1957
+ /* Smooth scrolling */
1958
+ -webkit-overflow-scrolling: touch;
1959
+ scroll-behavior: smooth;
1960
+
1961
+ /* Fixed height for one suggestion */
1962
+ max-height: 40px !important;
1963
+ min-height: 40px !important;
1964
+ align-items: center !important;
1965
+
1966
+ /* Hide scrollbar */
1967
+ scrollbar-width: none !important;
1968
+ -ms-overflow-style: none !important;
1969
+
1970
+ &::-webkit-scrollbar {
1971
+ display: none !important;
1972
+ }
1973
+ }
1974
+
1975
+ /* Ensure suggestion buttons don't wrap or shrink */
1976
+ div[role="list"][aria-label*="Suggested"] button {
1977
+ flex-shrink: 0 !important;
1978
+ white-space: nowrap !important;
1979
+ }
1980
+
1981
+ /* Remove teal/cyan outline from all inputs */
1982
+ .copilotKitSidebar input,
1983
+ .copilotKitSidebar input:focus,
1984
+ .copilotKitSidebar input:focus-visible,
1985
+ .copilotKitSidebar textarea,
1986
+ .copilotKitSidebar textarea:focus,
1987
+ .copilotKitSidebar textarea:focus-visible {
1988
+ outline: none !important;
1989
+ outline-color: transparent !important;
1990
+ box-shadow: none !important;
1991
+ }
1671
1992
  `;
1672
1993
  var StyledChatButton = styled4__default.default.button`
1673
1994
  position: fixed;
@@ -1677,8 +1998,8 @@ var StyledChatButton = styled4__default.default.button`
1677
1998
  height: 36px;
1678
1999
  border-radius: 18px;
1679
2000
  border: none;
1680
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
1681
- box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
2001
+ background: linear-gradient(135deg, #2CB0AB 0%, #459FB9 100%);
2002
+ box-shadow: 0 4px 12px rgba(44, 176, 171, 0.4);
1682
2003
  display: flex;
1683
2004
  align-items: center;
1684
2005
  justify-content: center;
@@ -1688,7 +2009,7 @@ var StyledChatButton = styled4__default.default.button`
1688
2009
 
1689
2010
  &:hover {
1690
2011
  transform: scale(1.05);
1691
- box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
2012
+ box-shadow: 0 6px 16px rgba(44, 176, 171, 0.5);
1692
2013
  }
1693
2014
 
1694
2015
  &:active {
@@ -1706,7 +2027,9 @@ function CustomCopilotSidebar({
1706
2027
  defaultOpen = false,
1707
2028
  onSetOpen,
1708
2029
  instructions,
1709
- className
2030
+ className,
2031
+ disabled = false,
2032
+ disabledReason = "Start a free trial to enable AI chat"
1710
2033
  }) {
1711
2034
  const HeaderAdapterWithClose = (_props) => {
1712
2035
  const { setOpen } = reactUi.useChatContext();
@@ -1714,36 +2037,34 @@ function CustomCopilotSidebar({
1714
2037
  setOpen(false);
1715
2038
  onSetOpen?.(false);
1716
2039
  };
1717
- return /* @__PURE__ */ jsxRuntime.jsx(Header, { title: "AI Assistant", subtitle: "How can I help you today?", onClose: handleClose });
2040
+ return /* @__PURE__ */ jsxRuntime.jsx(Header, { title: "AI Assistant", onClose: handleClose });
1718
2041
  };
1719
2042
  const WindowAdapterLocal = (props) => {
1720
2043
  return /* @__PURE__ */ jsxRuntime.jsx(Window, { children: props.children });
1721
2044
  };
1722
- const MessagesAdapter = (props) => {
1723
- return /* @__PURE__ */ jsxRuntime.jsx(Messages, { children: props.messages.map((message, index) => /* @__PURE__ */ jsxRuntime.jsx(
1724
- props.RenderMessage,
1725
- {
1726
- message,
1727
- inProgress: props.inProgress,
1728
- index,
1729
- isCurrentMessage: index === props.messages.length - 1
1730
- },
1731
- message.id || `message-${index}`
1732
- )) });
1733
- };
1734
2045
  const CustomButton = (_props) => {
1735
2046
  const { open, setOpen } = reactUi.useChatContext();
1736
2047
  const handleClick = () => {
2048
+ if (disabled) return;
1737
2049
  const newOpenState = !open;
1738
2050
  setOpen(newOpenState);
1739
2051
  onSetOpen?.(newOpenState);
1740
2052
  };
2053
+ const disabledStyles = disabled ? {
2054
+ background: "rgba(100, 100, 100, 0.5)",
2055
+ boxShadow: "none",
2056
+ cursor: "not-allowed",
2057
+ opacity: 0.6
2058
+ } : {};
1741
2059
  return /* @__PURE__ */ jsxRuntime.jsx(
1742
2060
  StyledChatButton,
1743
2061
  {
1744
2062
  onClick: handleClick,
1745
- "aria-label": open ? "Close chat" : "Open chat",
2063
+ "aria-label": disabled ? disabledReason : open ? "Close chat" : "Open chat",
2064
+ "aria-disabled": disabled,
2065
+ title: disabled ? disabledReason : void 0,
1746
2066
  type: "button",
2067
+ style: disabledStyles,
1747
2068
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1748
2069
  "svg",
1749
2070
  {
@@ -1753,7 +2074,8 @@ function CustomCopilotSidebar({
1753
2074
  fill: "currentColor",
1754
2075
  xmlns: "http://www.w3.org/2000/svg",
1755
2076
  role: "img",
1756
- "aria-label": "Chat icon",
2077
+ "aria-hidden": "true",
2078
+ style: disabled ? { fill: "rgba(255, 255, 255, 0.5)" } : void 0,
1757
2079
  children: [
1758
2080
  /* @__PURE__ */ jsxRuntime.jsx("title", { children: "Chat" }),
1759
2081
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z" })
@@ -1773,7 +2095,6 @@ function CustomCopilotSidebar({
1773
2095
  Input: InputAdapter,
1774
2096
  Header: HeaderAdapterWithClose,
1775
2097
  Window: WindowAdapterLocal,
1776
- Messages: MessagesAdapter,
1777
2098
  Button: CustomButton,
1778
2099
  instructions,
1779
2100
  labels: {
@@ -1888,18 +2209,20 @@ var InputWrapper2 = styled4__default.default.div`
1888
2209
  align-items: flex-end;
1889
2210
  gap: 8px;
1890
2211
  padding: 12px;
1891
- background-color: #ffffff;
1892
- border: 1px solid #e5e7eb;
2212
+ background-color: rgba(25, 25, 25, 0.6);
2213
+ backdrop-filter: blur(10px);
2214
+ -webkit-backdrop-filter: blur(10px);
2215
+ border: 1px solid rgba(58, 58, 60, 0.3);
1893
2216
  border-radius: 12px;
1894
2217
  transition: all 0.2s ease;
1895
2218
 
1896
2219
  &:focus-within {
1897
- border-color: #3b82f6;
1898
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
2220
+ /* Subtle focus indication without bold colored border */
2221
+ border-color: rgba(255, 255, 255, 0.3);
1899
2222
  }
1900
2223
 
1901
2224
  &:hover:not(:focus-within) {
1902
- border-color: #d1d5db;
2225
+ border-color: rgba(58, 58, 60, 0.5);
1903
2226
  }
1904
2227
  `;
1905
2228
  var TextArea = styled4__default.default.textarea`
@@ -1914,12 +2237,12 @@ var TextArea = styled4__default.default.textarea`
1914
2237
  'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
1915
2238
  font-size: 14px;
1916
2239
  line-height: 24px;
1917
- color: #111827;
2240
+ color: #FFFFFF;
1918
2241
  background: transparent;
1919
2242
  overflow-y: auto;
1920
2243
 
1921
2244
  &::placeholder {
1922
- color: #9ca3af;
2245
+ color: #8e8e93;
1923
2246
  }
1924
2247
 
1925
2248
  &:disabled {
@@ -1958,14 +2281,14 @@ var SendButton = styled4__default.default.button`
1958
2281
  padding: 0;
1959
2282
  border: none;
1960
2283
  border-radius: 8px;
1961
- background-color: ${(props) => props.disabled ? "#e5e7eb" : "#3b82f6"};
1962
- color: ${(props) => props.disabled ? "#9ca3af" : "#ffffff"};
2284
+ background-color: ${(props) => props.disabled ? "rgba(229, 231, 235, 0.3)" : "#2CB0AB"};
2285
+ color: ${(props) => props.disabled ? "#6B7280" : "#ffffff"};
1963
2286
  cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
1964
2287
  transition: all 0.2s ease;
1965
2288
  flex-shrink: 0;
1966
2289
 
1967
2290
  &:hover:not(:disabled) {
1968
- background-color: #2563eb;
2291
+ background-color: #459FB9;
1969
2292
  transform: translateY(-1px);
1970
2293
  }
1971
2294
 
@@ -1974,8 +2297,7 @@ var SendButton = styled4__default.default.button`
1974
2297
  }
1975
2298
 
1976
2299
  &:focus-visible {
1977
- outline: 2px solid #3b82f6;
1978
- outline-offset: 2px;
2300
+ outline: none;
1979
2301
  }
1980
2302
 
1981
2303
  svg {
@@ -2079,6 +2401,34 @@ var Input = ({
2079
2401
  )
2080
2402
  ] }) });
2081
2403
  };
2404
+ var MessagesContainer = styled4__default.default.div`
2405
+ display: flex;
2406
+ flex-direction: column;
2407
+ flex: 1;
2408
+ overflow: hidden;
2409
+ /* Gradient background with subtle purple accent */
2410
+ background-image: linear-gradient(to right bottom, #302c4c, #26273d, #1e202d, #191a1e, #171a21, #141a24, #0f1b27, #081b2a, #081b2a, #081b2a);
2411
+ padding: 8px;
2412
+ gap: 12px;
2413
+ box-sizing: border-box;
2414
+
2415
+ /* Ensure proper scrolling behavior for child components */
2416
+ position: relative;
2417
+ min-height: 0;
2418
+
2419
+ /* Desktop padding */
2420
+ @media (min-width: 640px) {
2421
+ padding: 12px;
2422
+ }
2423
+ `;
2424
+ var Messages = ({
2425
+ children,
2426
+ className,
2427
+ ariaLabel = "Messages"
2428
+ }) => {
2429
+ return /* @__PURE__ */ jsxRuntime.jsx(MessagesContainer, { className, role: "region", "aria-label": ariaLabel, children });
2430
+ };
2431
+ Messages.displayName = "Messages";
2082
2432
  var MessagesListContainer = styled4__default.default.div`
2083
2433
  display: flex;
2084
2434
  flex-direction: column;
@@ -2248,22 +2598,15 @@ var MessageBubble = styled4__default.default.div`
2248
2598
  flex-direction: column;
2249
2599
  max-width: 70%;
2250
2600
  padding: 12px 16px;
2251
- border-radius: 18px 18px 4px 18px;
2601
+ border-radius: 12px; /* Consistent rounded corners, no tail */
2252
2602
 
2253
- /* User message colors - distinct from assistant messages */
2254
- background-color: #007AFF;
2255
- color: #FFFFFF;
2256
-
2257
- /* Box shadow for depth */
2258
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
2603
+ /* User message colors - dark blue from brand */
2604
+ background: #264E68; /* Deep Blue from brand tokens */
2605
+ color: #FFFFFF; /* White text for better contrast on dark background */
2259
2606
 
2260
2607
  /* Smooth transitions */
2261
2608
  transition: all 0.2s ease-in-out;
2262
2609
 
2263
- &:hover {
2264
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
2265
- }
2266
-
2267
2610
  /* Username styling */
2268
2611
  strong {
2269
2612
  font-size: 12px;
@@ -2279,40 +2622,127 @@ var MessageContent2 = styled4__default.default.p`
2279
2622
  word-wrap: break-word;
2280
2623
  white-space: pre-wrap;
2281
2624
  `;
2282
- var MessageTime = styled4__default.default.time`
2625
+ var MessageTime2 = styled4__default.default.time`
2283
2626
  font-size: 11px;
2284
2627
  opacity: 0.7;
2285
2628
  margin-top: 4px;
2286
2629
  text-align: right;
2287
2630
  `;
2631
+ var ActionButton3 = styled4__default.default.button`
2632
+ display: inline-flex;
2633
+ align-items: center;
2634
+ gap: 4px;
2635
+ padding: 4px 8px;
2636
+ margin-top: 8px;
2637
+ font-size: 12px;
2638
+ font-weight: 500;
2639
+ color: rgba(0, 0, 0, 0.7);
2640
+ background: rgba(255, 255, 255, 0.3);
2641
+ border: 1px solid rgba(0, 0, 0, 0.1);
2642
+ border-radius: 6px;
2643
+ cursor: pointer;
2644
+ transition: all 0.15s ease-in-out;
2645
+
2646
+ &:hover {
2647
+ background: rgba(255, 255, 255, 0.5);
2648
+ border-color: rgba(0, 0, 0, 0.2);
2649
+ }
2650
+
2651
+ &:active {
2652
+ transform: scale(0.98);
2653
+ }
2654
+ `;
2655
+ var ActionsContainer3 = styled4__default.default.div`
2656
+ display: flex;
2657
+ gap: 6px;
2658
+ flex-wrap: wrap;
2659
+ `;
2660
+ var StreamingIndicator2 = styled4__default.default.span`
2661
+ display: inline-block;
2662
+ width: 4px;
2663
+ height: 4px;
2664
+ margin-left: 4px;
2665
+ background-color: rgba(0, 0, 0, 0.5);
2666
+ border-radius: 50%;
2667
+ animation: pulse 1.5s ease-in-out infinite;
2668
+
2669
+ @keyframes pulse {
2670
+ 0%,
2671
+ 100% {
2672
+ opacity: 0.3;
2673
+ transform: scale(0.8);
2674
+ }
2675
+ 50% {
2676
+ opacity: 1;
2677
+ transform: scale(1.2);
2678
+ }
2679
+ }
2680
+ `;
2681
+ var Avatar3 = styled4__default.default.img`
2682
+ width: 32px;
2683
+ height: 32px;
2684
+ border-radius: 50%;
2685
+ margin-left: 8px;
2686
+ object-fit: cover;
2687
+ border: 2px solid rgba(216, 180, 254, 0.3);
2688
+ `;
2288
2689
  var UserMessage2 = ({
2289
2690
  content,
2290
2691
  timestamp,
2291
2692
  className,
2292
2693
  avatarUrl,
2293
- username
2694
+ username,
2695
+ isStreaming = false,
2696
+ actions = []
2294
2697
  }) => {
2295
2698
  return /* @__PURE__ */ jsxRuntime.jsxs(StyledUserMessage2, { className, children: [
2296
2699
  /* @__PURE__ */ jsxRuntime.jsxs(MessageBubble, { children: [
2297
2700
  username && /* @__PURE__ */ jsxRuntime.jsx("strong", { children: username }),
2298
- /* @__PURE__ */ jsxRuntime.jsx(MessageContent2, { children: content }),
2299
- timestamp && /* @__PURE__ */ jsxRuntime.jsx(MessageTime, { children: timestamp })
2701
+ /* @__PURE__ */ jsxRuntime.jsxs(MessageContent2, { children: [
2702
+ content,
2703
+ isStreaming && /* @__PURE__ */ jsxRuntime.jsx(StreamingIndicator2, {})
2704
+ ] }),
2705
+ timestamp && /* @__PURE__ */ jsxRuntime.jsx(MessageTime2, { children: timestamp }),
2706
+ actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ActionsContainer3, { children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsxs(ActionButton3, { onClick: action.onClick, children: [
2707
+ action.icon,
2708
+ action.label
2709
+ ] }, index)) })
2300
2710
  ] }),
2301
- avatarUrl && /* @__PURE__ */ jsxRuntime.jsx(
2302
- "img",
2303
- {
2304
- src: avatarUrl,
2305
- alt: username || "User",
2306
- style: { width: "32px", height: "32px", borderRadius: "50%", marginLeft: "8px" }
2307
- }
2308
- )
2711
+ avatarUrl && /* @__PURE__ */ jsxRuntime.jsx(Avatar3, { src: avatarUrl, alt: username || "User" })
2309
2712
  ] });
2310
2713
  };
2311
2714
  var SuggestionsContainer = styled4__default.default.div`
2312
2715
  display: flex;
2313
- flex-wrap: wrap;
2716
+ flex-wrap: nowrap; /* Single row */
2314
2717
  gap: ${({ theme }) => theme?.spacing?.sm ?? "8px"};
2315
- padding: ${({ theme }) => theme?.spacing?.md ?? "16px"} 0;
2718
+
2719
+ /* Reduced padding for tighter height */
2720
+ padding: ${({ theme }) => theme?.spacing?.xs ?? "4px"} 0;
2721
+
2722
+ /* Horizontal scrolling */
2723
+ overflow-x: auto;
2724
+ overflow-y: hidden;
2725
+
2726
+ /* Smooth scrolling on mobile */
2727
+ -webkit-overflow-scrolling: touch;
2728
+ scroll-behavior: smooth;
2729
+
2730
+ /* Align items to ensure single-row height */
2731
+ align-items: center;
2732
+
2733
+ /* Constrain to exact height of buttons + minimal padding */
2734
+ /* Button height: ~14px font + 16px padding + 2px border = ~32px */
2735
+ /* Add small padding: 8px total = 40px */
2736
+ max-height: 40px;
2737
+ min-height: 40px;
2738
+
2739
+ /* Hide scrollbar but keep functionality */
2740
+ scrollbar-width: none; /* Firefox */
2741
+ -ms-overflow-style: none; /* IE/Edge */
2742
+
2743
+ &::-webkit-scrollbar {
2744
+ display: none; /* Chrome/Safari/Opera */
2745
+ }
2316
2746
  `;
2317
2747
  var StyledSuggestion = styled4__default.default.button`
2318
2748
  /* Base styles */
@@ -2331,6 +2761,7 @@ var StyledSuggestion = styled4__default.default.button`
2331
2761
  transition: all 0.2s ease-in-out;
2332
2762
  white-space: nowrap;
2333
2763
  user-select: none;
2764
+ flex-shrink: 0; /* Prevent shrinking to maintain size */
2334
2765
 
2335
2766
  /* Hover state */
2336
2767
  &:hover:not(:disabled) {
@@ -2386,6 +2817,324 @@ function SuggestionChip({ suggestion, onSelect }) {
2386
2817
  return /* @__PURE__ */ jsxRuntime.jsx(StyledSuggestion, { ...buttonProps, ref, $isPressed: isPressed, role: "listitem", children: suggestion });
2387
2818
  }
2388
2819
  Suggestions.displayName = "Suggestions";
2820
+ var ErrorContainer = styled4__default.default.div`
2821
+ display: flex;
2822
+ align-items: flex-start;
2823
+ gap: 12px;
2824
+ padding: ${(props) => props.variant === "banner" ? "16px" : "12px 16px"};
2825
+ background-color: ${(props) => props.variant === "banner" ? "rgba(239, 68, 68, 0.1)" : "rgba(239, 68, 68, 0.05)"};
2826
+ border: 1px solid rgba(239, 68, 68, 0.3);
2827
+ border-radius: ${(props) => props.variant === "banner" ? "8px" : "12px"};
2828
+ color: #FFFFFF;
2829
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
2830
+ 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
2831
+ margin: 8px 0;
2832
+ width: ${(props) => props.variant === "banner" ? "100%" : "auto"};
2833
+ max-width: ${(props) => props.variant === "banner" ? "100%" : "600px"};
2834
+ `;
2835
+ var IconContainer = styled4__default.default.div`
2836
+ flex-shrink: 0;
2837
+ width: 20px;
2838
+ height: 20px;
2839
+ color: #EF4444;
2840
+ `;
2841
+ var ErrorIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
2842
+ "svg",
2843
+ {
2844
+ xmlns: "http://www.w3.org/2000/svg",
2845
+ viewBox: "0 0 24 24",
2846
+ fill: "currentColor",
2847
+ width: "20",
2848
+ height: "20",
2849
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" })
2850
+ }
2851
+ );
2852
+ var Content2 = styled4__default.default.div`
2853
+ flex: 1;
2854
+ display: flex;
2855
+ flex-direction: column;
2856
+ gap: 8px;
2857
+ `;
2858
+ var ErrorMessage = styled4__default.default.div`
2859
+ font-size: 14px;
2860
+ line-height: 1.5;
2861
+ color: #FFFFFF;
2862
+ `;
2863
+ var ErrorDetails = styled4__default.default.div`
2864
+ font-size: 12px;
2865
+ line-height: 1.4;
2866
+ color: #9CA3AF;
2867
+ margin-top: 4px;
2868
+ `;
2869
+ var Actions2 = styled4__default.default.div`
2870
+ display: flex;
2871
+ gap: 8px;
2872
+ margin-top: 8px;
2873
+ `;
2874
+ var Button2 = styled4__default.default.button`
2875
+ display: inline-flex;
2876
+ align-items: center;
2877
+ gap: 6px;
2878
+ padding: 6px 12px;
2879
+ font-size: 13px;
2880
+ font-weight: 500;
2881
+ color: ${(props) => props.variant === "primary" ? "#FFFFFF" : "#9CA3AF"};
2882
+ background: ${(props) => props.variant === "primary" ? "#EF4444" : "rgba(255, 255, 255, 0.05)"};
2883
+ border: 1px solid
2884
+ ${(props) => props.variant === "primary" ? "#EF4444" : "rgba(255, 255, 255, 0.1)"};
2885
+ border-radius: 6px;
2886
+ cursor: pointer;
2887
+ transition: all 0.15s ease-in-out;
2888
+
2889
+ &:hover {
2890
+ background: ${(props) => props.variant === "primary" ? "#DC2626" : "rgba(255, 255, 255, 0.1)"};
2891
+ border-color: ${(props) => props.variant === "primary" ? "#DC2626" : "rgba(255, 255, 255, 0.2)"};
2892
+ }
2893
+
2894
+ &:active {
2895
+ transform: scale(0.98);
2896
+ }
2897
+
2898
+ &:disabled {
2899
+ opacity: 0.5;
2900
+ cursor: not-allowed;
2901
+ }
2902
+ `;
2903
+ var CloseButton = styled4__default.default.button`
2904
+ flex-shrink: 0;
2905
+ width: 24px;
2906
+ height: 24px;
2907
+ padding: 0;
2908
+ display: flex;
2909
+ align-items: center;
2910
+ justify-content: center;
2911
+ background: transparent;
2912
+ border: none;
2913
+ color: #9CA3AF;
2914
+ cursor: pointer;
2915
+ border-radius: 4px;
2916
+ transition: all 0.15s ease-in-out;
2917
+
2918
+ &:hover {
2919
+ background: rgba(255, 255, 255, 0.1);
2920
+ color: #FFFFFF;
2921
+ }
2922
+
2923
+ &:active {
2924
+ transform: scale(0.95);
2925
+ }
2926
+ `;
2927
+ var CloseIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "16", height: "16", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) });
2928
+ var StreamErrorMessage = ({
2929
+ error,
2930
+ variant = "inline",
2931
+ retryable = false,
2932
+ onRetry,
2933
+ onDismiss,
2934
+ details,
2935
+ className
2936
+ }) => {
2937
+ const errorMessage = typeof error === "string" ? error : error.message;
2938
+ return /* @__PURE__ */ jsxRuntime.jsxs(ErrorContainer, { variant, className, role: "alert", "aria-live": "assertive", children: [
2939
+ /* @__PURE__ */ jsxRuntime.jsx(IconContainer, { "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {}) }),
2940
+ /* @__PURE__ */ jsxRuntime.jsxs(Content2, { children: [
2941
+ /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { children: errorMessage }),
2942
+ details && /* @__PURE__ */ jsxRuntime.jsx(ErrorDetails, { children: details }),
2943
+ (retryable || onDismiss) && /* @__PURE__ */ jsxRuntime.jsxs(Actions2, { children: [
2944
+ retryable && onRetry && /* @__PURE__ */ jsxRuntime.jsx(Button2, { variant: "primary", onClick: onRetry, children: "Retry" }),
2945
+ onDismiss && /* @__PURE__ */ jsxRuntime.jsx(Button2, { variant: "secondary", onClick: onDismiss, children: "Dismiss" })
2946
+ ] })
2947
+ ] }),
2948
+ onDismiss && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onDismiss, "aria-label": "Dismiss error", children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) })
2949
+ ] });
2950
+ };
2951
+ StreamErrorMessage.displayName = "StreamErrorMessage";
2952
+ var pulse2 = styled4.keyframes`
2953
+ 0%, 100% {
2954
+ opacity: 1;
2955
+ transform: scale(1);
2956
+ }
2957
+ 50% {
2958
+ opacity: 0.6;
2959
+ transform: scale(1.1);
2960
+ }
2961
+ `;
2962
+ var Container3 = styled4__default.default.div`
2963
+ display: inline-flex;
2964
+ align-items: center;
2965
+ gap: ${(props) => {
2966
+ switch (props.size) {
2967
+ case "sm":
2968
+ return "4px";
2969
+ case "lg":
2970
+ return "8px";
2971
+ case "md":
2972
+ default:
2973
+ return "6px";
2974
+ }
2975
+ }};
2976
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
2977
+ 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
2978
+ `;
2979
+ var StatusDot = styled4__default.default.div`
2980
+ width: ${(props) => {
2981
+ if (props.variant === "badge") {
2982
+ switch (props.size) {
2983
+ case "sm":
2984
+ return "6px";
2985
+ case "lg":
2986
+ return "10px";
2987
+ case "md":
2988
+ default:
2989
+ return "8px";
2990
+ }
2991
+ }
2992
+ switch (props.size) {
2993
+ case "sm":
2994
+ return "6px";
2995
+ case "lg":
2996
+ return "12px";
2997
+ case "md":
2998
+ default:
2999
+ return "8px";
3000
+ }
3001
+ }};
3002
+ height: ${(props) => {
3003
+ if (props.variant === "badge") {
3004
+ switch (props.size) {
3005
+ case "sm":
3006
+ return "6px";
3007
+ case "lg":
3008
+ return "10px";
3009
+ case "md":
3010
+ default:
3011
+ return "8px";
3012
+ }
3013
+ }
3014
+ switch (props.size) {
3015
+ case "sm":
3016
+ return "6px";
3017
+ case "lg":
3018
+ return "12px";
3019
+ case "md":
3020
+ default:
3021
+ return "8px";
3022
+ }
3023
+ }};
3024
+ border-radius: 50%;
3025
+ background-color: ${(props) => {
3026
+ switch (props.status) {
3027
+ case "connected":
3028
+ return "#10B981";
3029
+ // Green
3030
+ case "streaming":
3031
+ return "#3B82F6";
3032
+ // Blue
3033
+ case "disconnected":
3034
+ return "#EF4444";
3035
+ // Red
3036
+ case "reconnecting":
3037
+ return "#F59E0B";
3038
+ }
3039
+ }};
3040
+ animation: ${(props) => props.status === "streaming" ? pulse2 : "none"} 2s ease-in-out infinite;
3041
+ flex-shrink: 0;
3042
+ `;
3043
+ var Label = styled4__default.default.span`
3044
+ font-size: ${(props) => {
3045
+ if (props.variant === "badge") {
3046
+ switch (props.size) {
3047
+ case "sm":
3048
+ return "11px";
3049
+ case "lg":
3050
+ return "15px";
3051
+ case "md":
3052
+ default:
3053
+ return "13px";
3054
+ }
3055
+ }
3056
+ switch (props.size) {
3057
+ case "sm":
3058
+ return "12px";
3059
+ case "lg":
3060
+ return "16px";
3061
+ case "md":
3062
+ default:
3063
+ return "14px";
3064
+ }
3065
+ }};
3066
+ font-weight: ${(props) => props.variant === "badge" ? "500" : "400"};
3067
+ color: #9CA3AF;
3068
+ line-height: 1.4;
3069
+ `;
3070
+ var BadgeContainer = styled4__default.default.div`
3071
+ display: inline-flex;
3072
+ align-items: center;
3073
+ gap: ${(props) => {
3074
+ switch (props.size) {
3075
+ case "sm":
3076
+ return "4px";
3077
+ case "lg":
3078
+ return "8px";
3079
+ case "md":
3080
+ default:
3081
+ return "6px";
3082
+ }
3083
+ }};
3084
+ padding: ${(props) => {
3085
+ switch (props.size) {
3086
+ case "sm":
3087
+ return "4px 8px";
3088
+ case "lg":
3089
+ return "8px 16px";
3090
+ case "md":
3091
+ default:
3092
+ return "6px 12px";
3093
+ }
3094
+ }};
3095
+ background-color: rgba(255, 255, 255, 0.05);
3096
+ border: 1px solid rgba(255, 255, 255, 0.1);
3097
+ border-radius: ${(props) => {
3098
+ switch (props.size) {
3099
+ case "sm":
3100
+ return "4px";
3101
+ case "lg":
3102
+ return "8px";
3103
+ case "md":
3104
+ default:
3105
+ return "6px";
3106
+ }
3107
+ }};
3108
+ `;
3109
+ var getStatusLabel = (status) => {
3110
+ switch (status) {
3111
+ case "connected":
3112
+ return "Connected";
3113
+ case "streaming":
3114
+ return "Streaming";
3115
+ case "disconnected":
3116
+ return "Disconnected";
3117
+ case "reconnecting":
3118
+ return "Reconnecting...";
3119
+ }
3120
+ };
3121
+ var StreamStatusIndicator = ({
3122
+ status,
3123
+ variant = "dot",
3124
+ size = "md",
3125
+ showLabel = false,
3126
+ className
3127
+ }) => {
3128
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3129
+ /* @__PURE__ */ jsxRuntime.jsx(StatusDot, { status, size, variant, "aria-hidden": "true" }),
3130
+ showLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { size, variant, children: getStatusLabel(status) })
3131
+ ] });
3132
+ if (variant === "badge") {
3133
+ return /* @__PURE__ */ jsxRuntime.jsx(BadgeContainer, { size, className, role: "status", "aria-label": getStatusLabel(status), children: content });
3134
+ }
3135
+ return /* @__PURE__ */ jsxRuntime.jsx(Container3, { size, className, role: "status", "aria-label": getStatusLabel(status), children: content });
3136
+ };
3137
+ StreamStatusIndicator.displayName = "StreamStatusIndicator";
2389
3138
  var GlobalSidebarStyles2 = styled4.createGlobalStyle`
2390
3139
  /* Override CopilotKit's default positioning - start off-screen */
2391
3140
  .copilotKitSidebar {
@@ -2642,6 +3391,9 @@ exports.MessagesList = MessagesList;
2642
3391
  exports.MessagesListContainer = MessagesListContainer;
2643
3392
  exports.MessagesListContent = MessagesListContent;
2644
3393
  exports.Response = Response;
3394
+ exports.StreamErrorMessage = StreamErrorMessage;
3395
+ exports.StreamStatusIndicator = StreamStatusIndicator;
3396
+ exports.StreamingText = StreamingText2;
2645
3397
  exports.Suggestions = Suggestions;
2646
3398
  exports.UserMessage = UserMessage2;
2647
3399
  exports.UserMessageAdapter = UserMessageAdapter;