@agno-hq/chat-react 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  import { C as ChatMessage, l as RunEventData, e as ChatStatus, g as EntityType, q as ToolExecution, m as RunRequirement, S as SessionEntry, A as AgnoClient, E as Entity, j as ReferenceData, f as Citations$1, R as ReasoningStep, o as SubRun, r as WorkflowStep, I as ImageData, V as VideoData, c as AudioData } from '../client-DUyVqxU9.cjs';
2
- import * as React$1 from 'react';
3
- import React__default from 'react';
2
+ import React$1 from 'react';
4
3
  import { StreamdownProps } from 'streamdown';
5
4
 
6
5
  /**
@@ -163,6 +162,10 @@ interface ChatClassNames {
163
162
  attachButton?: string;
164
163
  /** Pending attachment chips. */
165
164
  files?: string;
165
+ /** The "why this file was refused" line under the chips. */
166
+ fileError?: string;
167
+ /** The overlay shown while files are dragged over the dock. */
168
+ dropOverlay?: string;
166
169
  /** `<SessionList>` wrapper. */
167
170
  sessions?: string;
168
171
  /** Each session row. */
@@ -256,6 +259,17 @@ interface LinkPreview {
256
259
  */
257
260
  type ResolveLinkPreview = (url: string) => Promise<LinkPreview | null> | LinkPreview | null;
258
261
  /** One numbered entry in a message's source list. */
262
+ /**
263
+ * Renders every link the components emit — in answers, on `[1]` chips and on
264
+ * source cards — in place of a plain `<a>`. Given `href`, `children` and the
265
+ * anchor attributes the component would have set (class, title, ARIA); it
266
+ * decides how to navigate, so nothing sets `target` for it. Hand it a router
267
+ * link to keep in-app URLs client-side.
268
+ */
269
+ type LinkComponent = React$1.ComponentType<React$1.AnchorHTMLAttributes<HTMLAnchorElement> & {
270
+ href: string;
271
+ children?: React$1.ReactNode;
272
+ }>;
259
273
  interface Source {
260
274
  /** 1-based position — what `[1]` in the answer text refers to. */
261
275
  index: number;
@@ -377,6 +391,11 @@ interface MarkdownProps {
377
391
  * it, or set `codeCopy` on `<ChatProvider>` to turn it off everywhere.
378
392
  */
379
393
  codeCopy?: boolean;
394
+ /**
395
+ * Render links with your own component instead of `<a>` — a router link
396
+ * keeps in-app URLs client-side. Defaults to the provider's `linkComponent`.
397
+ */
398
+ linkComponent?: LinkComponent;
380
399
  /** Escape hatch onto Streamdown itself — anything not set here. */
381
400
  options?: Omit<StreamdownProps, 'children' | 'className' | 'components'>;
382
401
  }
@@ -392,8 +411,8 @@ interface MarkdownProps {
392
411
  * fallbacks, and because the failure paths are worth testing.
393
412
  */
394
413
  declare function writeClipboard(text: string): Promise<boolean>;
395
- declare function Markdown({ content, className, sources, streaming, codeCopy, options, }: MarkdownProps): React__default.ReactElement;
396
- type RenderMarkdown = (content: string) => React__default.ReactNode;
414
+ declare function Markdown({ content, className, sources, streaming, codeCopy, linkComponent, options, }: MarkdownProps): React$1.ReactElement;
415
+ type RenderMarkdown = (content: string) => React$1.ReactNode;
397
416
 
398
417
  /**
399
418
  * `<ChatProvider>` runs a chat and shares it with everything below it, so the
@@ -424,9 +443,11 @@ interface ChatContextValue {
424
443
  resolveLinkPreview?: ResolveLinkPreview;
425
444
  /** Whether fenced code blocks carry a copy button. Defaults to true. */
426
445
  codeCopy?: boolean;
446
+ /** Renders every link in place of `<a>`, threaded to every descendant. */
447
+ linkComponent?: LinkComponent;
427
448
  }
428
449
  interface ChatProviderProps extends UseAgnoChatOptions {
429
- children: React__default.ReactNode;
450
+ children: React$1.ReactNode;
430
451
  /** Slot class overrides shared by every component in the tree. */
431
452
  classNames?: ChatClassNames;
432
453
  /** Markdown renderer shared by every component in the tree. */
@@ -443,6 +464,12 @@ interface ChatProviderProps extends UseAgnoChatOptions {
443
464
  * by default; pass `false` to drop it.
444
465
  */
445
466
  codeCopy?: boolean;
467
+ /**
468
+ * Render every link — in answers, on `[1]` chips, on source cards — with
469
+ * your own component instead of `<a>`. A router link keeps in-app URLs
470
+ * client-side; see `LinkComponent`.
471
+ */
472
+ linkComponent?: LinkComponent;
446
473
  /**
447
474
  * Use an existing `useAgnoChat` result instead of creating one. Lets a parent
448
475
  * own the state (or share one chat across two providers).
@@ -452,13 +479,13 @@ interface ChatProviderProps extends UseAgnoChatOptions {
452
479
  * Wrapper element rendered around the children. Defaults to a plain `div`
453
480
  * carrying the theme classes; pass `false` to render children bare.
454
481
  */
455
- as?: React__default.ElementType | false;
482
+ as?: React$1.ElementType | false;
456
483
  className?: string;
457
484
  /** Light theme instead of the default dark. */
458
485
  light?: boolean;
459
- style?: React__default.CSSProperties;
486
+ style?: React$1.CSSProperties;
460
487
  }
461
- declare function ChatProvider({ children, classNames, renderMarkdown, resolveLinkPreview, codeCopy, chat: externalChat, as, className, light, style, ...options }: ChatProviderProps): React__default.ReactElement;
488
+ declare function ChatProvider({ children, classNames, renderMarkdown, resolveLinkPreview, codeCopy, linkComponent, chat: externalChat, as, className, light, style, ...options }: ChatProviderProps): React$1.ReactElement;
462
489
  /**
463
490
  * Read the chat, class overrides, markdown renderer and link-preview resolver
464
491
  * provided by the nearest `<ChatProvider>`. Throws outside a provider — use the
@@ -469,6 +496,8 @@ declare function useChatContext(): ChatContextValue;
469
496
  declare function useOptionalChatContext(): ChatContextValue | null;
470
497
  /** The chat instance, from the prop if given, otherwise from context. */
471
498
  declare function useResolvedChat(explicit?: UseAgnoChat): UseAgnoChat;
499
+ /** The provider's link component, if one was supplied. */
500
+ declare function useLinkComponent(): LinkComponent | undefined;
472
501
  /** Merge the provider's class overrides with any passed directly. */
473
502
  declare function useResolvedClassNames(explicit?: ChatClassNames): ChatClassNames;
474
503
 
@@ -486,7 +515,7 @@ type LauncherPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left
486
515
  type LauncherPanel = 'popover' | 'fullscreen';
487
516
  interface ChatLauncherProps {
488
517
  /** The chat surface to reveal — usually `<AgnoChat>` or `<ChatWindow>`. */
489
- children: React__default.ReactNode;
518
+ children: React$1.ReactNode;
490
519
  /** Corner to pin to. Default "bottom-right". */
491
520
  position?: LauncherPosition;
492
521
  /** Distance from both edges of that corner. Number means px. Default 24. */
@@ -505,7 +534,7 @@ interface ChatLauncherProps {
505
534
  /** Text beside the bubble glyph, e.g. "Chat with us". Icon-only without it. */
506
535
  label?: string;
507
536
  /** Replaces the default speech-bubble glyph. */
508
- icon?: React__default.ReactNode;
537
+ icon?: React$1.ReactNode;
509
538
  /** Accessible name for the bubble. Default "Open chat" / "Close chat". */
510
539
  ariaLabel?: string;
511
540
  /** Close on Escape. Default true. */
@@ -524,7 +553,7 @@ interface ChatLauncherProps {
524
553
  portal?: boolean;
525
554
  className?: string;
526
555
  }
527
- declare function ChatLauncher({ children, position, offset, panel, width, height, open, defaultOpen, onOpenChange, label, icon, ariaLabel, closeOnEscape, bubbleWhenOpen, keepMounted, portal, className, }: ChatLauncherProps): React__default.ReactElement | null;
556
+ declare function ChatLauncher({ children, position, offset, panel, width, height, open, defaultOpen, onOpenChange, label, icon, ariaLabel, closeOnEscape, bubbleWhenOpen, keepMounted, portal, className, }: ChatLauncherProps): React$1.ReactElement | null;
528
557
 
529
558
  /**
530
559
  * Suggested-prompt chips — the "what can I ask?" row a support chat shows on an
@@ -546,7 +575,7 @@ interface QuickPromptsProps {
546
575
  disabled?: boolean;
547
576
  className?: string;
548
577
  }
549
- declare function QuickPrompts({ prompts, onSelect, disabled, className, }: QuickPromptsProps): React__default.ReactElement | null;
578
+ declare function QuickPrompts({ prompts, onSelect, disabled, className, }: QuickPromptsProps): React$1.ReactElement | null;
550
579
 
551
580
  /**
552
581
  * Zero-wiring chat widget. Point it at an AgentOS URL and it discovers the
@@ -592,6 +621,8 @@ interface AgnoChatProps {
592
621
  placeholder?: string;
593
622
  /** Show the attach-files control. Default true, as the AgentOS dock does. */
594
623
  allowFiles?: boolean;
624
+ /** The one-row composer instead of the dock. Suits a launcher or a sidebar. */
625
+ compactInput?: boolean;
595
626
  /** Show the past-sessions sidebar. Default false. */
596
627
  showSessions?: boolean;
597
628
  /** Render the last run error above the input. Default false. */
@@ -605,7 +636,7 @@ interface AgnoChatProps {
605
636
  */
606
637
  hideFollowups?: boolean;
607
638
  /** Heading over the follow-ups. Default "Related questions"; `null` for none. */
608
- followupsTitle?: React__default.ReactNode | null;
639
+ followupsTitle?: React$1.ReactNode | null;
609
640
  renderMarkdown?: RenderMarkdown;
610
641
  /**
611
642
  * Fill link previews with your own OpenGraph metadata. Called once per URL,
@@ -614,21 +645,23 @@ interface AgnoChatProps {
614
645
  resolveLinkPreview?: ResolveLinkPreview;
615
646
  /** Put a copy button on fenced code blocks. Defaults to true. */
616
647
  codeCopy?: boolean;
648
+ /** Render every link with your own component — a router link, say. */
649
+ linkComponent?: LinkComponent;
617
650
  /**
618
651
  * Your own header/toolbar, rendered above the chat. Nothing by default —
619
652
  * the embed ships without chrome so it drops into yours.
620
653
  */
621
- header?: React__default.ReactNode;
654
+ header?: React$1.ReactNode;
622
655
  /** Rendered below the chat, outside the composer. */
623
- footer?: React__default.ReactNode;
656
+ footer?: React$1.ReactNode;
624
657
  /** Empty-state copy shown before the first message. */
625
- emptyState?: React__default.ReactNode;
658
+ emptyState?: React$1.ReactNode;
626
659
  /** Light theme instead of the default dark. */
627
660
  light?: boolean;
628
661
  className?: string;
629
662
  /** Per-slot class overrides — see `ChatClassNames`. */
630
663
  classNames?: ChatClassNames;
631
- style?: React__default.CSSProperties;
664
+ style?: React$1.CSSProperties;
632
665
  /**
633
666
  * "inline" (default) renders the chat where you put it. "launcher" pins a
634
667
  * support-style bubble to a corner of the viewport that opens the chat.
@@ -646,14 +679,38 @@ interface AgnoChatProps {
646
679
  /** Launcher only: text beside the bubble glyph, e.g. "Chat with us". */
647
680
  launcherLabel?: string;
648
681
  /** Launcher only: replaces the default speech-bubble glyph. */
649
- launcherIcon?: React__default.ReactNode;
682
+ launcherIcon?: React$1.ReactNode;
650
683
  /** Launcher only: open on first render. Default false. */
651
684
  defaultOpen?: boolean;
652
685
  /** Launcher only: controlled open state. Pair with `onOpenChange`. */
653
686
  open?: boolean;
654
687
  onOpenChange?: (open: boolean) => void;
655
688
  }
656
- declare function AgnoChat(props: AgnoChatProps): React__default.ReactElement;
689
+ declare function AgnoChat(props: AgnoChatProps): React$1.ReactElement;
690
+
691
+ /** Scrollable transcript that auto-sticks to the bottom while streaming. */
692
+
693
+ interface MessageListProps {
694
+ /** Omit inside a `<ChatProvider>` to use the provider's transcript. */
695
+ messages?: ChatMessage[];
696
+ status?: ChatStatus;
697
+ activity?: string | null;
698
+ renderMarkdown?: RenderMarkdown;
699
+ emptyState?: React$1.ReactNode;
700
+ /** What is answering — picks the agent avatar. */
701
+ entityType?: EntityType;
702
+ /** Initials shown on the user avatar. Defaults to AgentOS's "ME". */
703
+ userInitials?: string;
704
+ /** Rendered after the last message (e.g. a human-in-the-loop panel). */
705
+ footer?: React$1.ReactNode;
706
+ /** Rendered above the first message, inside the scroll area. */
707
+ header?: React$1.ReactNode;
708
+ /** Replace how each message is rendered. */
709
+ renderMessage?: (message: ChatMessage, activity?: string | null) => React$1.ReactNode;
710
+ className?: string;
711
+ classNames?: ChatClassNames;
712
+ }
713
+ declare function MessageList({ messages, status, activity, renderMarkdown, emptyState, entityType, userInitials, footer, header, renderMessage, className, classNames, }: MessageListProps): React$1.ReactElement;
657
714
 
658
715
  /**
659
716
  * A complete chat surface built from a `useAgnoChat` result. Pass the hook's
@@ -670,8 +727,10 @@ interface ChatWindowProps {
670
727
  placeholder?: string;
671
728
  /** Initials shown on the user avatar. Defaults to AgentOS's "ME". */
672
729
  userInitials?: string;
673
- emptyState?: React__default.ReactNode;
730
+ emptyState?: React$1.ReactNode;
674
731
  allowFiles?: boolean;
732
+ /** The one-row composer instead of the dock — see `<ChatInput compact>`. */
733
+ compactInput?: boolean;
675
734
  disabled?: boolean;
676
735
  renderMarkdown?: RenderMarkdown;
677
736
  /**
@@ -689,39 +748,17 @@ interface ChatWindowProps {
689
748
  /** What a follow-up does. Defaults to sending it as the next message. */
690
749
  onFollowup?: (prompt: string) => void;
691
750
  /** Heading over the follow-ups. Default "Related questions"; `null` for none. */
692
- followupsTitle?: React__default.ReactNode | null;
751
+ followupsTitle?: React$1.ReactNode | null;
752
+ /** Replace how each message is rendered — see `<MessageList>`. */
753
+ renderMessage?: MessageListProps['renderMessage'];
693
754
  /** Rendered above the transcript (your own toolbar, title, tabs…). */
694
- header?: React__default.ReactNode;
755
+ header?: React$1.ReactNode;
695
756
  /** Replace the composer entirely. Pass `false` for a read-only transcript. */
696
- composer?: React__default.ReactNode | false;
757
+ composer?: React$1.ReactNode | false;
697
758
  className?: string;
698
759
  classNames?: ChatClassNames;
699
760
  }
700
- declare function ChatWindow({ chat: chatProp, placeholder, userInitials, emptyState, allowFiles, disabled, renderMarkdown, showErrors, quickPrompts, onQuickPrompt, hideFollowups, onFollowup, followupsTitle, header, composer, className, classNames, }: ChatWindowProps): React__default.ReactElement;
701
-
702
- /** Scrollable transcript that auto-sticks to the bottom while streaming. */
703
-
704
- interface MessageListProps {
705
- /** Omit inside a `<ChatProvider>` to use the provider's transcript. */
706
- messages?: ChatMessage[];
707
- status?: ChatStatus;
708
- activity?: string | null;
709
- renderMarkdown?: RenderMarkdown;
710
- emptyState?: React__default.ReactNode;
711
- /** What is answering — picks the agent avatar. */
712
- entityType?: EntityType;
713
- /** Initials shown on the user avatar. Defaults to AgentOS's "ME". */
714
- userInitials?: string;
715
- /** Rendered after the last message (e.g. a human-in-the-loop panel). */
716
- footer?: React__default.ReactNode;
717
- /** Rendered above the first message, inside the scroll area. */
718
- header?: React__default.ReactNode;
719
- /** Replace how each message is rendered. */
720
- renderMessage?: (message: ChatMessage, activity?: string | null) => React__default.ReactNode;
721
- className?: string;
722
- classNames?: ChatClassNames;
723
- }
724
- declare function MessageList({ messages, status, activity, renderMarkdown, emptyState, entityType, userInitials, footer, header, renderMessage, className, classNames, }: MessageListProps): React__default.ReactElement;
761
+ declare function ChatWindow({ chat: chatProp, placeholder, userInitials, emptyState, allowFiles, compactInput, disabled, renderMarkdown, showErrors, quickPrompts, onQuickPrompt, hideFollowups, onFollowup, followupsTitle, renderMessage, header, composer, className, classNames, }: ChatWindowProps): React$1.ReactElement;
725
762
 
726
763
  /** Renders a single chat message: content, tools, reasoning, media, citations, follow-ups. */
727
764
 
@@ -748,44 +785,111 @@ interface MessageProps {
748
785
  */
749
786
  onFollowup?: (prompt: string) => void;
750
787
  /** Replace the avatar entirely. Pass `false` to drop it. */
751
- avatar?: React__default.ReactNode | false;
788
+ avatar?: React$1.ReactNode | false;
752
789
  /** Rendered after the message content, inside the body. */
753
- children?: React__default.ReactNode;
790
+ children?: React$1.ReactNode;
754
791
  className?: string;
755
792
  classNames?: ChatClassNames;
756
793
  }
757
- declare function Message({ message, renderMarkdown, activity, avatar, children, className, classNames, entityType, userInitials, hideReasoning, hideTools, hideSources, onFollowup, }: MessageProps): React__default.ReactElement;
794
+ declare function Message({ message, renderMarkdown, activity, avatar, children, className, classNames, entityType, userInitials, hideReasoning, hideTools, hideSources, onFollowup, }: MessageProps): React$1.ReactElement;
758
795
 
759
796
  /**
760
797
  * The AgentOS chat dock: a rounded card holding an auto-growing textarea and a
761
798
  * bottom action row (attach on the left, send/stop on the right).
799
+ *
800
+ * It works as-is, and it also opens up for a host that needs more from the
801
+ * composer than a textarea — an @mention menu, context chips, a highlighted
802
+ * draft — without forking it:
803
+ *
804
+ * - `value` / `onValueChange` make the draft controlled.
805
+ * - `textareaProps` reach the textarea itself (key handlers, ARIA); a key
806
+ * handler that calls `preventDefault()` stops Enter from sending.
807
+ * - `renderTextarea` swaps the element for your own, given the props this one
808
+ * would have had — for a mirror-highlighted input, say.
809
+ * - `above` and `below` render inside the dock, around the field.
810
+ * - Dropped files land in the attachment tray, subject to `accept` and the
811
+ * size limits; the first reason a file was refused shows under the tray.
762
812
  */
763
813
 
764
- interface ChatInputProps {
765
- /** Omit inside a `<ChatProvider>` to send through the provider's chat. */
766
- onSend?: (message: string, files?: File[]) => void;
814
+ /** What the textarea receives — and what `renderTextarea` is handed. */
815
+ type ChatTextareaProps = React$1.TextareaHTMLAttributes<HTMLTextAreaElement> & {
816
+ ref: React$1.Ref<HTMLTextAreaElement>;
817
+ };
818
+ interface FileLimits {
819
+ /** Accepted extensions and/or MIME types, as the file picker takes them: `".md,.py,image/*"`. */
820
+ accept?: string;
821
+ /** Most files attached at once. */
822
+ maxFiles?: number;
823
+ /** Largest single file, in bytes. */
824
+ maxFileSize?: number;
825
+ /** Largest total across every attached file, in bytes. */
826
+ maxTotalSize?: number;
827
+ }
828
+ interface ChatInputProps extends FileLimits {
829
+ /**
830
+ * Omit inside a `<ChatProvider>` to send through the provider's chat. Return
831
+ * `false` (or a promise of it) to keep the draft — the send did not happen.
832
+ */
833
+ onSend?: (message: string, files?: File[]) => void | boolean | Promise<void | boolean>;
767
834
  onStop?: () => void;
768
835
  disabled?: boolean;
769
836
  busy?: boolean;
770
837
  placeholder?: string;
771
838
  /** Allow attaching files. */
772
839
  allowFiles?: boolean;
840
+ /**
841
+ * One row — the field with the buttons beside it — instead of the dock with
842
+ * its action row beneath. For a sidebar, a launcher, anywhere narrow.
843
+ */
844
+ compact?: boolean;
845
+ /** The draft, when you own it. Pair with `onValueChange`. */
846
+ value?: string;
847
+ onValueChange?: (value: string) => void;
848
+ /** Reach the textarea element. */
849
+ textareaRef?: React$1.Ref<HTMLTextAreaElement>;
850
+ /**
851
+ * Spread onto the textarea. Its `onKeyDown` runs before the Enter-to-send
852
+ * handling; call `preventDefault()` there to claim a key.
853
+ */
854
+ textareaProps?: React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
855
+ /**
856
+ * Replace the textarea with your own element, given the props this one would
857
+ * have rendered with. Your element sizes itself.
858
+ */
859
+ renderTextarea?: (props: ChatTextareaProps) => React$1.ReactNode;
860
+ /** Rendered inside the dock, above the attachment tray and the field. */
861
+ above?: React$1.ReactNode;
862
+ /** Rendered inside the dock, between the field and the action row. */
863
+ below?: React$1.ReactNode;
864
+ /** Text shown while files are dragged over the dock. */
865
+ dropLabel?: string;
773
866
  /** Rendered in the left action group — where the entity picker sits. */
774
- leading?: React__default.ReactNode;
867
+ leading?: React$1.ReactNode;
775
868
  /** Rendered in the right action group, before send. */
776
- trailing?: React__default.ReactNode;
869
+ trailing?: React$1.ReactNode;
777
870
  className?: string;
778
871
  classNames?: ChatClassNames;
779
872
  }
780
- declare function ChatInput({ onSend, onStop, disabled, busy, placeholder, allowFiles, leading, trailing, className, classNames, }: ChatInputProps): React__default.ReactElement;
873
+ /** Does the file match an `accept` list, by extension or MIME type? */
874
+ declare function fileAccepted(file: File, accept?: string): boolean;
875
+ /**
876
+ * Apply the limits to files being added. Every limit is enforced; the message
877
+ * names the first reason something was left out.
878
+ */
879
+ declare function admitFiles(current: readonly File[], incoming: readonly File[], limits: FileLimits): {
880
+ files: File[];
881
+ error: string | null;
882
+ };
883
+ declare function ChatInput({ onSend, onStop, disabled, busy, placeholder, allowFiles, compact, accept, maxFiles, maxFileSize, maxTotalSize, value: controlled, onValueChange, textareaRef: externalRef, textareaProps, renderTextarea, above, below, dropLabel, leading, trailing, className, classNames, }: ChatInputProps): React$1.ReactElement;
781
884
 
782
885
  /**
783
886
  * Attachment previews, shown in a banner above the composer field — the
784
887
  * AgentOS `FileUpload` banner: a count with a "clear all" control, then a
785
888
  * horizontally scrolling row of items.
786
889
  *
787
- * Images render as a thumbnail; everything else as a card with a file-type
788
- * mark, the name, and the MIME type.
890
+ * Images render as a bordered thumbnail; everything else as a card with a
891
+ * file-type mark, the name, and a `TYPE • SIZE` label. Every item carries its
892
+ * remove control as a tab folded into the top-right corner.
789
893
  */
790
894
 
791
895
  interface FilePreviewProps {
@@ -794,7 +898,7 @@ interface FilePreviewProps {
794
898
  onClear?: () => void;
795
899
  className?: string;
796
900
  }
797
- declare function FilePreview({ files, onRemove, onClear, className }: FilePreviewProps): React__default.ReactElement | null;
901
+ declare function FilePreview({ files, onRemove, onClear, className }: FilePreviewProps): React$1.ReactElement | null;
798
902
 
799
903
  /**
800
904
  * The AgentOS "behind the scenes" panel: everything the run did on its way to
@@ -862,7 +966,7 @@ declare function behindTheScenesItems(message: ChatMessage, opts?: Options): Beh
862
966
  declare function hasBehindTheScenes(message: ChatMessage, opts?: Options): boolean;
863
967
  /** The trigger label, mirroring AgentOS's `getBehindTheScenesLabel`. */
864
968
  declare function behindTheScenesLabel(message: ChatMessage, streaming?: boolean, activity?: string | null): string;
865
- declare function BehindTheScenes({ message, streaming, activity, renderMarkdown, defaultOpen, hideReasoning, hideTools, className, classNames, }: BehindTheScenesProps): React__default.ReactElement | null;
969
+ declare function BehindTheScenes({ message, streaming, activity, renderMarkdown, defaultOpen, hideReasoning, hideTools, className, classNames, }: BehindTheScenesProps): React$1.ReactElement | null;
866
970
 
867
971
  /**
868
972
  * Tool calls, rendered the AgentOS way: a row of compact uppercase pills above
@@ -872,14 +976,14 @@ declare function BehindTheScenes({ message, streaming, activity, renderMarkdown,
872
976
 
873
977
  declare function ToolCalls({ tools }: {
874
978
  tools?: ToolExecution[];
875
- }): React__default.ReactElement | null;
979
+ }): React$1.ReactElement | null;
876
980
 
877
981
  /** Renders a message's reasoning steps in a collapsible timeline. */
878
982
 
879
983
  declare function Reasoning({ steps, defaultOpen, }: {
880
984
  steps?: ReasoningStep[];
881
985
  defaultOpen?: boolean;
882
- }): React__default.ReactElement | null;
986
+ }): React$1.ReactElement | null;
883
987
 
884
988
  /**
885
989
  * Renders the nested runs of a team or workflow turn — each team member's
@@ -891,7 +995,7 @@ declare function MemberResponses({ members, renderMarkdown, title, }: {
891
995
  members?: SubRun[];
892
996
  renderMarkdown?: RenderMarkdown;
893
997
  title?: string;
894
- }): React__default.ReactElement | null;
998
+ }): React$1.ReactElement | null;
895
999
 
896
1000
  /**
897
1001
  * Renders the steps of a workflow run as an ordered progress list, each with a
@@ -902,7 +1006,7 @@ declare function WorkflowSteps({ steps, renderMarkdown, title, }: {
902
1006
  steps?: WorkflowStep[];
903
1007
  renderMarkdown?: RenderMarkdown;
904
1008
  title?: string;
905
- }): React__default.ReactElement | null;
1009
+ }): React$1.ReactElement | null;
906
1010
 
907
1011
  /**
908
1012
  * The sources behind an answer, as cards.
@@ -923,23 +1027,26 @@ interface CitationsProps {
923
1027
  * `citations` — pass it when the inline markers were numbered elsewhere.
924
1028
  */
925
1029
  sources?: Source[];
926
- /** Heading above the cards. Defaults to "Sources". */
1030
+ /** Heading above the cards. Defaults to "Sources used". */
927
1031
  title?: string;
928
- /** Cards shown before the "more" toggle. Defaults to 4; `0` shows them all. */
1032
+ /**
1033
+ * Pills shown in the row. The rest sit behind a "+N more" pill that opens a
1034
+ * list on hover. Defaults to 3; `0` puts every source in the row.
1035
+ */
929
1036
  max?: number;
930
1037
  className?: string;
931
1038
  classNames?: ChatClassNames;
932
1039
  }
933
1040
  /**
934
- * One card: the site's favicon and the title, linking to the source. The
935
- * number, URL and cited passage live on the hover card — a row of cards under
936
- * an answer only needs to say where it can take you.
1041
+ * One card: the site's favicon, the title and a link mark, linking to the
1042
+ * source. The number, URL and cited passage live on the hover card — a row of
1043
+ * cards under an answer only needs to say where it can take you.
937
1044
  */
938
1045
  declare function SourceCard({ source, className, }: {
939
1046
  source: Source;
940
1047
  className?: string;
941
- }): React__default.ReactElement;
942
- declare function Citations({ references, citations, sources: given, title, max, className, classNames, }: CitationsProps): React__default.ReactElement | null;
1048
+ }): React$1.ReactElement;
1049
+ declare function Citations({ references, citations, sources: given, title, max, className, classNames, }: CitationsProps): React$1.ReactElement | null;
943
1050
 
944
1051
  /**
945
1052
  * "Related questions" — the follow-up prompts an agent suggests after its
@@ -960,7 +1067,7 @@ interface FollowupsProps {
960
1067
  /** Called with the prompt text to send. */
961
1068
  onSelect: (prompt: string) => void;
962
1069
  /** Heading above the list. Pass `null` for none. Default "Related questions". */
963
- title?: React__default.ReactNode | null;
1070
+ title?: React$1.ReactNode | null;
964
1071
  /**
965
1072
  * Lines each prompt may take before it is cut with an ellipsis. Default 1;
966
1073
  * `false` lets them wrap.
@@ -975,7 +1082,7 @@ interface FollowupsProps {
975
1082
  }
976
1083
  /** Trim, drop empties, and keep the first of any duplicates (case-insensitively). */
977
1084
  declare function normalizeFollowups(items?: readonly string[] | null): string[];
978
- declare function Followups({ items, onSelect, title, lines, max, disabled, className, classNames, }: FollowupsProps): React__default.ReactElement | null;
1085
+ declare function Followups({ items, onSelect, title, lines, max, disabled, className, classNames, }: FollowupsProps): React$1.ReactElement | null;
979
1086
 
980
1087
  /**
981
1088
  * Link previews: the little card that describes where a citation points.
@@ -1005,7 +1112,7 @@ declare function Favicon({ url, kind, size, className, }: {
1005
1112
  kind?: Source['kind'];
1006
1113
  size?: number;
1007
1114
  className?: string;
1008
- }): React__default.ReactElement;
1115
+ }): React$1.ReactElement;
1009
1116
  interface LinkPreviewCardProps {
1010
1117
  source: Source;
1011
1118
  /** Resolved metadata, when a `resolveLinkPreview` returned some. */
@@ -1017,11 +1124,11 @@ interface LinkPreviewCardProps {
1017
1124
  * The preview body: site row, title, description. Shared by the hover card and
1018
1125
  * the source cards under a message, so the two always agree.
1019
1126
  */
1020
- declare function LinkPreviewCard({ source, preview, loading, className, }: LinkPreviewCardProps): React__default.ReactElement;
1127
+ declare function LinkPreviewCard({ source, preview, loading, className, }: LinkPreviewCardProps): React$1.ReactElement;
1021
1128
  interface HoverPreviewProps {
1022
1129
  source: Source;
1023
1130
  /** The trigger — a citation marker or a link in the answer. */
1024
- children: React__default.ReactElement;
1131
+ children: React$1.ReactElement;
1025
1132
  /** Turn the hover card off and render the trigger bare. */
1026
1133
  disabled?: boolean;
1027
1134
  className?: string;
@@ -1031,7 +1138,7 @@ interface HoverPreviewProps {
1031
1138
  * reveals the preview card. Escape dismisses it; the card is reachable with the
1032
1139
  * pointer, so links inside it stay clickable.
1033
1140
  */
1034
- declare function HoverPreview({ source, children, disabled, className, }: HoverPreviewProps): React__default.ReactElement;
1141
+ declare function HoverPreview({ source, children, disabled, className, }: HoverPreviewProps): React$1.ReactElement;
1035
1142
 
1036
1143
  /** Renders images, videos and audio attached to a message. */
1037
1144
 
@@ -1040,14 +1147,14 @@ declare function Multimedia({ images, videos, audio, responseAudio, }: {
1040
1147
  videos?: VideoData[];
1041
1148
  audio?: AudioData[];
1042
1149
  responseAudio?: AudioData;
1043
- }): React__default.ReactElement | null;
1150
+ }): React$1.ReactElement | null;
1044
1151
 
1045
1152
  /** A live status line showing what the run is currently doing. */
1046
1153
 
1047
1154
  declare function StatusIndicator({ status, activity, }: {
1048
1155
  status: ChatStatus;
1049
1156
  activity?: string | null;
1050
- }): React__default.ReactElement | null;
1157
+ }): React$1.ReactElement | null;
1051
1158
 
1052
1159
  /**
1053
1160
  * A developer-facing live feed of run events. Consecutive repeats of the same
@@ -1060,7 +1167,7 @@ declare function EventLog({ events, autoScroll, maxHeight, }: {
1060
1167
  events: RunEventData[];
1061
1168
  autoScroll?: boolean;
1062
1169
  maxHeight?: number;
1063
- }): React__default.ReactElement;
1170
+ }): React$1.ReactElement;
1064
1171
 
1065
1172
  /**
1066
1173
  * Human-in-the-loop panel, styled after the Agno OS chat HITL cards.
@@ -1082,7 +1189,7 @@ interface HumanInputProps {
1082
1189
  }) => void;
1083
1190
  className?: string;
1084
1191
  }
1085
- declare function HumanInput({ message, entityType, busy, onResolve, className, }: HumanInputProps): React__default.ReactElement | null;
1192
+ declare function HumanInput({ message, entityType, busy, onResolve, className, }: HumanInputProps): React$1.ReactElement | null;
1086
1193
 
1087
1194
  /**
1088
1195
  * Entity picker styled after the Agno OS chat selector: a compact bordered
@@ -1099,7 +1206,7 @@ declare function EntitySelector({ entities, value, onChange, disabled, placehold
1099
1206
  placeholder?: string;
1100
1207
  className?: string;
1101
1208
  classNames?: ChatClassNames;
1102
- }): React__default.ReactElement;
1209
+ }): React$1.ReactElement;
1103
1210
 
1104
1211
  /**
1105
1212
  * The selected agent/team/workflow, shown read-only in the composer row — the
@@ -1120,7 +1227,7 @@ interface EntityBadgeProps {
1120
1227
  hideModel?: boolean;
1121
1228
  className?: string;
1122
1229
  }
1123
- declare function EntityBadge({ entity, placeholder, hideModel, className, }: EntityBadgeProps): React__default.ReactElement | null;
1230
+ declare function EntityBadge({ entity, placeholder, hideModel, className, }: EntityBadgeProps): React$1.ReactElement | null;
1124
1231
 
1125
1232
  /**
1126
1233
  * Model-provider marks, shown on the selected-entity badge in the composer.
@@ -1141,7 +1248,7 @@ interface ProviderIconProps {
1141
1248
  * all land on the same logo. Returns null when nothing matches, and the badge
1142
1249
  * then falls back to the model name as text.
1143
1250
  */
1144
- declare function getProviderIcon(value?: string): ((props: ProviderIconProps) => React__default.ReactElement) | null;
1251
+ declare function getProviderIcon(value?: string): ((props: ProviderIconProps) => React$1.ReactElement) | null;
1145
1252
 
1146
1253
  /**
1147
1254
  * A sidebar listing the past sessions of the selected entity. Clicking a
@@ -1166,7 +1273,7 @@ interface SessionListProps {
1166
1273
  className?: string;
1167
1274
  classNames?: ChatClassNames;
1168
1275
  }
1169
- declare function SessionList({ sessions, activeSessionId, streamingSessionIds, loading, onSelect, onDelete, onNew, title, hideTitle, className, classNames, }: SessionListProps): React__default.ReactElement;
1276
+ declare function SessionList({ sessions, activeSessionId, streamingSessionIds, loading, onSelect, onDelete, onNew, title, hideTitle, className, classNames, }: SessionListProps): React$1.ReactElement;
1170
1277
 
1171
1278
  /**
1172
1279
  * The icon set.
@@ -1188,38 +1295,41 @@ type IconProps = {
1188
1295
  size?: number;
1189
1296
  className?: string;
1190
1297
  };
1191
- declare const ChevronDown: ({ size, className }: IconProps) => React__default.ReactElement;
1192
- declare const ArrowUp: ({ size, className }: IconProps) => React__default.ReactElement;
1193
- declare const Paperclip: ({ size, className }: IconProps) => React__default.ReactElement;
1194
- declare const FileIcon: ({ size, className }: IconProps) => React__default.ReactElement;
1195
- declare const FileAudio: ({ size, className }: IconProps) => React__default.ReactElement;
1196
- declare const FileVideo: ({ size, className }: IconProps) => React__default.ReactElement;
1197
- declare const Wrench: ({ size, className }: IconProps) => React__default.ReactElement;
1198
- declare const BookOpen: ({ size, className }: IconProps) => React__default.ReactElement;
1199
- declare const Globe: ({ size, className }: IconProps) => React__default.ReactElement;
1200
- declare const Brain: ({ size, className }: IconProps) => React__default.ReactElement;
1201
- declare const Box: ({ size, className }: IconProps) => React__default.ReactElement;
1202
- declare const Plus: ({ size, className }: IconProps) => React__default.ReactElement;
1203
- declare const Check: ({ size, className }: IconProps) => React__default.ReactElement;
1204
- declare const Copy: ({ size, className }: IconProps) => React__default.ReactElement;
1205
- declare const Close: ({ size, className }: IconProps) => React__default.ReactElement;
1298
+ declare const ChevronDown: ({ size, className }: IconProps) => React$1.ReactElement;
1299
+ declare const ArrowUp: ({ size, className }: IconProps) => React$1.ReactElement;
1300
+ declare const Paperclip: ({ size, className }: IconProps) => React$1.ReactElement;
1301
+ declare const FileIcon: ({ size, className }: IconProps) => React$1.ReactElement;
1302
+ declare const FileType: ({ size, className }: IconProps) => React$1.ReactElement;
1303
+ declare const FileAudio: ({ size, className }: IconProps) => React$1.ReactElement;
1304
+ declare const FileVideo: ({ size, className }: IconProps) => React$1.ReactElement;
1305
+ declare const Wrench: ({ size, className }: IconProps) => React$1.ReactElement;
1306
+ declare const BookOpen: ({ size, className }: IconProps) => React$1.ReactElement;
1307
+ declare const Globe: ({ size, className }: IconProps) => React$1.ReactElement;
1308
+ /** Trailing mark on a source pill. */
1309
+ declare const LinkIcon: ({ size, className }: IconProps) => React$1.ReactElement;
1310
+ declare const Brain: ({ size, className }: IconProps) => React$1.ReactElement;
1311
+ declare const Box: ({ size, className }: IconProps) => React$1.ReactElement;
1312
+ declare const Plus: ({ size, className }: IconProps) => React$1.ReactElement;
1313
+ declare const Check: ({ size, className }: IconProps) => React$1.ReactElement;
1314
+ declare const Copy: ({ size, className }: IconProps) => React$1.ReactElement;
1315
+ declare const Close: ({ size, className }: IconProps) => React$1.ReactElement;
1206
1316
  /** Memory-update steps. */
1207
- declare const Memory: ({ size, className }: IconProps) => React__default.ReactElement;
1317
+ declare const Memory: ({ size, className }: IconProps) => React$1.ReactElement;
1208
1318
  /** Run-continued marker. */
1209
- declare const Rerun: ({ size, className }: IconProps) => React__default.ReactElement;
1210
- declare const Pulse: ({ size, className }: IconProps) => React__default.ReactElement;
1211
- declare const Trash: ({ size, className }: IconProps) => React__default.ReactElement;
1212
- declare const ChatBubble: ({ size, className }: IconProps) => React__default.ReactElement;
1213
- declare const Spinner: ({ size, className }: IconProps) => React__default.ReactElement;
1319
+ declare const Rerun: ({ size, className }: IconProps) => React$1.ReactElement;
1320
+ declare const Pulse: ({ size, className }: IconProps) => React$1.ReactElement;
1321
+ declare const Trash: ({ size, className }: IconProps) => React$1.ReactElement;
1322
+ declare const ChatBubble: ({ size, className }: IconProps) => React$1.ReactElement;
1323
+ declare const Spinner: ({ size, className }: IconProps) => React$1.ReactElement;
1214
1324
  /** The stop control is a filled square, not an outline. */
1215
- declare function Stop({ size, className }: IconProps): React__default.ReactElement;
1325
+ declare function Stop({ size, className }: IconProps): React$1.ReactElement;
1216
1326
  /** The Agno mark — used as the agent avatar, exactly as in AgentOS. */
1217
- declare function AgnoMark({ size, className }: IconProps): React__default.ReactElement;
1327
+ declare function AgnoMark({ size, className }: IconProps): React$1.ReactElement;
1218
1328
  /** The AgentOS `team` glyph, drawn in the current colour. */
1219
- declare function TeamGlyph({ size, className }: IconProps): React__default.ReactElement;
1329
+ declare function TeamGlyph({ size, className }: IconProps): React$1.ReactElement;
1220
1330
  /** The grid loader AgentOS shows while a run is working. */
1221
1331
  declare function GridLoader({ className }: {
1222
1332
  className?: string;
1223
- }): React__default.ReactElement;
1333
+ }): React$1.ReactElement;
1224
1334
 
1225
- export { AgnoChat, type AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, type BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, type ChatClassNames, type ChatContextValue, ChatInput, type ChatInputProps, ChatLauncher, type ChatLauncherProps, ChatProvider, type ChatProviderProps, ChatWindow, type ChatWindowProps, Check, ChevronDown, Citations, type CitationsProps, Close, Copy, EntityBadge, type EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, FilePreview, type FilePreviewProps, FileVideo, Followups, type FollowupsProps, Globe, GridLoader, HoverPreview, type HoverPreviewProps, HumanInput, type HumanInputProps, type LauncherPanel, type LauncherPosition, type LinkPreview, LinkPreviewCard, type LinkPreviewCardProps, Markdown, type MarkdownProps, MemberResponses, Memory, Message, MessageList, type MessageListProps, type MessageProps, Multimedia, Paperclip, Plus, Pulse, type QuickPrompt, QuickPrompts, type QuickPromptsProps, Reasoning, type RenderMarkdown, Rerun, type ResolveLinkPreview, type SendOptions, SessionList, type SessionListProps, type Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, type UseAgnoChat, type UseAgnoChatOptions, WorkflowSteps, Wrench, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconUrl, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };
1335
+ export { AgnoChat, type AgnoChatProps, AgnoMark, ArrowUp, BehindTheScenes, type BehindTheScenesProps, BookOpen, Box, Brain, ChatBubble, type ChatClassNames, type ChatContextValue, ChatInput, type ChatInputProps, ChatLauncher, type ChatLauncherProps, ChatProvider, type ChatProviderProps, type ChatTextareaProps, ChatWindow, type ChatWindowProps, Check, ChevronDown, Citations, type CitationsProps, Close, Copy, EntityBadge, type EntityBadgeProps, EntitySelector, EventLog, Favicon, FileAudio, FileIcon, type FileLimits, FilePreview, type FilePreviewProps, FileType, FileVideo, Followups, type FollowupsProps, Globe, GridLoader, HoverPreview, type HoverPreviewProps, HumanInput, type HumanInputProps, type LauncherPanel, type LauncherPosition, type LinkComponent, LinkIcon, type LinkPreview, LinkPreviewCard, type LinkPreviewCardProps, Markdown, type MarkdownProps, MemberResponses, Memory, Message, MessageList, type MessageListProps, type MessageProps, Multimedia, Paperclip, Plus, Pulse, type QuickPrompt, QuickPrompts, type QuickPromptsProps, Reasoning, type RenderMarkdown, Rerun, type ResolveLinkPreview, type SendOptions, SessionList, type SessionListProps, type Source, SourceCard, SourcesProvider, Spinner, StatusIndicator, Stop, TeamGlyph, ToolCalls, Trash, type UseAgnoChat, type UseAgnoChatOptions, WorkflowSteps, Wrench, admitFiles, behindTheScenesItems, behindTheScenesLabel, collectSources, displayUrl, faviconUrl, fileAccepted, getProviderIcon, hasBehindTheScenes, linkCitations, normalizeFollowups, quickPromptLabel, quickPromptText, sourceHost, sourcesFromMarkdown, useAgnoChat, useChatContext, useLinkComponent, useLinkPreview, useOptionalChatContext, useResolvedChat, useResolvedClassNames, useSources, withoutSourcesLine, writeClipboard };