@agentiffai/design 1.3.18 → 1.3.20

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.
@@ -1,6 +1,6 @@
1
1
  import { useButton } from '@react-aria/button';
2
- import { memo, useRef, useEffect, useMemo, useState, useCallback } from 'react';
3
- import styled8, { css, keyframes, createGlobalStyle } from 'styled-components';
2
+ import React, { memo, useRef, useEffect, useMemo, useState, useCallback } from 'react';
3
+ import styled9, { css, keyframes, createGlobalStyle } from 'styled-components';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
5
  import { useCopilotChat } from '@copilotkit/react-core';
6
6
  import { CopilotSidebar, useChatContext } from '@copilotkit/react-ui';
@@ -248,7 +248,7 @@ var sizeStyles = {
248
248
  height: 44px;
249
249
  `
250
250
  };
251
- var StyledButton = styled8.button`
251
+ var StyledButton = styled9.button`
252
252
  /* Base styles */
253
253
  display: inline-flex;
254
254
  align-items: center;
@@ -331,7 +331,7 @@ function Button({
331
331
  );
332
332
  }
333
333
  Button.displayName = "Button";
334
- var ActionsContainer = styled8.div`
334
+ var ActionsContainer = styled9.div`
335
335
  display: flex;
336
336
  gap: ${tokens.spacing.sm};
337
337
  align-items: center;
@@ -391,7 +391,7 @@ var blink = keyframes`
391
391
  opacity: 0;
392
392
  }
393
393
  `;
394
- var ResponseContainer = styled8.div`
394
+ var ResponseContainer = styled9.div`
395
395
  display: inline-flex;
396
396
  align-items: center;
397
397
  gap: ${tokens.spacing.sm};
@@ -403,13 +403,13 @@ var ResponseContainer = styled8.div`
403
403
  max-width: fit-content;
404
404
  margin: 0 auto;
405
405
  `;
406
- var LoadingDots = styled8.div`
406
+ var LoadingDots = styled9.div`
407
407
  display: flex;
408
408
  align-items: center;
409
409
  gap: ${tokens.spacing.xs};
410
410
  padding: 0 ${tokens.spacing.xs};
411
411
  `;
412
- var Dot = styled8.span`
412
+ var Dot = styled9.span`
413
413
  width: ${tokens.spacing.xs};
414
414
  height: ${tokens.spacing.xs};
415
415
  border-radius: ${tokens.borderRadius.full};
@@ -417,7 +417,7 @@ var Dot = styled8.span`
417
417
  animation: ${dotPulse} 1.4s ease-in-out infinite;
418
418
  animation-delay: ${(props) => props.delay}s;
419
419
  `;
420
- var TypingIndicator = styled8.div`
420
+ var TypingIndicator = styled9.div`
421
421
  display: flex;
422
422
  align-items: center;
423
423
  gap: ${tokens.spacing.xs};
@@ -430,14 +430,14 @@ var TypingIndicator = styled8.div`
430
430
  animation: ${dotPulse} 1.4s ease-in-out infinite;
431
431
  }
432
432
  `;
433
- var Message = styled8.span`
433
+ var Message = styled9.span`
434
434
  font-size: ${tokens.typography.fontSize.sm};
435
435
  color: ${tokens.colors.text.primary};
436
436
  font-weight: ${tokens.typography.fontWeight.regular};
437
437
  line-height: ${tokens.typography.lineHeight.normal};
438
438
  white-space: nowrap;
439
439
  `;
440
- var StreamingText = styled8.div`
440
+ var StreamingText = styled9.div`
441
441
  font-size: ${tokens.typography.fontSize.sm};
442
442
  line-height: ${tokens.typography.lineHeight.normal};
443
443
  color: ${tokens.colors.text.primary};
@@ -509,7 +509,7 @@ var shake = keyframes`
509
509
  transform: translateX(5px);
510
510
  }
511
511
  `;
512
- var AgentStateContainer = styled8.div`
512
+ var AgentStateContainer = styled9.div`
513
513
  display: inline-flex;
514
514
  flex-direction: column;
515
515
  align-items: center;
@@ -523,35 +523,35 @@ var AgentStateContainer = styled8.div`
523
523
  max-width: fit-content;
524
524
  margin: 0 auto;
525
525
  `;
526
- var StateContent = styled8.div`
526
+ var StateContent = styled9.div`
527
527
  display: flex;
528
528
  flex-direction: column;
529
529
  gap: ${tokens.spacing.sm};
530
530
  align-items: center;
531
531
  width: 100%;
532
532
  `;
533
- var IdleIndicator = styled8.div`
533
+ var IdleIndicator = styled9.div`
534
534
  width: ${tokens.spacing.xs};
535
535
  height: ${tokens.spacing.xs};
536
536
  background-color: ${tokens.colors.status.idle};
537
537
  border-radius: ${tokens.borderRadius.full};
538
538
  animation: ${dotPulse2} 2s infinite ease-in-out;
539
539
  `;
540
- var ErrorIndicator = styled8.div`
540
+ var ErrorIndicator = styled9.div`
541
541
  width: ${tokens.spacing.xs};
542
542
  height: ${tokens.spacing.xs};
543
543
  background-color: ${tokens.colors.error};
544
544
  border-radius: ${tokens.borderRadius.full};
545
545
  animation: ${shake} 0.5s ease-in-out;
546
546
  `;
547
- var StateLabel = styled8.span`
547
+ var StateLabel = styled9.span`
548
548
  font-size: ${tokens.typography.fontSize.sm};
549
549
  font-weight: ${tokens.typography.fontWeight.regular};
550
550
  color: ${tokens.colors.text.primary};
551
551
  line-height: ${tokens.typography.lineHeight.normal};
552
552
  white-space: nowrap;
553
553
  `;
554
- styled8.p`
554
+ styled9.p`
555
555
  font-size: ${tokens.typography.fontSize.sm};
556
556
  color: ${tokens.colors.text.tertiary};
557
557
  line-height: ${tokens.typography.lineHeight.normal};
@@ -559,7 +559,7 @@ styled8.p`
559
559
  text-align: center;
560
560
  white-space: nowrap;
561
561
  `;
562
- var ProgressBar = styled8.div`
562
+ var ProgressBar = styled9.div`
563
563
  width: 100%;
564
564
  height: ${tokens.spacing.xs};
565
565
  background-color: ${tokens.colors.surface.elevated};
@@ -567,7 +567,7 @@ var ProgressBar = styled8.div`
567
567
  overflow: hidden;
568
568
  margin-top: ${tokens.spacing.xs};
569
569
  `;
570
- var ProgressBarFill = styled8.div`
570
+ var ProgressBarFill = styled9.div`
571
571
  height: 100%;
572
572
  width: ${(props) => Math.min(Math.max(props.progress, 0), 100)}%;
573
573
  background: linear-gradient(135deg, ${tokens.colors.accent} 0%, ${tokens.colors.primary} 100%);
@@ -596,11 +596,11 @@ var AgentState = ({ state, message, progress, className }) => {
596
596
  }
597
597
  return null;
598
598
  };
599
- var Container = styled8.div`
599
+ var Container = styled9.div`
600
600
  margin: ${tokens.spacing.sm} 0;
601
601
  padding: 0 ${tokens.spacing.sm};
602
602
  `;
603
- var ToolName = styled8.div`
603
+ var ToolName = styled9.div`
604
604
  font-size: ${tokens.typography.fontSize.xs};
605
605
  color: ${tokens.colors.text.tertiary};
606
606
  margin-bottom: ${tokens.spacing.xs};
@@ -707,7 +707,7 @@ var getSizeValue = (size = "md") => {
707
707
  };
708
708
  }
709
709
  };
710
- var Container2 = styled8.div`
710
+ var Container2 = styled9.div`
711
711
  display: inline-flex;
712
712
  align-items: center;
713
713
  gap: ${tokens.spacing.md};
@@ -719,7 +719,7 @@ var Container2 = styled8.div`
719
719
  max-width: fit-content;
720
720
  margin: 0 auto;
721
721
  `;
722
- var Avatar = styled8.div`
722
+ var Avatar = styled9.div`
723
723
  width: ${(props) => getSizeValue(props.size).avatar};
724
724
  height: ${(props) => getSizeValue(props.size).avatar};
725
725
  border-radius: ${tokens.borderRadius.full};
@@ -730,23 +730,23 @@ var Avatar = styled8.div`
730
730
  flex-shrink: 0;
731
731
  box-shadow: ${tokens.shadows.glow.primary};
732
732
  `;
733
- var HeadphonesIcon = styled8.svg`
733
+ var HeadphonesIcon = styled9.svg`
734
734
  width: ${(props) => getSizeValue(props.size).icon};
735
735
  height: ${(props) => getSizeValue(props.size).icon};
736
736
  color: ${tokens.colors.text.primary};
737
737
  `;
738
- var Content = styled8.div`
738
+ var Content = styled9.div`
739
739
  display: flex;
740
740
  align-items: center;
741
741
  gap: ${tokens.spacing.sm};
742
742
  `;
743
- var LoadingDots2 = styled8.div`
743
+ var LoadingDots2 = styled9.div`
744
744
  display: flex;
745
745
  align-items: center;
746
746
  gap: ${(props) => props.variant === "wave" ? "2px" : `${tokens.spacing.xs}`};
747
747
  padding: 0 ${tokens.spacing.xs};
748
748
  `;
749
- var Dot2 = styled8.span`
749
+ var Dot2 = styled9.span`
750
750
  width: ${(props) => getSizeValue(props.size).dotSize};
751
751
  height: ${(props) => getSizeValue(props.size).dotSize};
752
752
  border-radius: ${tokens.borderRadius.full};
@@ -764,7 +764,7 @@ var Dot2 = styled8.span`
764
764
  }}
765
765
  1.4s ease-in-out infinite;
766
766
  `;
767
- var Message2 = styled8.span`
767
+ var Message2 = styled9.span`
768
768
  font-size: ${(props) => getSizeValue(props.size).fontSize};
769
769
  color: ${tokens.colors.text.secondary};
770
770
  font-weight: ${tokens.typography.fontWeight.regular};
@@ -824,11 +824,114 @@ function AssistantThinking({
824
824
  );
825
825
  }
826
826
  AssistantThinking.displayName = "AssistantThinking";
827
+ var IconWrapper = styled9.span`
828
+ display: inline-flex;
829
+ align-items: center;
830
+ justify-content: center;
831
+ width: ${({ $size }) => $size}px;
832
+ height: ${({ $size }) => $size}px;
833
+ color: ${({ $color }) => $color};
834
+ line-height: 1;
835
+
836
+ img {
837
+ width: 100%;
838
+ height: 100%;
839
+ filter: ${({ $color }) => {
840
+ if ($color === "currentColor" || !$color) return "inherit";
841
+ if ($color === "white" || $color === tokens.colors.text.primary || $color === "#fff") {
842
+ return "brightness(0) saturate(100%) invert(100%)";
843
+ }
844
+ if ($color === tokens.colors.text.secondary || $color === "#b9bbbe") {
845
+ return "brightness(0) saturate(100%) invert(75%) sepia(8%) saturate(223%) hue-rotate(180deg) brightness(94%) contrast(86%)";
846
+ }
847
+ if ($color === tokens.colors.error || $color === "#ed4245" || $color === "#f04747") {
848
+ return "brightness(0) saturate(100%) invert(38%) sepia(97%) saturate(1459%) hue-rotate(334deg) brightness(95%) contrast(93%)";
849
+ }
850
+ return "none";
851
+ }};
852
+ }
853
+ `;
854
+
855
+ // src/components/layout/Icon/icons.ts
856
+ var ICON_BASE_PATH = "/assets/icon-set";
857
+ var iconFiles = {
858
+ "mic-fill": "Icon-mic-fill.svg",
859
+ "mic-off-fill": "Icon-mic-off-fill.svg",
860
+ "headphone-fill": "Icon-headphone-fill.svg",
861
+ "volume-mute-fill": "Icon-volume-mute-fill.svg",
862
+ "settings-3-line": "Icon-settings-3-line.svg",
863
+ "home-fill": "Icon-home-fill.svg",
864
+ "add-circle-fill": "Icon-add-circle-fill.svg",
865
+ "compass-discover-fill": "Icon-compass-discover-fill.svg",
866
+ "download-2-fill": "Icon-download-2-fill.svg",
867
+ "arrow-left-fill": "Icon-arrow-left-fill.svg",
868
+ "calendar-fill": "Icon-calendar-fill.svg",
869
+ "chat-1-fill": "Icon-chat-1-fill.svg",
870
+ "flow-chart": "Icon-flow-chart.svg",
871
+ "logout-circle-r-fill": "Icon-logout-circle-r-fill.svg",
872
+ "logout-circle-r-line": "Icon-logout-circle-r-line.svg",
873
+ "side-bar-fill": "Icon-side-bar-fill.svg",
874
+ "check-fill": "Icon-check-fill.svg",
875
+ "checkbox-circle-fill": "Icon-checkbox-circle-fill.svg",
876
+ "close-circle-fill": "Icon-close-circle-fill.svg",
877
+ "error-warning-fill": "Icon-error-warning-fill.svg",
878
+ "hammer-fill": "Icon-hammer-fill.svg",
879
+ "rocket-fill": "Icon-rocket-fill.svg",
880
+ "coupon-2-fill": "Icon-coupon-2-fill.svg",
881
+ "clipboard-fill": "Icon-clipboard-fill.svg"
882
+ };
883
+ function getIconPath(name) {
884
+ return `${ICON_BASE_PATH}/${iconFiles[name]}`;
885
+ }
886
+ function Icon({
887
+ name,
888
+ size = 20,
889
+ color = "currentColor",
890
+ className,
891
+ ...imgProps
892
+ }) {
893
+ const iconPath = getIconPath(name);
894
+ return /* @__PURE__ */ jsx(IconWrapper, { $size: size, $color: color, className, "aria-hidden": "true", children: /* @__PURE__ */ jsx("img", { src: iconPath, alt: "", width: size, height: size, ...imgProps }) });
895
+ }
896
+ Icon.displayName = "Icon";
827
897
  function parseMarkdown(text) {
828
898
  if (!text) return [];
829
899
  text = text.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "").replace(/__TOOL_CALL__:[^:]+:\{[^}]*(?:\{[^}]*\}[^}]*)*\}/g, "").replace(/<!--TOOL_CALL:[\s\S]*$/g, "").replace(/__TOOL_CALL__:[\s\S]*$/g, "");
830
900
  const elements = [];
831
901
  let key = 0;
902
+ const codeBlockRegex = /```(?:\w*)\n?([\s\S]*?)```/g;
903
+ let lastCodeEnd = 0;
904
+ let codeMatch;
905
+ while ((codeMatch = codeBlockRegex.exec(text)) !== null) {
906
+ if (codeMatch.index > lastCodeEnd) {
907
+ const beforeCode = text.slice(lastCodeEnd, codeMatch.index);
908
+ const parsed = parseMarkdownParagraphs(beforeCode, key);
909
+ elements.push(...parsed.elements);
910
+ key = parsed.nextKey;
911
+ }
912
+ const codeContent = (codeMatch[1] ?? "").replace(/\n$/, "");
913
+ elements.push(
914
+ /* @__PURE__ */ jsx("pre", { className: "code-block", children: /* @__PURE__ */ jsx("code", { children: codeContent }) }, key++)
915
+ );
916
+ lastCodeEnd = codeMatch.index + codeMatch[0].length;
917
+ }
918
+ const remaining = text.slice(lastCodeEnd);
919
+ if (remaining) {
920
+ const parsed = parseMarkdownParagraphs(remaining, key);
921
+ elements.push(...parsed.elements);
922
+ key = parsed.nextKey;
923
+ }
924
+ return elements;
925
+ }
926
+ function isMarkdownTable(lines) {
927
+ if (lines.length < 2) return false;
928
+ const firstLine = (lines[0] ?? "").trim();
929
+ const secondLine = (lines[1] ?? "").trim();
930
+ return firstLine.startsWith("|") && secondLine.startsWith("|") && /^\|[\s-:|]+\|$/.test(secondLine);
931
+ }
932
+ function parseMarkdownParagraphs(text, startKey) {
933
+ const elements = [];
934
+ let key = startKey;
832
935
  const paragraphs = text.split(/\n\n+/);
833
936
  paragraphs.forEach((paragraph, pIndex) => {
834
937
  if (pIndex > 0) {
@@ -836,16 +939,30 @@ function parseMarkdown(text) {
836
939
  elements.push(/* @__PURE__ */ jsx("br", {}, key++));
837
940
  }
838
941
  const lines = paragraph.split("\n");
942
+ if (isMarkdownTable(lines)) {
943
+ elements.push(
944
+ /* @__PURE__ */ jsx("pre", { className: "code-block", children: /* @__PURE__ */ jsx("code", { children: paragraph }) }, key++)
945
+ );
946
+ return;
947
+ }
839
948
  lines.forEach((line, lineIndex) => {
840
949
  if (lineIndex > 0) {
841
950
  elements.push(/* @__PURE__ */ jsx("br", {}, key++));
842
951
  }
952
+ const headingMatch = line.match(/^(#{1,4})\s+(.+)$/);
953
+ if (headingMatch && headingMatch[1] && headingMatch[2]) {
954
+ const level = headingMatch[1].length;
955
+ const parsed2 = parseInlineMarkdown(headingMatch[2], key);
956
+ key = parsed2.nextKey;
957
+ elements.push(React.createElement(`h${level}`, { key: key++ }, ...parsed2.elements));
958
+ return;
959
+ }
843
960
  const parsed = parseInlineMarkdown(line, key);
844
961
  elements.push(...parsed.elements);
845
962
  key = parsed.nextKey;
846
963
  });
847
964
  });
848
- return elements;
965
+ return { elements, nextKey: key };
849
966
  }
850
967
  function parseInlineMarkdown(text, startKey) {
851
968
  const elements = [];
@@ -878,7 +995,7 @@ function parseInlineMarkdown(text, startKey) {
878
995
  }
879
996
  return { elements, nextKey: key };
880
997
  }
881
- var Container3 = styled8.div`
998
+ var Container3 = styled9.div`
882
999
  font-family: ${(props) => props.$variant === "code" ? tokens.typography.fontFamily.monospace : tokens.typography.fontFamily.primary};
883
1000
  white-space: pre-wrap;
884
1001
  word-break: break-word;
@@ -905,6 +1022,24 @@ var Container3 = styled8.div`
905
1022
  font-size: 0.9em;
906
1023
  }
907
1024
 
1025
+ pre.code-block {
1026
+ background: ${tokens.colors.surface.overlay};
1027
+ border-radius: ${tokens.borderRadius.md};
1028
+ padding: ${tokens.spacing.md};
1029
+ margin: ${tokens.spacing.sm} 0;
1030
+ overflow-x: auto;
1031
+ white-space: pre;
1032
+ -webkit-overflow-scrolling: touch;
1033
+
1034
+ code {
1035
+ background: none;
1036
+ padding: 0;
1037
+ border-radius: 0;
1038
+ font-size: 0.85em;
1039
+ line-height: 1.5;
1040
+ }
1041
+ }
1042
+
908
1043
  a {
909
1044
  color: ${tokens.colors.primary};
910
1045
  text-decoration: none;
@@ -913,8 +1048,19 @@ var Container3 = styled8.div`
913
1048
  text-decoration: underline;
914
1049
  }
915
1050
  }
1051
+
1052
+ h1, h2, h3, h4 {
1053
+ margin: ${tokens.spacing.sm} 0 ${tokens.spacing.xs} 0;
1054
+ color: ${tokens.colors.text.primary};
1055
+ line-height: 1.3;
1056
+ }
1057
+
1058
+ h1 { font-size: 1.4em; font-weight: ${tokens.typography.fontWeight.bold}; }
1059
+ h2 { font-size: 1.2em; font-weight: ${tokens.typography.fontWeight.bold}; }
1060
+ h3 { font-size: 1.05em; font-weight: ${tokens.typography.fontWeight.semibold}; }
1061
+ h4 { font-size: 1em; font-weight: ${tokens.typography.fontWeight.semibold}; }
916
1062
  `;
917
- var Cursor = styled8.span`
1063
+ var Cursor = styled9.span`
918
1064
  display: inline-block;
919
1065
  width: 2px;
920
1066
  height: 1em;
@@ -970,7 +1116,7 @@ var StreamingTextBase = ({
970
1116
  };
971
1117
  var StreamingText2 = memo(StreamingTextBase);
972
1118
  StreamingText2.displayName = "StreamingText";
973
- var MessageContainer = styled8.div`
1119
+ var MessageContainer = styled9.div`
974
1120
  display: flex;
975
1121
  flex-direction: column;
976
1122
  gap: ${tokens.spacing.xs};
@@ -980,20 +1126,20 @@ var MessageContainer = styled8.div`
980
1126
  will-change: contents;
981
1127
  contain: content;
982
1128
  `;
983
- var AvatarContainer = styled8.div`
1129
+ var AvatarContainer = styled9.div`
984
1130
  display: flex;
985
1131
  align-items: center;
986
1132
  gap: ${tokens.spacing.xs};
987
1133
  flex-shrink: 0;
988
1134
  `;
989
- var Avatar2 = styled8.img`
1135
+ var Avatar2 = styled9.img`
990
1136
  width: 20px;
991
1137
  height: 20px;
992
1138
  border-radius: ${tokens.borderRadius.full};
993
1139
  object-fit: cover;
994
1140
  background-color: transparent;
995
1141
  `;
996
- var AvatarInitials = styled8.div`
1142
+ var AvatarInitials = styled9.div`
997
1143
  width: 20px;
998
1144
  height: 20px;
999
1145
  border-radius: ${tokens.borderRadius.full};
@@ -1011,16 +1157,16 @@ var AvatarInitials = styled8.div`
1011
1157
  object-fit: contain;
1012
1158
  }
1013
1159
  `;
1014
- var AvatarLabel = styled8.span`
1160
+ var AvatarLabel = styled9.span`
1015
1161
  font-size: ${tokens.typography.fontSize.xs};
1016
1162
  font-weight: ${tokens.typography.fontWeight.medium};
1017
1163
  color: ${tokens.colors.text.secondary};
1018
1164
  `;
1019
- var ContentContainer = styled8.div`
1165
+ var ContentContainer = styled9.div`
1020
1166
  width: 100%;
1021
1167
  min-width: 0;
1022
1168
  `;
1023
- var MessageContent = styled8.div`
1169
+ var MessageContent = styled9.div`
1024
1170
  /* Use solid color instead of backdrop-filter for performance during streaming */
1025
1171
  background-color: ${tokens.colors.surface.elevated};
1026
1172
  padding: ${tokens.spacing.sm};
@@ -1034,7 +1180,7 @@ var MessageContent = styled8.div`
1034
1180
  /* Optimize text rendering */
1035
1181
  text-rendering: optimizeSpeed;
1036
1182
  `;
1037
- var LoadingDots3 = styled8.div`
1183
+ var LoadingDots3 = styled9.div`
1038
1184
  display: flex;
1039
1185
  gap: ${tokens.spacing.xs};
1040
1186
  padding: ${tokens.spacing.sm};
@@ -1051,7 +1197,7 @@ var pulse2 = keyframes`
1051
1197
  opacity: 1;
1052
1198
  }
1053
1199
  `;
1054
- var LoadingDot = styled8.div`
1200
+ var LoadingDot = styled9.div`
1055
1201
  width: ${tokens.spacing.sm};
1056
1202
  height: ${tokens.spacing.sm};
1057
1203
  border-radius: ${tokens.borderRadius.full};
@@ -1060,7 +1206,7 @@ var LoadingDot = styled8.div`
1060
1206
  animation: ${pulse2} 1.4s ease-in-out infinite;
1061
1207
  animation-delay: ${(props) => props.delay}s;
1062
1208
  `;
1063
- var FileAttachmentContainer = styled8.div`
1209
+ var FileAttachmentContainer = styled9.div`
1064
1210
  display: flex;
1065
1211
  align-items: center;
1066
1212
  gap: ${tokens.spacing.sm};
@@ -1096,7 +1242,7 @@ var FileAttachmentContainer = styled8.div`
1096
1242
  }
1097
1243
  `}
1098
1244
  `;
1099
- var FileIconContainer = styled8.div`
1245
+ var FileIconContainer = styled9.div`
1100
1246
  flex-shrink: 0;
1101
1247
  width: ${tokens.spacing.xl};
1102
1248
  height: ${tokens.spacing.xl};
@@ -1106,14 +1252,14 @@ var FileIconContainer = styled8.div`
1106
1252
  font-size: ${tokens.typography.fontSize["2xl"]};
1107
1253
  line-height: 1;
1108
1254
  `;
1109
- var FileInfo = styled8.div`
1255
+ var FileInfo = styled9.div`
1110
1256
  flex: 1;
1111
1257
  min-width: 0;
1112
1258
  display: flex;
1113
1259
  flex-direction: column;
1114
1260
  gap: 2px;
1115
1261
  `;
1116
- var FileTitle = styled8.div`
1262
+ var FileTitle = styled9.div`
1117
1263
  font-size: ${tokens.typography.fontSize.sm};
1118
1264
  font-weight: ${tokens.typography.fontWeight.medium};
1119
1265
  color: ${tokens.colors.text.primary};
@@ -1123,7 +1269,7 @@ var FileTitle = styled8.div`
1123
1269
  text-overflow: ellipsis;
1124
1270
  white-space: nowrap;
1125
1271
  `;
1126
- var FileMetadata = styled8.div`
1272
+ var FileMetadata = styled9.div`
1127
1273
  display: flex;
1128
1274
  align-items: center;
1129
1275
  gap: ${tokens.spacing.xs};
@@ -1133,7 +1279,7 @@ var FileMetadata = styled8.div`
1133
1279
  line-height: ${tokens.typography.lineHeight.tight};
1134
1280
  overflow: hidden;
1135
1281
  `;
1136
- var FileSubtitle = styled8.span`
1282
+ var FileSubtitle = styled9.span`
1137
1283
  color: ${tokens.colors.text.tertiary};
1138
1284
  white-space: nowrap;
1139
1285
  overflow: hidden;
@@ -1189,13 +1335,13 @@ var FileAttachment = ({
1189
1335
  }
1190
1336
  );
1191
1337
  };
1192
- var AttachmentsContainer = styled8.div`
1338
+ var AttachmentsContainer = styled9.div`
1193
1339
  display: flex;
1194
1340
  flex-direction: column;
1195
1341
  gap: ${tokens.spacing.sm};
1196
1342
  margin-top: ${tokens.spacing.sm};
1197
1343
  `;
1198
- var ActionButton = styled8.button`
1344
+ var ActionButton = styled9.button`
1199
1345
  display: inline-flex;
1200
1346
  align-items: center;
1201
1347
  gap: ${tokens.spacing.xs};
@@ -1219,19 +1365,19 @@ var ActionButton = styled8.button`
1219
1365
  transform: scale(0.98);
1220
1366
  }
1221
1367
  `;
1222
- var ActionsContainer2 = styled8.div`
1368
+ var ActionsContainer2 = styled9.div`
1223
1369
  display: flex;
1224
1370
  gap: ${tokens.spacing.xs};
1225
1371
  flex-wrap: wrap;
1226
1372
  margin-top: ${tokens.spacing.sm};
1227
1373
  `;
1228
- var MessageTime = styled8.time`
1374
+ var MessageTime = styled9.time`
1229
1375
  font-size: ${tokens.typography.fontSize.xs};
1230
1376
  color: ${tokens.colors.text.tertiary};
1231
1377
  margin-top: ${tokens.spacing.xs};
1232
1378
  display: block;
1233
1379
  `;
1234
- var StreamingIndicator = styled8.span`
1380
+ var StreamingIndicator = styled9.span`
1235
1381
  display: inline-block;
1236
1382
  width: ${tokens.spacing.xs};
1237
1383
  height: ${tokens.spacing.xs};
@@ -1304,6 +1450,34 @@ var AssistantMessageBase = ({
1304
1450
  };
1305
1451
  var AssistantMessage = memo(AssistantMessageBase);
1306
1452
  AssistantMessage.displayName = "AssistantMessage";
1453
+ var REGISTRY_KEY = "__agentiffai_tool_call_registry__";
1454
+ var TOOL_CALL_TTL_MS = 5 * 60 * 1e3;
1455
+ function getRegistryMap() {
1456
+ const g = globalThis;
1457
+ if (!g[REGISTRY_KEY]) {
1458
+ g[REGISTRY_KEY] = /* @__PURE__ */ new Map();
1459
+ }
1460
+ return g[REGISTRY_KEY];
1461
+ }
1462
+ function registerToolCall(name) {
1463
+ getRegistryMap().set(name, Date.now());
1464
+ }
1465
+ function clearToolCalls() {
1466
+ getRegistryMap().clear();
1467
+ }
1468
+ function getActiveToolCalls() {
1469
+ const map = getRegistryMap();
1470
+ const now = Date.now();
1471
+ const active = [];
1472
+ for (const [name, timestamp] of map) {
1473
+ if (now - timestamp < TOOL_CALL_TTL_MS) {
1474
+ active.push(name);
1475
+ } else {
1476
+ map.delete(name);
1477
+ }
1478
+ }
1479
+ return active;
1480
+ }
1307
1481
  function stripToolCallMarkers(content) {
1308
1482
  let stripped = content;
1309
1483
  stripped = stripped.replace(/<!--TOOL_CALL:[^:]+:[\s\S]+?-->/g, "");
@@ -1312,6 +1486,25 @@ function stripToolCallMarkers(content) {
1312
1486
  stripped = stripped.replace(/__TOOL_CALL__:[\s\S]*$/g, "");
1313
1487
  return stripped.trim();
1314
1488
  }
1489
+ function extractToolCallNames(content) {
1490
+ if (!content.includes("TOOL_CALL")) return [];
1491
+ const names = /* @__PURE__ */ new Set();
1492
+ const patterns = [
1493
+ /<!--TOOL_CALL:([^:]+):/g,
1494
+ /__TOOL_CALL__:([^:]+):/g
1495
+ ];
1496
+ for (const pattern of patterns) {
1497
+ let match;
1498
+ while ((match = pattern.exec(content)) !== null) {
1499
+ if (match[1]) names.add(match[1]);
1500
+ }
1501
+ }
1502
+ return Array.from(names);
1503
+ }
1504
+ function formatToolName2(name) {
1505
+ if (name === "update-workflow") return "Workflow";
1506
+ return name.split(/[-_]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
1507
+ }
1315
1508
  var ERROR_PATTERNS = [
1316
1509
  /\bfailed\b/i,
1317
1510
  /\berror\b/i,
@@ -1383,10 +1576,31 @@ function buildChatSnippet(messages, errorMessageContent, maxMessages = 5, maxLen
1383
1576
  }
1384
1577
  return result;
1385
1578
  }
1386
- var GenerativeUIContainer = styled8.div`
1579
+ var GenerativeUIContainer = styled9.div`
1387
1580
  margin-top: ${tokens.spacing.sm};
1388
1581
  margin-bottom: ${tokens.spacing.sm};
1389
1582
  `;
1583
+ var ToolCallIndicator = styled9.div`
1584
+ display: flex;
1585
+ align-items: center;
1586
+ gap: ${tokens.spacing.sm};
1587
+ padding: ${tokens.spacing.xs} ${tokens.spacing.sm};
1588
+ margin-bottom: ${tokens.spacing.sm};
1589
+ border-radius: ${tokens.borderRadius.md};
1590
+ background: ${tokens.colors.text.primary}08;
1591
+ border: 1px solid ${tokens.colors.border.default};
1592
+ font-size: ${tokens.typography.fontSize.xs};
1593
+ color: ${tokens.colors.text.secondary};
1594
+ `;
1595
+ var ToolCallIcon = styled9.span`
1596
+ display: flex;
1597
+ align-items: center;
1598
+ color: ${tokens.colors.primary};
1599
+ `;
1600
+ var ToolCallName = styled9.span`
1601
+ font-weight: ${tokens.typography.fontWeight.medium};
1602
+ color: ${tokens.colors.text.primary};
1603
+ `;
1390
1604
  var AssistantMessageAdapterBase = ({
1391
1605
  message,
1392
1606
  isLoading,
@@ -1401,7 +1615,7 @@ var AssistantMessageAdapterBase = ({
1401
1615
  // ImageRenderer,
1402
1616
  }) => {
1403
1617
  const lastGenerativeUIRef = useRef(null);
1404
- const rawContent = message?.content || "";
1618
+ const rawContent = Array.isArray(message?.content) ? message.content.join("") : message?.content || "";
1405
1619
  const content = stripToolCallMarkers(rawContent);
1406
1620
  let generativeUIOutput = null;
1407
1621
  const msgWithUI = message;
@@ -1447,11 +1661,16 @@ function createAssistantMessageAdapter(ThinkingIndicator, _ToolCallsComponent) {
1447
1661
  message,
1448
1662
  isLoading,
1449
1663
  isGenerating
1450
- // isCurrentMessage and ToolCallsComponent are no longer used but kept for backwards compat
1451
1664
  }) => {
1452
1665
  const lastGenerativeUIRef = useRef(null);
1453
- const rawContent = message?.content || "";
1666
+ const rawContent = Array.isArray(message?.content) ? message.content.join("") : message?.content || "";
1454
1667
  const content = stripToolCallMarkers(rawContent);
1668
+ const toolCallNames = useMemo(() => {
1669
+ const fromContent = extractToolCallNames(rawContent);
1670
+ if (fromContent.length > 0) return fromContent;
1671
+ if (isLoading || isGenerating || rawContent.length > 80) return getActiveToolCalls();
1672
+ return [];
1673
+ }, [rawContent, isLoading, isGenerating]);
1455
1674
  let generativeUIOutput = null;
1456
1675
  const msgWithUI = message;
1457
1676
  if (msgWithUI && typeof msgWithUI.generativeUI === "function") {
@@ -1471,10 +1690,18 @@ function createAssistantMessageAdapter(ThinkingIndicator, _ToolCallsComponent) {
1471
1690
  const attachments = [];
1472
1691
  const hasGenerativeUI = generativeUIOutput !== null;
1473
1692
  const showThinking = (isLoading || isGenerating && !content) && !hasGenerativeUI;
1693
+ const toolCallIndicators = toolCallNames.map((name) => /* @__PURE__ */ jsxs(ToolCallIndicator, { children: [
1694
+ /* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx(Icon, { name: "hammer-fill", size: 14 }) }),
1695
+ /* @__PURE__ */ jsx(ToolCallName, { children: formatToolName2(name) })
1696
+ ] }, name));
1474
1697
  if (showThinking) {
1475
- return /* @__PURE__ */ jsx(Fragment, { children: ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." }) });
1698
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1699
+ toolCallIndicators,
1700
+ ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." })
1701
+ ] });
1476
1702
  }
1477
1703
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1704
+ toolCallIndicators,
1478
1705
  generativeUIOutput && /* @__PURE__ */ jsx(GenerativeUIContainer, { children: generativeUIOutput }),
1479
1706
  content && /* @__PURE__ */ jsx(
1480
1707
  AssistantMessage,
@@ -1497,12 +1724,17 @@ function createAssistantMessageAdapterWithErrorReporting(onReportIssue, Thinking
1497
1724
  message,
1498
1725
  isLoading,
1499
1726
  isGenerating
1500
- // isCurrentMessage and ToolCallsComponent are no longer used but kept for backwards compat
1501
1727
  }) => {
1502
1728
  const lastGenerativeUIRef = useRef(null);
1503
1729
  const { visibleMessages } = useCopilotChat();
1504
- const rawContent = message?.content || "";
1730
+ const rawContent = Array.isArray(message?.content) ? message.content.join("") : message?.content || "";
1505
1731
  const content = stripToolCallMarkers(rawContent);
1732
+ const toolCallNames = useMemo(() => {
1733
+ const fromContent = extractToolCallNames(rawContent);
1734
+ if (fromContent.length > 0) return fromContent;
1735
+ if (isLoading || isGenerating || rawContent.length > 80) return getActiveToolCalls();
1736
+ return [];
1737
+ }, [rawContent, isLoading, isGenerating]);
1506
1738
  const errorContext = useMemo(() => detectErrorInMessage(content), [content]);
1507
1739
  const chatSnippet = useMemo(() => {
1508
1740
  if (!errorContext.hasError) return "";
@@ -1564,9 +1796,19 @@ function createAssistantMessageAdapterWithErrorReporting(onReportIssue, Thinking
1564
1796
  const hasGenerativeUI = generativeUIOutput !== null;
1565
1797
  const showThinking = (isLoading || isGenerating && !content) && !hasGenerativeUI;
1566
1798
  if (showThinking) {
1567
- return /* @__PURE__ */ jsx(Fragment, { children: ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." }) });
1799
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1800
+ toolCallNames.map((name) => /* @__PURE__ */ jsxs(ToolCallIndicator, { children: [
1801
+ /* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) }) }),
1802
+ /* @__PURE__ */ jsx(ToolCallName, { children: formatToolName2(name) })
1803
+ ] }, name)),
1804
+ ThinkingIndicator ? /* @__PURE__ */ jsx(ThinkingIndicator, { isLoading, isGenerating }) : /* @__PURE__ */ jsx(AssistantThinking, { message: "Thinking..." })
1805
+ ] });
1568
1806
  }
1569
1807
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1808
+ toolCallNames.map((name) => /* @__PURE__ */ jsxs(ToolCallIndicator, { children: [
1809
+ /* @__PURE__ */ jsx(ToolCallIcon, { children: /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) }) }),
1810
+ /* @__PURE__ */ jsx(ToolCallName, { children: formatToolName2(name) })
1811
+ ] }, name)),
1570
1812
  generativeUIOutput && /* @__PURE__ */ jsx(GenerativeUIContainer, { children: generativeUIOutput }),
1571
1813
  content && /* @__PURE__ */ jsx(
1572
1814
  AssistantMessage,
@@ -1585,7 +1827,7 @@ function createAssistantMessageAdapterWithErrorReporting(onReportIssue, Thinking
1585
1827
  ErrorReportingAssistantMessageAdapter.displayName = "ErrorReportingAssistantMessageAdapter";
1586
1828
  return memo(ErrorReportingAssistantMessageAdapter);
1587
1829
  }
1588
- var ChatInputContainer = styled8.div`
1830
+ var ChatInputContainer = styled9.div`
1589
1831
  display: flex;
1590
1832
  flex-direction: column;
1591
1833
  width: 100%;
@@ -1601,7 +1843,7 @@ var ChatInputContainer = styled8.div`
1601
1843
  padding: ${tokens.spacing.md};
1602
1844
  }
1603
1845
  `;
1604
- var SuggestionsWrapper = styled8.div`
1846
+ var SuggestionsWrapper = styled9.div`
1605
1847
  display: flex;
1606
1848
  flex-direction: row;
1607
1849
  flex-wrap: wrap;
@@ -1610,7 +1852,7 @@ var SuggestionsWrapper = styled8.div`
1610
1852
  width: 100%;
1611
1853
  box-sizing: border-box;
1612
1854
  `;
1613
- var SuggestionButton = styled8.button`
1855
+ var SuggestionButton = styled9.button`
1614
1856
  padding: ${tokens.spacing.sm} ${tokens.spacing.md};
1615
1857
  font-family: ${tokens.typography.fontFamily.primary};
1616
1858
  font-size: 13px;
@@ -1649,7 +1891,7 @@ var SuggestionButton = styled8.button`
1649
1891
  opacity: 0.4;
1650
1892
  }
1651
1893
  `;
1652
- var InputWrapper = styled8.div`
1894
+ var InputWrapper = styled9.div`
1653
1895
  display: flex;
1654
1896
  align-items: flex-end; /* Align button to bottom when textarea expands */
1655
1897
  gap: ${tokens.spacing.sm};
@@ -1667,7 +1909,7 @@ var InputWrapper = styled8.div`
1667
1909
  background-color: rgba(50, 50, 52, 0.6);
1668
1910
  }
1669
1911
  `;
1670
- var InputField = styled8.textarea`
1912
+ var InputField = styled9.textarea`
1671
1913
  flex: 1;
1672
1914
  border: none;
1673
1915
  outline: none;
@@ -1692,7 +1934,7 @@ var InputField = styled8.textarea`
1692
1934
  cursor: not-allowed;
1693
1935
  }
1694
1936
  `;
1695
- var SubmitButton = styled8.button`
1937
+ var SubmitButton = styled9.button`
1696
1938
  display: flex;
1697
1939
  align-items: center;
1698
1940
  justify-content: center;
@@ -1928,7 +2170,7 @@ var InputAdapter = ({
1928
2170
  );
1929
2171
  };
1930
2172
  InputAdapter.displayName = "InputAdapter";
1931
- var StyledUserMessage = styled8.button`
2173
+ var StyledUserMessage = styled9.button`
1932
2174
  /* Base styles */
1933
2175
  display: inline-flex;
1934
2176
  align-items: center;
@@ -2064,7 +2306,7 @@ function UserMessageBase({
2064
2306
  }
2065
2307
  var UserMessage = memo(UserMessageBase);
2066
2308
  UserMessage.displayName = "UserMessage";
2067
- var UserMessageWrapper = styled8.div`
2309
+ var UserMessageWrapper = styled9.div`
2068
2310
  display: flex;
2069
2311
  justify-content: flex-end;
2070
2312
  width: 100%;
@@ -2094,7 +2336,7 @@ var pulse3 = keyframes`
2094
2336
  transform: scale(1.1);
2095
2337
  }
2096
2338
  `;
2097
- var Container4 = styled8.div`
2339
+ var Container4 = styled9.div`
2098
2340
  display: inline-flex;
2099
2341
  align-items: center;
2100
2342
  gap: ${(props) => {
@@ -2110,7 +2352,7 @@ var Container4 = styled8.div`
2110
2352
  }};
2111
2353
  font-family: ${tokens.typography.fontFamily.primary};
2112
2354
  `;
2113
- var StatusDot = styled8.div`
2355
+ var StatusDot = styled9.div`
2114
2356
  width: ${(props) => {
2115
2357
  if (props.variant === "badge") {
2116
2358
  switch (props.size) {
@@ -2171,7 +2413,7 @@ var StatusDot = styled8.div`
2171
2413
  animation: ${(props) => props.status === "streaming" ? pulse3 : "none"} 2s ease-in-out infinite;
2172
2414
  flex-shrink: 0;
2173
2415
  `;
2174
- var Label = styled8.span`
2416
+ var Label = styled9.span`
2175
2417
  font-size: ${(props) => {
2176
2418
  if (props.variant === "badge") {
2177
2419
  switch (props.size) {
@@ -2198,7 +2440,7 @@ var Label = styled8.span`
2198
2440
  color: ${tokens.colors.text.secondary};
2199
2441
  line-height: ${tokens.typography.lineHeight.tight};
2200
2442
  `;
2201
- var BadgeContainer = styled8.div`
2443
+ var BadgeContainer = styled9.div`
2202
2444
  display: inline-flex;
2203
2445
  align-items: center;
2204
2446
  gap: ${(props) => {
@@ -2275,7 +2517,7 @@ var StreamStatusIndicator = ({
2275
2517
  return /* @__PURE__ */ jsx(Container4, { size, className, role: "status", "aria-label": getStatusLabel(status), children: content });
2276
2518
  };
2277
2519
  StreamStatusIndicator.displayName = "StreamStatusIndicator";
2278
- var HeaderContainer = styled8.header`
2520
+ var HeaderContainer = styled9.header`
2279
2521
  display: flex;
2280
2522
  align-items: center;
2281
2523
  justify-content: space-between;
@@ -2291,14 +2533,14 @@ var HeaderContainer = styled8.header`
2291
2533
  padding: ${tokens.spacing.sm} ${tokens.spacing.md};
2292
2534
  }
2293
2535
  `;
2294
- var HeaderContent = styled8.div`
2536
+ var HeaderContent = styled9.div`
2295
2537
  display: flex;
2296
2538
  flex-direction: column;
2297
2539
  gap: ${tokens.spacing.xs};
2298
2540
  flex: 1;
2299
2541
  min-width: 0;
2300
2542
  `;
2301
- var HeaderTitle = styled8.h1`
2543
+ var HeaderTitle = styled9.h1`
2302
2544
  margin: 0;
2303
2545
  font-size: ${tokens.typography.fontSize.base};
2304
2546
  font-weight: ${tokens.typography.fontWeight.semibold};
@@ -2309,7 +2551,7 @@ var HeaderTitle = styled8.h1`
2309
2551
  text-overflow: ellipsis;
2310
2552
  white-space: nowrap;
2311
2553
  `;
2312
- var HeaderSubtitle = styled8.p`
2554
+ var HeaderSubtitle = styled9.p`
2313
2555
  margin: 0;
2314
2556
  font-size: ${tokens.typography.fontSize.sm};
2315
2557
  color: ${tokens.colors.text.secondary};
@@ -2319,13 +2561,13 @@ var HeaderSubtitle = styled8.p`
2319
2561
  text-overflow: ellipsis;
2320
2562
  white-space: nowrap;
2321
2563
  `;
2322
- var HeaderActions = styled8.div`
2564
+ var HeaderActions = styled9.div`
2323
2565
  display: flex;
2324
2566
  align-items: center;
2325
2567
  gap: ${tokens.spacing.xs};
2326
2568
  margin-left: ${tokens.spacing.md};
2327
2569
  `;
2328
- var ActionButton2 = styled8.button`
2570
+ var ActionButton2 = styled9.button`
2329
2571
  display: inline-flex;
2330
2572
  align-items: center;
2331
2573
  justify-content: center;
@@ -2442,7 +2684,7 @@ var Header = ({
2442
2684
  ] });
2443
2685
  };
2444
2686
  Header.displayName = "Header";
2445
- var MessagesContainer = styled8.div`
2687
+ var MessagesContainer = styled9.div`
2446
2688
  display: flex;
2447
2689
  flex-direction: column;
2448
2690
  flex: 1;
@@ -2471,7 +2713,7 @@ var Messages = ({
2471
2713
  return /* @__PURE__ */ jsx(MessagesContainer, { className, role: "region", "aria-label": ariaLabel, children });
2472
2714
  };
2473
2715
  Messages.displayName = "Messages";
2474
- var WindowContainer = styled8.div`
2716
+ var WindowContainer = styled9.div`
2475
2717
  display: flex;
2476
2718
  flex-direction: column;
2477
2719
  /* Glassmorphism effect */
@@ -2672,7 +2914,7 @@ var GlobalSidebarStyles = createGlobalStyle`
2672
2914
  }
2673
2915
  }
2674
2916
  `;
2675
- var StyledChatButton = styled8.button`
2917
+ var StyledChatButton = styled9.button`
2676
2918
  position: fixed;
2677
2919
  bottom: 8px;
2678
2920
  right: 8px;
@@ -3082,7 +3324,7 @@ var GlobalSidebarStyles2 = createGlobalStyle`
3082
3324
  box-shadow: none !important;
3083
3325
  }
3084
3326
  `;
3085
- var StyledChatButton2 = styled8.button`
3327
+ var StyledChatButton2 = styled9.button`
3086
3328
  position: fixed;
3087
3329
  bottom: calc(${tokens.spacing.sm} + var(--safe-area-bottom, 0px));
3088
3330
  right: calc(${tokens.spacing.sm} + var(--safe-area-right, 0px));
@@ -3228,7 +3470,7 @@ function CustomCopilotSidebar2({
3228
3470
  ] });
3229
3471
  }
3230
3472
  CustomCopilotSidebar2.displayName = "CustomCopilotSidebar";
3231
- var FooterContainer = styled8.footer`
3473
+ var FooterContainer = styled9.footer`
3232
3474
  display: flex;
3233
3475
  align-items: center;
3234
3476
  justify-content: center;
@@ -3237,7 +3479,7 @@ var FooterContainer = styled8.footer`
3237
3479
  border-top: 1px solid ${tokens.colors.border.default};
3238
3480
  min-height: 44px;
3239
3481
  `;
3240
- var FooterContent = styled8.div`
3482
+ var FooterContent = styled9.div`
3241
3483
  display: flex;
3242
3484
  align-items: center;
3243
3485
  justify-content: space-between;
@@ -3250,13 +3492,13 @@ var FooterContent = styled8.div`
3250
3492
  font-family: ${tokens.typography.fontFamily.primary};
3251
3493
  line-height: ${tokens.typography.lineHeight.tight};
3252
3494
  `;
3253
- var FooterBranding = styled8.div`
3495
+ var FooterBranding = styled9.div`
3254
3496
  display: flex;
3255
3497
  align-items: center;
3256
3498
  gap: ${tokens.spacing.xs};
3257
3499
  flex-shrink: 0;
3258
3500
  `;
3259
- var FooterStatus = styled8.div`
3501
+ var FooterStatus = styled9.div`
3260
3502
  display: flex;
3261
3503
  align-items: center;
3262
3504
  gap: ${tokens.spacing.xs};
@@ -3266,7 +3508,7 @@ var FooterStatus = styled8.div`
3266
3508
  font-size: ${tokens.typography.fontSize.xs};
3267
3509
  opacity: 0.8;
3268
3510
  `;
3269
- var FooterLink = styled8.a`
3511
+ var FooterLink = styled9.a`
3270
3512
  color: ${tokens.colors.primary};
3271
3513
  text-decoration: none;
3272
3514
  transition: opacity ${tokens.transitions.fast};
@@ -3314,13 +3556,13 @@ var Footer = ({
3314
3556
  ] }) });
3315
3557
  };
3316
3558
  Footer.displayName = "Footer";
3317
- var InputContainer = styled8.div`
3559
+ var InputContainer = styled9.div`
3318
3560
  display: flex;
3319
3561
  flex-direction: column;
3320
3562
  width: 100%;
3321
3563
  position: relative;
3322
3564
  `;
3323
- var InputWrapper2 = styled8.div`
3565
+ var InputWrapper2 = styled9.div`
3324
3566
  display: flex;
3325
3567
  align-items: flex-end;
3326
3568
  gap: ${tokens.spacing.sm};
@@ -3340,7 +3582,7 @@ var InputWrapper2 = styled8.div`
3340
3582
  border-color: ${tokens.colors.border.subtle};
3341
3583
  }
3342
3584
  `;
3343
- var TextArea = styled8.textarea`
3585
+ var TextArea = styled9.textarea`
3344
3586
  flex: 1;
3345
3587
  min-height: ${tokens.spacing.lg};
3346
3588
  max-height: ${(props) => `${(props.$maxRows || 5) * 24}px`};
@@ -3386,7 +3628,7 @@ var TextArea = styled8.textarea`
3386
3628
  background: ${tokens.colors.scrollbar.thumbHover};
3387
3629
  }
3388
3630
  `;
3389
- var SendButton = styled8.button`
3631
+ var SendButton = styled9.button`
3390
3632
  display: flex;
3391
3633
  align-items: center;
3392
3634
  justify-content: center;
@@ -3516,7 +3758,7 @@ var Input = ({
3516
3758
  )
3517
3759
  ] }) });
3518
3760
  };
3519
- var MessagesListContainer = styled8.div`
3761
+ var MessagesListContainer = styled9.div`
3520
3762
  display: flex;
3521
3763
  flex-direction: column;
3522
3764
  width: 100%;
@@ -3556,7 +3798,7 @@ var MessagesListContainer = styled8.div`
3556
3798
  /* Ensure proper rendering on mobile */
3557
3799
  -webkit-overflow-scrolling: touch;
3558
3800
  `;
3559
- var MessagesListContent = styled8.div`
3801
+ var MessagesListContent = styled9.div`
3560
3802
  display: flex;
3561
3803
  flex-direction: column;
3562
3804
  gap: ${tokens.spacing.sm};
@@ -3672,7 +3914,7 @@ var MessagesList = ({
3672
3914
  }
3673
3915
  );
3674
3916
  };
3675
- var StyledUserMessage2 = styled8.div`
3917
+ var StyledUserMessage2 = styled9.div`
3676
3918
  display: flex;
3677
3919
  justify-content: flex-end;
3678
3920
  align-items: flex-start;
@@ -3680,7 +3922,7 @@ var StyledUserMessage2 = styled8.div`
3680
3922
  padding: 0;
3681
3923
  width: 100%;
3682
3924
  `;
3683
- var MessageBubble = styled8.div`
3925
+ var MessageBubble = styled9.div`
3684
3926
  display: flex;
3685
3927
  flex-direction: column;
3686
3928
  max-width: 85%;
@@ -3707,7 +3949,7 @@ var MessageBubble = styled8.div`
3707
3949
  opacity: 0.9;
3708
3950
  }
3709
3951
  `;
3710
- var MessageContent2 = styled8.p`
3952
+ var MessageContent2 = styled9.p`
3711
3953
  margin: 0;
3712
3954
  font-size: ${tokens.typography.fontSize.sm};
3713
3955
  line-height: ${tokens.typography.lineHeight.normal};
@@ -3716,13 +3958,13 @@ var MessageContent2 = styled8.p`
3716
3958
  word-break: break-word;
3717
3959
  white-space: pre-wrap;
3718
3960
  `;
3719
- var MessageTime2 = styled8.time`
3961
+ var MessageTime2 = styled9.time`
3720
3962
  font-size: ${tokens.typography.fontSize.xs};
3721
3963
  opacity: 0.7;
3722
3964
  margin-top: ${tokens.spacing.xs};
3723
3965
  text-align: right;
3724
3966
  `;
3725
- var ActionButton3 = styled8.button`
3967
+ var ActionButton3 = styled9.button`
3726
3968
  display: inline-flex;
3727
3969
  align-items: center;
3728
3970
  gap: ${tokens.spacing.xs};
@@ -3746,12 +3988,12 @@ var ActionButton3 = styled8.button`
3746
3988
  transform: scale(0.98);
3747
3989
  }
3748
3990
  `;
3749
- var ActionsContainer3 = styled8.div`
3991
+ var ActionsContainer3 = styled9.div`
3750
3992
  display: flex;
3751
3993
  gap: ${tokens.spacing.xs};
3752
3994
  flex-wrap: wrap;
3753
3995
  `;
3754
- var Avatar3 = styled8.img`
3996
+ var Avatar3 = styled9.img`
3755
3997
  width: ${tokens.spacing.xl};
3756
3998
  height: ${tokens.spacing.xl};
3757
3999
  border-radius: ${tokens.borderRadius.full};
@@ -3790,7 +4032,7 @@ var UserMessage2 = ({
3790
4032
  avatarUrl && /* @__PURE__ */ jsx(Avatar3, { src: avatarUrl, alt: username || "User" })
3791
4033
  ] });
3792
4034
  };
3793
- var ErrorContainer = styled8.div`
4035
+ var ErrorContainer = styled9.div`
3794
4036
  display: flex;
3795
4037
  align-items: flex-start;
3796
4038
  gap: ${tokens.spacing.sm};
@@ -3804,7 +4046,7 @@ var ErrorContainer = styled8.div`
3804
4046
  width: ${(props) => props.variant === "banner" ? "100%" : "auto"};
3805
4047
  max-width: ${(props) => props.variant === "banner" ? "100%" : "600px"};
3806
4048
  `;
3807
- var IconContainer = styled8.div`
4049
+ var IconContainer = styled9.div`
3808
4050
  flex-shrink: 0;
3809
4051
  width: 20px;
3810
4052
  height: 20px;
@@ -3821,29 +4063,29 @@ var ErrorIcon = () => /* @__PURE__ */ jsx(
3821
4063
  children: /* @__PURE__ */ 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" })
3822
4064
  }
3823
4065
  );
3824
- var Content2 = styled8.div`
4066
+ var Content2 = styled9.div`
3825
4067
  flex: 1;
3826
4068
  display: flex;
3827
4069
  flex-direction: column;
3828
4070
  gap: ${tokens.spacing.sm};
3829
4071
  `;
3830
- var ErrorMessage = styled8.div`
4072
+ var ErrorMessage = styled9.div`
3831
4073
  font-size: ${tokens.typography.fontSize.sm};
3832
4074
  line-height: ${tokens.typography.lineHeight.normal};
3833
4075
  color: ${tokens.colors.text.primary};
3834
4076
  `;
3835
- var ErrorDetails = styled8.div`
4077
+ var ErrorDetails = styled9.div`
3836
4078
  font-size: ${tokens.typography.fontSize.xs};
3837
4079
  line-height: 1.4;
3838
4080
  color: ${tokens.colors.text.secondary};
3839
4081
  margin-top: ${tokens.spacing.xs};
3840
4082
  `;
3841
- var Actions2 = styled8.div`
4083
+ var Actions2 = styled9.div`
3842
4084
  display: flex;
3843
4085
  gap: ${tokens.spacing.sm};
3844
4086
  margin-top: ${tokens.spacing.sm};
3845
4087
  `;
3846
- var Button2 = styled8.button`
4088
+ var Button2 = styled9.button`
3847
4089
  display: inline-flex;
3848
4090
  align-items: center;
3849
4091
  gap: ${tokens.spacing.xs};
@@ -3872,7 +4114,7 @@ var Button2 = styled8.button`
3872
4114
  cursor: not-allowed;
3873
4115
  }
3874
4116
  `;
3875
- var CloseButton = styled8.button`
4117
+ var CloseButton = styled9.button`
3876
4118
  flex-shrink: 0;
3877
4119
  width: 24px;
3878
4120
  height: 24px;
@@ -3931,7 +4173,7 @@ var StreamErrorMessage = ({
3931
4173
  ] });
3932
4174
  };
3933
4175
  StreamErrorMessage.displayName = "StreamErrorMessage";
3934
- var SuggestionsContainer = styled8.div`
4176
+ var SuggestionsContainer = styled9.div`
3935
4177
  display: flex;
3936
4178
  flex-wrap: nowrap; /* Single row */
3937
4179
  gap: ${tokens.spacing.sm};
@@ -3964,7 +4206,7 @@ var SuggestionsContainer = styled8.div`
3964
4206
  display: none; /* Chrome/Safari/Opera */
3965
4207
  }
3966
4208
  `;
3967
- var StyledSuggestion = styled8.button`
4209
+ var StyledSuggestion = styled9.button`
3968
4210
  /* Base styles */
3969
4211
  display: inline-flex;
3970
4212
  align-items: center;
@@ -4038,6 +4280,6 @@ function SuggestionChip({ suggestion, onSelect }) {
4038
4280
  }
4039
4281
  Suggestions.displayName = "Suggestions";
4040
4282
 
4041
- export { ActionExecutionAdapter, Actions, AgentState, AssistantMessage, AssistantMessageAdapter, Button, CustomCopilotSidebar2 as CustomCopilotSidebar, FileAttachment, Footer, Header, Input, InputAdapter, CustomCopilotSidebar as IntegratedSidebar, Messages, MessagesList, MessagesListContainer, MessagesListContent, Response, StreamErrorMessage, StreamStatusIndicator, StreamingText2 as StreamingText, Suggestions, UserMessage2 as UserMessage, UserMessageAdapter, Window };
4283
+ export { ActionExecutionAdapter, Actions, AgentState, AssistantMessage, AssistantMessageAdapter, Button, CustomCopilotSidebar2 as CustomCopilotSidebar, FileAttachment, Footer, Header, Input, InputAdapter, CustomCopilotSidebar as IntegratedSidebar, Messages, MessagesList, MessagesListContainer, MessagesListContent, Response, StreamErrorMessage, StreamStatusIndicator, StreamingText2 as StreamingText, Suggestions, UserMessage2 as UserMessage, UserMessageAdapter, Window, clearToolCalls, registerToolCall };
4042
4284
  //# sourceMappingURL=index.js.map
4043
4285
  //# sourceMappingURL=index.js.map