@agentiffai/design 1.3.4 → 1.3.6

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.
@@ -828,7 +828,7 @@ function AssistantThinking({
828
828
  }
829
829
  AssistantThinking.displayName = "AssistantThinking";
830
830
  var Container3 = styled4__default.default.div`
831
- font-family: ${(props) => props.variant === "code" ? tokens.typography.fontFamily.monospace : tokens.typography.fontFamily.primary};
831
+ font-family: ${(props) => props.$variant === "code" ? tokens.typography.fontFamily.monospace : tokens.typography.fontFamily.primary};
832
832
  white-space: pre-wrap;
833
833
  word-break: break-word;
834
834
  line-height: ${tokens.typography.lineHeight.normal};
@@ -881,7 +881,7 @@ var StreamingTextBase = ({
881
881
  wasStreamingRef.current = isStreaming;
882
882
  }, [content, isStreaming, onStreamComplete]);
883
883
  const showCursor = isStreaming && cursor;
884
- return /* @__PURE__ */ jsxRuntime.jsxs(Container3, { variant, className, children: [
884
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container3, { $variant: variant, className, children: [
885
885
  displayedText,
886
886
  showCursor && /* @__PURE__ */ jsxRuntime.jsx(Cursor, {})
887
887
  ] });
@@ -1213,6 +1213,10 @@ var AssistantMessageBase = ({
1213
1213
  };
1214
1214
  var AssistantMessage = react.memo(AssistantMessageBase);
1215
1215
  AssistantMessage.displayName = "AssistantMessage";
1216
+ var TOOL_CALL_MARKER_REGEX = /<!--TOOL_CALL:([^:]+):(.+?)-->/g;
1217
+ function stripToolCallMarkers(content) {
1218
+ return content.replace(TOOL_CALL_MARKER_REGEX, "").trim();
1219
+ }
1216
1220
  var GenerativeUIContainer = styled4__default.default.div`
1217
1221
  margin-top: ${tokens.spacing.sm};
1218
1222
  margin-bottom: ${tokens.spacing.sm};
@@ -1233,7 +1237,8 @@ var AssistantMessageAdapterBase = ({
1233
1237
  if (isLoading || isGenerating && !message?.content) {
1234
1238
  return /* @__PURE__ */ jsxRuntime.jsx(AssistantThinking, { message: "Thinking..." });
1235
1239
  }
1236
- const content = message?.content || "";
1240
+ const rawContent = message?.content || "";
1241
+ const content = stripToolCallMarkers(rawContent);
1237
1242
  let generativeUIOutput = null;
1238
1243
  const msgWithUI = message;
1239
1244
  if (msgWithUI && typeof msgWithUI.generativeUI === "function") {
@@ -1447,7 +1452,6 @@ var ChatInput = ({
1447
1452
  if (inputRef.current) {
1448
1453
  inputRef.current.style.height = "auto";
1449
1454
  }
1450
- inputRef.current?.focus();
1451
1455
  }
1452
1456
  };
1453
1457
  const handleSuggestionClick = (suggestionText) => {
@@ -1553,7 +1557,7 @@ ChatInput.displayName = "ChatInput";
1553
1557
  var InputAdapter = ({
1554
1558
  inProgress,
1555
1559
  onSend,
1556
- isVisible = true
1560
+ isVisible: _isVisible = true
1557
1561
  }) => {
1558
1562
  const [value, setValue] = react.useState("");
1559
1563
  const [isSubmitting, setIsSubmitting] = react.useState(false);
@@ -1597,7 +1601,7 @@ var InputAdapter = ({
1597
1601
  onSubmit: handleSubmit,
1598
1602
  placeholder: "Ask, write or search for anything...",
1599
1603
  isDisabled: shouldDisableInput,
1600
- autoFocus: isVisible,
1604
+ autoFocus: false,
1601
1605
  "aria-label": "Chat message input",
1602
1606
  suggestions: [{ text: "Explore workflows" }],
1603
1607
  onSuggestionSelect: handleSuggestionSelect
@@ -1620,6 +1624,7 @@ var StyledUserMessage = styled4__default.default.button`
1620
1624
  user-select: none;
1621
1625
  white-space: pre-wrap;
1622
1626
  word-wrap: break-word;
1627
+ word-break: break-word;
1623
1628
  position: relative;
1624
1629
  text-align: left;
1625
1630
 
@@ -2578,6 +2583,104 @@ var GlobalSidebarStyles2 = styled4.createGlobalStyle`
2578
2583
  }
2579
2584
  }
2580
2585
 
2586
+ /* Mobile landscape: sidebar on right side, allow background interaction */
2587
+ @media (orientation: landscape) and (max-height: 500px) {
2588
+ /* Account for vertical nav (60px) in landscape */
2589
+ .copilotKitSidebarContentWrapper {
2590
+ left: 60px !important;
2591
+ width: calc(100% - 60px) !important;
2592
+ }
2593
+
2594
+ /* Shrink the sidebar container to only cover the right portion where dialog lives */
2595
+ /* Also stretch to full height (remove default 8px padding) */
2596
+ .copilotKitSidebar {
2597
+ top: 0 !important;
2598
+ bottom: 0 !important;
2599
+ left: 58vw !important;
2600
+ width: min(50vw, 22rem) !important;
2601
+ height: 100vh !important;
2602
+ }
2603
+
2604
+ /* Offset the expanded sidebar wrapper to leave space for main content */
2605
+ .copilotKitSidebarContentWrapper.sidebarExpanded {
2606
+ margin-right: 30vw !important;
2607
+ }
2608
+
2609
+ .copilotKitSidebar [role="dialog"] {
2610
+ width: min(50vw, 20rem) !important;
2611
+ max-width: min(50vw, 20rem) !important;
2612
+ left: auto !important;
2613
+ right: 1.5rem !important;
2614
+ /* Use top/bottom ONLY - let browser calculate height (more reliable than explicit height) */
2615
+ top: env(safe-area-inset-top, 0px) !important;
2616
+ bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
2617
+ /* Remove explicit height - let top/bottom define it */
2618
+ height: auto !important;
2619
+ max-height: none !important;
2620
+ /* Remove margins */
2621
+ margin: 0 !important;
2622
+ border-radius: 0 !important;
2623
+ border-top-left-radius: ${tokens.borderRadius.xl} !important;
2624
+ border-bottom-left-radius: ${tokens.borderRadius.xl} !important;
2625
+ }
2626
+
2627
+ /* Compact header in landscape - hide title text but keep close button */
2628
+ .copilotKitSidebar [role="dialog"] header,
2629
+ .copilotKitSidebar [role="dialog"] [data-testid="chat-header"],
2630
+ .copilotKitSidebar [role="dialog"] > div:first-child {
2631
+ padding: 0.25rem 0.5rem !important;
2632
+ min-height: auto !important;
2633
+ height: 1.5rem;
2634
+ padding-right: 1.5rem !important;
2635
+ }
2636
+
2637
+ /* Hide the title text but keep close button visible */
2638
+ .copilotKitSidebar [role="dialog"] header h1,
2639
+ .copilotKitSidebar [role="dialog"] header h2,
2640
+ .copilotKitSidebar [role="dialog"] header span:not(:last-child),
2641
+ .copilotKitSidebar [role="dialog"] > div:first-child > span,
2642
+ .copilotKitSidebar [role="dialog"] > div:first-child > h1,
2643
+ .copilotKitSidebar [role="dialog"] > div:first-child > h2 {
2644
+ display: none !important;
2645
+ }
2646
+
2647
+ /* Reduce vertical padding inside chat to preserve space in landscape */
2648
+ .copilotKitMessages {
2649
+ padding: ${tokens.spacing.xs} ${tokens.spacing.sm} !important;
2650
+ }
2651
+
2652
+ .copilotKitMessage {
2653
+ padding: ${tokens.spacing.xs} 0 !important;
2654
+ margin: ${tokens.spacing.xs} 0 !important;
2655
+ }
2656
+
2657
+ /* Compact input area in landscape */
2658
+ .copilotKitInput,
2659
+ .copilotKitSidebar [role="dialog"] > div:last-child {
2660
+ padding: ${tokens.spacing.xs} ${tokens.spacing.sm} !important;
2661
+ }
2662
+
2663
+ /* Reduce gap between messages */
2664
+ .copilotKitMessages > div {
2665
+ gap: 0.25rem !important;
2666
+ padding-bottom: 0;
2667
+ margin-bottom: -3rem;
2668
+ }
2669
+
2670
+ /* Compact suggested prompts in landscape */
2671
+ div[role="list"][aria-label*="Suggested"] {
2672
+ margin: 0 !important;
2673
+ padding: 1px !important;
2674
+ min-height: auto !important;
2675
+ max-height: 32px !important;
2676
+ }
2677
+
2678
+ /* Compact parent of suggestions (input area) */
2679
+ .copilotKitSidebar [role="dialog"] > div:last-child {
2680
+ padding: 1px !important;
2681
+ }
2682
+ }
2683
+
2581
2684
  /* Hide button when sidebar is open */
2582
2685
  .copilotKitSidebarContentWrapper.sidebarExpanded {
2583
2686
  button[aria-label="Open chat"],