@rodrigocoliveira/agno-react 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/GenerativeUIRenderer.d.ts +21 -0
- package/dist/components/GenerativeUIRenderer.d.ts.map +1 -0
- package/dist/context/AgnoContext.d.ts +16 -0
- package/dist/context/AgnoContext.d.ts.map +1 -0
- package/dist/context/ToolHandlerContext.d.ts +44 -0
- package/dist/context/ToolHandlerContext.d.ts.map +1 -0
- package/dist/hooks/useAgnoActions.d.ts +25 -0
- package/dist/hooks/useAgnoActions.d.ts.map +1 -0
- package/dist/hooks/useAgnoChat.d.ts +22 -0
- package/dist/hooks/useAgnoChat.d.ts.map +1 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts +38 -0
- package/dist/hooks/useAgnoCustomEvents.d.ts.map +1 -0
- package/dist/hooks/useAgnoEvals.d.ts +39 -0
- package/dist/hooks/useAgnoEvals.d.ts.map +1 -0
- package/dist/hooks/useAgnoKnowledge.d.ts +56 -0
- package/dist/hooks/useAgnoKnowledge.d.ts.map +1 -0
- package/dist/hooks/useAgnoMemory.d.ts +42 -0
- package/dist/hooks/useAgnoMemory.d.ts.map +1 -0
- package/dist/hooks/useAgnoMetrics.d.ts +51 -0
- package/dist/hooks/useAgnoMetrics.d.ts.map +1 -0
- package/dist/hooks/useAgnoSession.d.ts +38 -0
- package/dist/hooks/useAgnoSession.d.ts.map +1 -0
- package/dist/hooks/useAgnoToolExecution.d.ts +70 -0
- package/dist/hooks/useAgnoToolExecution.d.ts.map +1 -0
- package/dist/hooks/useAgnoTraces.d.ts +51 -0
- package/dist/hooks/useAgnoTraces.d.ts.map +1 -0
- package/dist/index.d.ts +27 -723
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +924 -1060
- package/dist/index.js.map +24 -0
- package/dist/index.mjs +814 -923
- package/dist/index.mjs.map +24 -0
- package/dist/ui/components/artifact.d.ts +24 -0
- package/dist/ui/components/artifact.d.ts.map +1 -0
- package/dist/ui/components/audio-recorder.d.ts +32 -0
- package/dist/ui/components/audio-recorder.d.ts.map +1 -0
- package/dist/ui/components/code-block.d.ts +15 -0
- package/dist/ui/components/code-block.d.ts.map +1 -0
- package/dist/ui/components/conversation.d.ts +17 -0
- package/dist/ui/components/conversation.d.ts.map +1 -0
- package/dist/ui/components/file-preview-card.d.ts +13 -0
- package/dist/ui/components/file-preview-card.d.ts.map +1 -0
- package/dist/ui/components/file-preview-modal.d.ts +8 -0
- package/dist/ui/components/file-preview-modal.d.ts.map +1 -0
- package/dist/ui/components/image-lightbox.d.ts +12 -0
- package/dist/ui/components/image-lightbox.d.ts.map +1 -0
- package/dist/ui/components/message.d.ts +19 -0
- package/dist/ui/components/message.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/attachments.d.ts +21 -0
- package/dist/ui/components/prompt-input/attachments.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/buttons.d.ts +19 -0
- package/dist/ui/components/prompt-input/buttons.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/command.d.ts +17 -0
- package/dist/ui/components/prompt-input/command.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/context.d.ts +36 -0
- package/dist/ui/components/prompt-input/context.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts +7 -0
- package/dist/ui/components/prompt-input/drop-zone.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/footer.d.ts +11 -0
- package/dist/ui/components/prompt-input/footer.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/index.d.ts +25 -0
- package/dist/ui/components/prompt-input/index.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/model-select.d.ts +13 -0
- package/dist/ui/components/prompt-input/model-select.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts +22 -0
- package/dist/ui/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/provider.d.ts +6 -0
- package/dist/ui/components/prompt-input/provider.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/speech.d.ts +51 -0
- package/dist/ui/components/prompt-input/speech.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/tabs.d.ts +12 -0
- package/dist/ui/components/prompt-input/tabs.d.ts.map +1 -0
- package/dist/ui/components/prompt-input/textarea.d.ts +5 -0
- package/dist/ui/components/prompt-input/textarea.d.ts.map +1 -0
- package/dist/ui/components/response.d.ts +5 -0
- package/dist/ui/components/response.d.ts.map +1 -0
- package/dist/ui/components/smart-timestamp.d.ts +8 -0
- package/dist/ui/components/smart-timestamp.d.ts.map +1 -0
- package/dist/ui/components/streaming-indicator.d.ts +8 -0
- package/dist/ui/components/streaming-indicator.d.ts.map +1 -0
- package/dist/ui/components/tool.d.ts +24 -0
- package/dist/ui/components/tool.d.ts.map +1 -0
- package/dist/ui/composed/AgnoChatInput.d.ts +38 -0
- package/dist/ui/composed/AgnoChatInput.d.ts.map +1 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts +38 -0
- package/dist/ui/composed/AgnoMessageItem.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts +9 -0
- package/dist/ui/composed/agno-chat/agno-chat.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/context.d.ts +33 -0
- package/dist/ui/composed/agno-chat/context.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts +6 -0
- package/dist/ui/composed/agno-chat/empty-state.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts +16 -0
- package/dist/ui/composed/agno-chat/error-bar.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/index.d.ts +33 -0
- package/dist/ui/composed/agno-chat/index.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/input.d.ts +34 -0
- package/dist/ui/composed/agno-chat/input.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/messages.d.ts +45 -0
- package/dist/ui/composed/agno-chat/messages.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts +7 -0
- package/dist/ui/composed/agno-chat/suggested-prompts.d.ts.map +1 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts +5 -0
- package/dist/ui/composed/agno-chat/tool-status.d.ts.map +1 -0
- package/dist/ui/composed/index.d.ts +7 -0
- package/dist/ui/composed/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +57 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/lib/cn.d.ts +3 -0
- package/dist/ui/lib/cn.d.ts.map +1 -0
- package/dist/ui/lib/file-utils.d.ts +20 -0
- package/dist/ui/lib/file-utils.d.ts.map +1 -0
- package/dist/ui/lib/format-timestamp.d.ts +16 -0
- package/dist/ui/lib/format-timestamp.d.ts.map +1 -0
- package/dist/ui/primitives/accordion.d.ts +8 -0
- package/dist/ui/primitives/accordion.d.ts.map +1 -0
- package/dist/ui/primitives/avatar.d.ts +7 -0
- package/dist/ui/primitives/avatar.d.ts.map +1 -0
- package/dist/ui/primitives/badge.d.ts +10 -0
- package/dist/ui/primitives/badge.d.ts.map +1 -0
- package/dist/ui/primitives/button.d.ts +12 -0
- package/dist/ui/primitives/button.d.ts.map +1 -0
- package/dist/ui/primitives/collapsible.d.ts +6 -0
- package/dist/ui/primitives/collapsible.d.ts.map +1 -0
- package/dist/ui/primitives/command.d.ts +79 -0
- package/dist/ui/primitives/command.d.ts.map +1 -0
- package/dist/ui/primitives/dialog.d.ts +26 -0
- package/dist/ui/primitives/dialog.d.ts.map +1 -0
- package/dist/ui/primitives/dropdown-menu.d.ts +28 -0
- package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/primitives/hover-card.d.ts +7 -0
- package/dist/ui/primitives/hover-card.d.ts.map +1 -0
- package/dist/ui/primitives/index.d.ts +16 -0
- package/dist/ui/primitives/index.d.ts.map +1 -0
- package/dist/ui/primitives/input-group.d.ts +17 -0
- package/dist/ui/primitives/input-group.d.ts.map +1 -0
- package/dist/ui/primitives/select.d.ts +14 -0
- package/dist/ui/primitives/select.d.ts.map +1 -0
- package/dist/ui/primitives/tooltip.d.ts +8 -0
- package/dist/ui/primitives/tooltip.d.ts.map +1 -0
- package/dist/ui/types.d.ts +91 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui.d.ts +2 -891
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +2963 -2496
- package/dist/ui.js.map +59 -0
- package/dist/ui.mjs +2854 -2232
- package/dist/ui.mjs.map +59 -0
- package/dist/utils/component-registry.d.ts +63 -0
- package/dist/utils/component-registry.d.ts.map +1 -0
- package/dist/utils/ui-helpers.d.ts +165 -0
- package/dist/utils/ui-helpers.d.ts.map +1 -0
- package/package.json +9 -10
- package/LICENSE +0 -21
- package/dist/index.d.mts +0 -724
- package/dist/ui.d.mts +0 -891
package/dist/ui.d.mts
DELETED
|
@@ -1,891 +0,0 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { ReactNode, HTMLAttributes, ComponentProps, RefObject, PropsWithChildren, FormEvent } from 'react';
|
|
4
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
-
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
-
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
8
|
-
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
9
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
10
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
11
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
|
-
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
13
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
14
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
15
|
-
import { StickToBottom } from 'use-stick-to-bottom';
|
|
16
|
-
import { Streamdown } from 'streamdown';
|
|
17
|
-
import { LucideIcon } from 'lucide-react';
|
|
18
|
-
import { ChatMessage, ClientState, ToolCall } from '@rodrigocoliveira/agno-types';
|
|
19
|
-
import { ToolHandler } from '@rodrigocoliveira/agno-react';
|
|
20
|
-
|
|
21
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Smart timestamp formatting utilities using Intl.DateTimeFormat (zero deps).
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Formats a date with smart relative context:
|
|
28
|
-
* - Today: "09:06 AM"
|
|
29
|
-
* - This year: "Feb 19"
|
|
30
|
-
* - Other year: "Feb 18, 2025"
|
|
31
|
-
*/
|
|
32
|
-
declare function formatSmartTimestamp(date: Date): string;
|
|
33
|
-
/**
|
|
34
|
-
* Formats a full timestamp for tooltip display.
|
|
35
|
-
* Always shows: "Feb 19, 2026, 09:50 AM"
|
|
36
|
-
*/
|
|
37
|
-
declare function formatFullTimestamp(date: Date): string;
|
|
38
|
-
|
|
39
|
-
type FilePreviewType = 'image' | 'pdf' | 'text' | 'video' | 'audio' | 'none';
|
|
40
|
-
/**
|
|
41
|
-
* Determines the preview type for a given MIME type.
|
|
42
|
-
*/
|
|
43
|
-
declare function getFilePreviewType(mimeType?: string): FilePreviewType;
|
|
44
|
-
/**
|
|
45
|
-
* Formats bytes into a human-readable file size string.
|
|
46
|
-
* e.g. 2457600 => "2.4 MB"
|
|
47
|
-
*/
|
|
48
|
-
declare function formatFileSize(bytes: number): string;
|
|
49
|
-
/**
|
|
50
|
-
* Extracts the file extension from a filename.
|
|
51
|
-
* Optionally falls back to deriving extension from MIME type.
|
|
52
|
-
*/
|
|
53
|
-
declare function getFileExtension(filename: string, mimeType?: string): string;
|
|
54
|
-
/**
|
|
55
|
-
* Returns true if the MIME type is previewable in the browser.
|
|
56
|
-
*/
|
|
57
|
-
declare function isPreviewable(mimeType?: string): boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Tool execution state - replaces Vercel AI SDK's ToolUIPart["state"]
|
|
61
|
-
*/
|
|
62
|
-
type ToolState = 'input-streaming' | 'input-available' | 'approval-requested' | 'approval-responded' | 'output-available' | 'output-error' | 'output-denied';
|
|
63
|
-
/**
|
|
64
|
-
* File attachment type - replaces Vercel AI SDK's FileUIPart
|
|
65
|
-
*/
|
|
66
|
-
type FileAttachment = {
|
|
67
|
-
type: 'file';
|
|
68
|
-
url: string;
|
|
69
|
-
mediaType?: string;
|
|
70
|
-
filename?: string;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Chat status for UI state management
|
|
74
|
-
*/
|
|
75
|
-
type ChatStatus = 'idle' | 'submitted' | 'streaming' | 'error';
|
|
76
|
-
/**
|
|
77
|
-
* Suggested prompt for empty state
|
|
78
|
-
*/
|
|
79
|
-
type SuggestedPrompt = {
|
|
80
|
-
icon?: ReactNode;
|
|
81
|
-
text: string;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* File upload configuration
|
|
85
|
-
*/
|
|
86
|
-
type FileUploadConfig = {
|
|
87
|
-
accept?: string;
|
|
88
|
-
multiple?: boolean;
|
|
89
|
-
maxFiles?: number;
|
|
90
|
-
maxFileSize?: number;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* ClassNames override map for composed components
|
|
94
|
-
*/
|
|
95
|
-
type AgnoChatInterfaceClassNames = {
|
|
96
|
-
root?: string;
|
|
97
|
-
messagesArea?: string;
|
|
98
|
-
inputArea?: string;
|
|
99
|
-
toolStatusBar?: string;
|
|
100
|
-
errorBar?: string;
|
|
101
|
-
dropZone?: string;
|
|
102
|
-
};
|
|
103
|
-
type AgnoMessageItemClassNames = {
|
|
104
|
-
root?: string;
|
|
105
|
-
userBubble?: string;
|
|
106
|
-
assistantContainer?: string;
|
|
107
|
-
toolCalls?: string;
|
|
108
|
-
reasoning?: string;
|
|
109
|
-
references?: string;
|
|
110
|
-
media?: string;
|
|
111
|
-
actions?: string;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
declare const buttonVariants: (props?: ({
|
|
115
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
116
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
117
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
118
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
119
|
-
asChild?: boolean;
|
|
120
|
-
}
|
|
121
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
122
|
-
|
|
123
|
-
declare const badgeVariants: (props?: ({
|
|
124
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
125
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
126
|
-
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
127
|
-
}
|
|
128
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
129
|
-
|
|
130
|
-
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
131
|
-
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
132
|
-
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
133
|
-
|
|
134
|
-
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
135
|
-
declare const inputGroupAddonVariants: (props?: ({
|
|
136
|
-
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
137
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
138
|
-
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
|
|
139
|
-
declare const inputGroupButtonVariants: (props?: ({
|
|
140
|
-
size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
|
|
141
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
142
|
-
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): react_jsx_runtime.JSX.Element;
|
|
143
|
-
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
144
|
-
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
145
|
-
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
|
|
146
|
-
|
|
147
|
-
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
148
|
-
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
149
|
-
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
150
|
-
|
|
151
|
-
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
152
|
-
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
153
|
-
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
154
|
-
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
155
|
-
|
|
156
|
-
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
157
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
158
|
-
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
159
|
-
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
160
|
-
|
|
161
|
-
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
162
|
-
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
163
|
-
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
164
|
-
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
165
|
-
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
166
|
-
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
167
|
-
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
168
|
-
inset?: boolean;
|
|
169
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
170
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
171
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
172
|
-
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
173
|
-
inset?: boolean;
|
|
174
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
175
|
-
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
176
|
-
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
177
|
-
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
178
|
-
inset?: boolean;
|
|
179
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
180
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
181
|
-
declare const DropdownMenuShortcut: {
|
|
182
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
183
|
-
displayName: string;
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
|
|
187
|
-
declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
188
|
-
declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
189
|
-
|
|
190
|
-
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
191
|
-
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
192
|
-
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
193
|
-
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
194
|
-
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
195
|
-
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
196
|
-
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
197
|
-
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
198
|
-
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
199
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
200
|
-
|
|
201
|
-
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
202
|
-
children?: React.ReactNode;
|
|
203
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
204
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
205
|
-
} & {
|
|
206
|
-
asChild?: boolean;
|
|
207
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
208
|
-
label?: string;
|
|
209
|
-
shouldFilter?: boolean;
|
|
210
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
211
|
-
defaultValue?: string;
|
|
212
|
-
value?: string;
|
|
213
|
-
onValueChange?: (value: string) => void;
|
|
214
|
-
loop?: boolean;
|
|
215
|
-
disablePointerSelection?: boolean;
|
|
216
|
-
vimBindings?: boolean;
|
|
217
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
218
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
219
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
220
|
-
} & {
|
|
221
|
-
asChild?: boolean;
|
|
222
|
-
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
223
|
-
value?: string;
|
|
224
|
-
onValueChange?: (search: string) => void;
|
|
225
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
226
|
-
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
227
|
-
children?: React.ReactNode;
|
|
228
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
229
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
230
|
-
} & {
|
|
231
|
-
asChild?: boolean;
|
|
232
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
233
|
-
label?: string;
|
|
234
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
235
|
-
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
236
|
-
children?: React.ReactNode;
|
|
237
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
238
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
239
|
-
} & {
|
|
240
|
-
asChild?: boolean;
|
|
241
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
242
|
-
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
243
|
-
children?: React.ReactNode;
|
|
244
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
245
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
246
|
-
} & {
|
|
247
|
-
asChild?: boolean;
|
|
248
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
249
|
-
heading?: React.ReactNode;
|
|
250
|
-
value?: string;
|
|
251
|
-
forceMount?: boolean;
|
|
252
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
253
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
254
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
255
|
-
} & {
|
|
256
|
-
asChild?: boolean;
|
|
257
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
258
|
-
alwaysRender?: boolean;
|
|
259
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
260
|
-
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
261
|
-
children?: React.ReactNode;
|
|
262
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
263
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
264
|
-
} & {
|
|
265
|
-
asChild?: boolean;
|
|
266
|
-
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
267
|
-
disabled?: boolean;
|
|
268
|
-
onSelect?: (value: string) => void;
|
|
269
|
-
value?: string;
|
|
270
|
-
keywords?: string[];
|
|
271
|
-
forceMount?: boolean;
|
|
272
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
273
|
-
declare const CommandShortcut: {
|
|
274
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
275
|
-
displayName: string;
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
279
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
280
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
281
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
282
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
283
|
-
declare const dialogContentVariants: (props?: ({
|
|
284
|
-
variant?: "default" | "lightbox" | null | undefined;
|
|
285
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
286
|
-
interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof dialogContentVariants> {
|
|
287
|
-
}
|
|
288
|
-
declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
289
|
-
declare const DialogHeader: {
|
|
290
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
291
|
-
displayName: string;
|
|
292
|
-
};
|
|
293
|
-
declare const DialogFooter: {
|
|
294
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
295
|
-
displayName: string;
|
|
296
|
-
};
|
|
297
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
298
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
299
|
-
|
|
300
|
-
type MessageProps = HTMLAttributes<HTMLDivElement> & {
|
|
301
|
-
from: 'user' | 'assistant' | 'system' | 'tool';
|
|
302
|
-
};
|
|
303
|
-
declare const Message: ({ className, from, ...props }: MessageProps) => react_jsx_runtime.JSX.Element;
|
|
304
|
-
declare const messageContentVariants: (props?: ({
|
|
305
|
-
variant?: "contained" | "flat" | null | undefined;
|
|
306
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
307
|
-
type MessageContentProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof messageContentVariants>;
|
|
308
|
-
declare const MessageContent: ({ children, className, variant, ...props }: MessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
309
|
-
type MessageAvatarProps = ComponentProps<typeof Avatar> & {
|
|
310
|
-
src: string;
|
|
311
|
-
name?: string;
|
|
312
|
-
};
|
|
313
|
-
declare const MessageAvatar: ({ src, name, className, ...props }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
314
|
-
|
|
315
|
-
type ConversationProps = ComponentProps<typeof StickToBottom>;
|
|
316
|
-
declare const Conversation: ({ className, ...props }: ConversationProps) => react_jsx_runtime.JSX.Element;
|
|
317
|
-
type ConversationContentProps = ComponentProps<typeof StickToBottom.Content>;
|
|
318
|
-
declare const ConversationContent: ({ className, ...props }: ConversationContentProps) => react_jsx_runtime.JSX.Element;
|
|
319
|
-
type ConversationEmptyStateProps = ComponentProps<'div'> & {
|
|
320
|
-
title?: string;
|
|
321
|
-
description?: string;
|
|
322
|
-
icon?: ReactNode;
|
|
323
|
-
};
|
|
324
|
-
declare const ConversationEmptyState: ({ className, title, description, icon, children, ...props }: ConversationEmptyStateProps) => react_jsx_runtime.JSX.Element;
|
|
325
|
-
|
|
326
|
-
type ConversationScrollButtonProps = ComponentProps<typeof Button>;
|
|
327
|
-
declare const ConversationScrollButton: ({ className, ...props }: ConversationScrollButtonProps) => false | react_jsx_runtime.JSX.Element;
|
|
328
|
-
|
|
329
|
-
type ResponseProps = ComponentProps<typeof Streamdown>;
|
|
330
|
-
declare const Response: React.MemoExoticComponent<({ className, ...props }: ResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
331
|
-
|
|
332
|
-
type ToolProps = ComponentProps<typeof Collapsible>;
|
|
333
|
-
declare const Tool: ({ className, ...props }: ToolProps) => react_jsx_runtime.JSX.Element;
|
|
334
|
-
type ToolHeaderProps = {
|
|
335
|
-
title?: string;
|
|
336
|
-
type?: string;
|
|
337
|
-
state: ToolState;
|
|
338
|
-
className?: string;
|
|
339
|
-
};
|
|
340
|
-
declare const ToolHeader: ({ className, title, type, state, ...props }: ToolHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
341
|
-
type ToolContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
342
|
-
declare const ToolContent: ({ className, ...props }: ToolContentProps) => react_jsx_runtime.JSX.Element;
|
|
343
|
-
type ToolInputProps = ComponentProps<'div'> & {
|
|
344
|
-
input: unknown;
|
|
345
|
-
};
|
|
346
|
-
declare const ToolInput: ({ className, input, ...props }: ToolInputProps) => react_jsx_runtime.JSX.Element;
|
|
347
|
-
type ToolOutputProps = ComponentProps<'div'> & {
|
|
348
|
-
output: unknown;
|
|
349
|
-
errorText?: string;
|
|
350
|
-
};
|
|
351
|
-
declare const ToolOutput: ({ className, output, errorText, ...props }: ToolOutputProps) => react_jsx_runtime.JSX.Element | null;
|
|
352
|
-
|
|
353
|
-
type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {
|
|
354
|
-
code: string;
|
|
355
|
-
language: string;
|
|
356
|
-
showLineNumbers?: boolean;
|
|
357
|
-
};
|
|
358
|
-
declare const CodeBlock: ({ code, language, showLineNumbers, className, children, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element;
|
|
359
|
-
type CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {
|
|
360
|
-
onCopy?: () => void;
|
|
361
|
-
onError?: (error: Error) => void;
|
|
362
|
-
timeout?: number;
|
|
363
|
-
};
|
|
364
|
-
declare const CodeBlockCopyButton: ({ onCopy, onError, timeout, children, className, ...props }: CodeBlockCopyButtonProps) => react_jsx_runtime.JSX.Element;
|
|
365
|
-
|
|
366
|
-
type ArtifactProps = HTMLAttributes<HTMLDivElement>;
|
|
367
|
-
declare const Artifact: ({ className, ...props }: ArtifactProps) => react_jsx_runtime.JSX.Element;
|
|
368
|
-
type ArtifactHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
369
|
-
declare const ArtifactHeader: ({ className, ...props }: ArtifactHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
370
|
-
type ArtifactCloseProps = ComponentProps<typeof Button>;
|
|
371
|
-
declare const ArtifactClose: ({ className, children, size, variant, ...props }: ArtifactCloseProps) => react_jsx_runtime.JSX.Element;
|
|
372
|
-
type ArtifactTitleProps = HTMLAttributes<HTMLParagraphElement>;
|
|
373
|
-
declare const ArtifactTitle: ({ className, ...props }: ArtifactTitleProps) => react_jsx_runtime.JSX.Element;
|
|
374
|
-
type ArtifactDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
375
|
-
declare const ArtifactDescription: ({ className, ...props }: ArtifactDescriptionProps) => react_jsx_runtime.JSX.Element;
|
|
376
|
-
type ArtifactActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
377
|
-
declare const ArtifactActions: ({ className, ...props }: ArtifactActionsProps) => react_jsx_runtime.JSX.Element;
|
|
378
|
-
type ArtifactActionProps = ComponentProps<typeof Button> & {
|
|
379
|
-
tooltip?: string;
|
|
380
|
-
label?: string;
|
|
381
|
-
icon?: LucideIcon;
|
|
382
|
-
};
|
|
383
|
-
declare const ArtifactAction: ({ tooltip, label, icon: Icon, children, className, size, variant, ...props }: ArtifactActionProps) => react_jsx_runtime.JSX.Element;
|
|
384
|
-
type ArtifactContentProps = HTMLAttributes<HTMLDivElement>;
|
|
385
|
-
declare const ArtifactContent: ({ className, ...props }: ArtifactContentProps) => react_jsx_runtime.JSX.Element;
|
|
386
|
-
|
|
387
|
-
type StreamingIndicatorProps = HTMLAttributes<HTMLDivElement> & {
|
|
388
|
-
icon?: ReactNode;
|
|
389
|
-
/** Full avatar element — overrides the default avatar container and icon */
|
|
390
|
-
avatar?: ReactNode;
|
|
391
|
-
};
|
|
392
|
-
declare function StreamingIndicator({ className, icon, avatar, ...props }: StreamingIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
393
|
-
|
|
394
|
-
interface AudioRecorderLabels {
|
|
395
|
-
recordAudio?: string;
|
|
396
|
-
stopRecording?: string;
|
|
397
|
-
transcribing?: string;
|
|
398
|
-
}
|
|
399
|
-
interface AudioRecorderProps {
|
|
400
|
-
/** Called with WAV blob when recording completes in 'send' mode */
|
|
401
|
-
onRecordingComplete: (blob: Blob) => void;
|
|
402
|
-
disabled?: boolean;
|
|
403
|
-
className?: string;
|
|
404
|
-
/** Audio mode: 'send' sends blob immediately, 'transcribe' posts to endpoint and returns text */
|
|
405
|
-
mode?: 'send' | 'transcribe';
|
|
406
|
-
/** Transcription endpoint URL (required when mode='transcribe') */
|
|
407
|
-
transcriptionEndpoint?: string;
|
|
408
|
-
/** Extra headers for transcription request (e.g., Authorization) */
|
|
409
|
-
transcriptionHeaders?: Record<string, string>;
|
|
410
|
-
/** Called with transcribed text when transcription completes */
|
|
411
|
-
onTranscriptionComplete?: (text: string) => void;
|
|
412
|
-
/** Field name for the audio file in the FormData (default: 'file') */
|
|
413
|
-
transcriptionFieldName?: string;
|
|
414
|
-
/** Custom parser for the transcription response — receives the parsed JSON and returns the text.
|
|
415
|
-
* Default: looks for data.text || data.transcript || data.transcription */
|
|
416
|
-
parseTranscriptionResponse?: (data: unknown) => string;
|
|
417
|
-
/** Optional async callback to request microphone permission before recording starts.
|
|
418
|
-
* Useful in WebView environments (e.g., Expo) where you need to bridge to the native layer
|
|
419
|
-
* via postMessage to request permissions. Return true to proceed, false to cancel. */
|
|
420
|
-
onRequestPermission?: () => Promise<boolean>;
|
|
421
|
-
/** Custom labels for the audio recorder button (useful for i18n) */
|
|
422
|
-
labels?: AudioRecorderLabels;
|
|
423
|
-
}
|
|
424
|
-
declare function AudioRecorder({ onRecordingComplete, disabled, className, mode, transcriptionEndpoint, transcriptionHeaders, onTranscriptionComplete, transcriptionFieldName, parseTranscriptionResponse, onRequestPermission, labels, }: AudioRecorderProps): react_jsx_runtime.JSX.Element | null;
|
|
425
|
-
|
|
426
|
-
interface SmartTimestampProps {
|
|
427
|
-
date: Date;
|
|
428
|
-
/** Override the short display text (e.g. custom formatTimestamp prop) */
|
|
429
|
-
formatShort?: (date: Date) => string;
|
|
430
|
-
className?: string;
|
|
431
|
-
}
|
|
432
|
-
declare function SmartTimestamp({ date, formatShort, className }: SmartTimestampProps): react_jsx_runtime.JSX.Element;
|
|
433
|
-
|
|
434
|
-
interface FilePreviewFile {
|
|
435
|
-
name: string;
|
|
436
|
-
type?: string;
|
|
437
|
-
url?: string;
|
|
438
|
-
size?: number;
|
|
439
|
-
}
|
|
440
|
-
interface FilePreviewCardProps {
|
|
441
|
-
file: FilePreviewFile;
|
|
442
|
-
onClick?: () => void;
|
|
443
|
-
className?: string;
|
|
444
|
-
}
|
|
445
|
-
declare function FilePreviewCard({ file, onClick, className }: FilePreviewCardProps): react_jsx_runtime.JSX.Element;
|
|
446
|
-
|
|
447
|
-
interface FilePreviewModalProps {
|
|
448
|
-
open: boolean;
|
|
449
|
-
onOpenChange: (open: boolean) => void;
|
|
450
|
-
file: FilePreviewFile | null;
|
|
451
|
-
}
|
|
452
|
-
declare function FilePreviewModal({ open, onOpenChange, file }: FilePreviewModalProps): react_jsx_runtime.JSX.Element | null;
|
|
453
|
-
|
|
454
|
-
interface LightboxImage {
|
|
455
|
-
url: string;
|
|
456
|
-
alt?: string;
|
|
457
|
-
}
|
|
458
|
-
interface ImageLightboxProps {
|
|
459
|
-
open: boolean;
|
|
460
|
-
onOpenChange: (open: boolean) => void;
|
|
461
|
-
images: LightboxImage[];
|
|
462
|
-
initialIndex?: number;
|
|
463
|
-
}
|
|
464
|
-
declare function ImageLightbox({ open, onOpenChange, images, initialIndex }: ImageLightboxProps): react_jsx_runtime.JSX.Element | null;
|
|
465
|
-
|
|
466
|
-
type AttachmentsContext = {
|
|
467
|
-
files: (FileAttachment & {
|
|
468
|
-
id: string;
|
|
469
|
-
})[];
|
|
470
|
-
add: (files: File[] | FileList) => void;
|
|
471
|
-
remove: (id: string) => void;
|
|
472
|
-
clear: () => void;
|
|
473
|
-
openFileDialog: () => void;
|
|
474
|
-
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
475
|
-
};
|
|
476
|
-
type TextInputContext = {
|
|
477
|
-
value: string;
|
|
478
|
-
setInput: (v: string) => void;
|
|
479
|
-
clear: () => void;
|
|
480
|
-
};
|
|
481
|
-
type PromptInputControllerProps = {
|
|
482
|
-
textInput: TextInputContext;
|
|
483
|
-
attachments: AttachmentsContext;
|
|
484
|
-
__registerFileInput: (ref: RefObject<HTMLInputElement | null>, open: () => void) => void;
|
|
485
|
-
};
|
|
486
|
-
declare const usePromptInputController: () => PromptInputControllerProps;
|
|
487
|
-
declare const useProviderAttachments: () => AttachmentsContext;
|
|
488
|
-
declare const usePromptInputAttachments: () => AttachmentsContext;
|
|
489
|
-
type DropZoneContextValue = {
|
|
490
|
-
isDraggingOver: boolean;
|
|
491
|
-
};
|
|
492
|
-
declare const usePromptInputDropZone: () => DropZoneContextValue;
|
|
493
|
-
|
|
494
|
-
type PromptInputProviderProps = PropsWithChildren<{
|
|
495
|
-
initialInput?: string;
|
|
496
|
-
}>;
|
|
497
|
-
declare function PromptInputProvider({ initialInput: initialTextInput, children }: PromptInputProviderProps): react_jsx_runtime.JSX.Element;
|
|
498
|
-
|
|
499
|
-
type PromptInputMessage = {
|
|
500
|
-
text?: string;
|
|
501
|
-
files?: FileAttachment[];
|
|
502
|
-
};
|
|
503
|
-
type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> & {
|
|
504
|
-
accept?: string;
|
|
505
|
-
multiple?: boolean;
|
|
506
|
-
globalDrop?: boolean;
|
|
507
|
-
syncHiddenInput?: boolean;
|
|
508
|
-
maxFiles?: number;
|
|
509
|
-
maxFileSize?: number;
|
|
510
|
-
dragListenerTarget?: RefObject<HTMLElement | null>;
|
|
511
|
-
onError?: (err: {
|
|
512
|
-
code: 'max_files' | 'max_file_size' | 'accept';
|
|
513
|
-
message: string;
|
|
514
|
-
}) => void;
|
|
515
|
-
onSubmit: (message: PromptInputMessage, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
|
|
516
|
-
};
|
|
517
|
-
declare const PromptInput: ({ className, accept, multiple, globalDrop, syncHiddenInput, maxFiles, maxFileSize, dragListenerTarget, onError, onSubmit, children, ...props }: PromptInputProps) => react_jsx_runtime.JSX.Element;
|
|
518
|
-
|
|
519
|
-
type PromptInputTextareaProps = ComponentProps<typeof InputGroupTextarea>;
|
|
520
|
-
declare const PromptInputTextarea: ({ onChange, className, placeholder, ...props }: PromptInputTextareaProps) => react_jsx_runtime.JSX.Element;
|
|
521
|
-
|
|
522
|
-
type PromptInputAttachmentProps = HTMLAttributes<HTMLDivElement> & {
|
|
523
|
-
data: FileAttachment & {
|
|
524
|
-
id: string;
|
|
525
|
-
};
|
|
526
|
-
className?: string;
|
|
527
|
-
};
|
|
528
|
-
declare function PromptInputAttachment({ data, className, ...props }: PromptInputAttachmentProps): react_jsx_runtime.JSX.Element;
|
|
529
|
-
type PromptInputAttachmentsProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
530
|
-
children: (attachment: FileAttachment & {
|
|
531
|
-
id: string;
|
|
532
|
-
}) => ReactNode;
|
|
533
|
-
};
|
|
534
|
-
declare function PromptInputAttachments({ children }: PromptInputAttachmentsProps): react_jsx_runtime.JSX.Element[] | null;
|
|
535
|
-
type PromptInputActionAddAttachmentsProps = ComponentProps<typeof DropdownMenuItem> & {
|
|
536
|
-
label?: string;
|
|
537
|
-
};
|
|
538
|
-
declare const PromptInputActionAddAttachments: ({ label, ...props }: PromptInputActionAddAttachmentsProps) => react_jsx_runtime.JSX.Element;
|
|
539
|
-
|
|
540
|
-
type PromptInputBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
541
|
-
declare const PromptInputBody: ({ className, ...props }: PromptInputBodyProps) => react_jsx_runtime.JSX.Element;
|
|
542
|
-
type PromptInputHeaderProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
|
|
543
|
-
declare const PromptInputHeader: ({ className, ...props }: PromptInputHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
544
|
-
type PromptInputFooterProps = Omit<ComponentProps<typeof InputGroupAddon>, 'align'>;
|
|
545
|
-
declare const PromptInputFooter: ({ className, ...props }: PromptInputFooterProps) => react_jsx_runtime.JSX.Element;
|
|
546
|
-
type PromptInputToolsProps = HTMLAttributes<HTMLDivElement>;
|
|
547
|
-
declare const PromptInputTools: ({ className, ...props }: PromptInputToolsProps) => react_jsx_runtime.JSX.Element;
|
|
548
|
-
|
|
549
|
-
type PromptInputButtonProps = ComponentProps<typeof InputGroupButton>;
|
|
550
|
-
declare const PromptInputButton: ({ variant, className, size, ...props }: PromptInputButtonProps) => react_jsx_runtime.JSX.Element;
|
|
551
|
-
type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
|
|
552
|
-
status?: ChatStatus;
|
|
553
|
-
};
|
|
554
|
-
declare const PromptInputSubmit: ({ className, variant, size, status, children, ...props }: PromptInputSubmitProps) => react_jsx_runtime.JSX.Element;
|
|
555
|
-
type PromptInputActionMenuProps = ComponentProps<typeof DropdownMenu>;
|
|
556
|
-
declare const PromptInputActionMenu: (props: PromptInputActionMenuProps) => react_jsx_runtime.JSX.Element;
|
|
557
|
-
type PromptInputActionMenuTriggerProps = PromptInputButtonProps;
|
|
558
|
-
declare const PromptInputActionMenuTrigger: ({ className, children, ...props }: PromptInputActionMenuTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
559
|
-
type PromptInputActionMenuContentProps = ComponentProps<typeof DropdownMenuContent>;
|
|
560
|
-
declare const PromptInputActionMenuContent: ({ className, ...props }: PromptInputActionMenuContentProps) => react_jsx_runtime.JSX.Element;
|
|
561
|
-
type PromptInputActionMenuItemProps = ComponentProps<typeof DropdownMenuItem>;
|
|
562
|
-
declare const PromptInputActionMenuItem: ({ className, ...props }: PromptInputActionMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
563
|
-
|
|
564
|
-
type PromptInputDropZoneProps = HTMLAttributes<HTMLDivElement> & {
|
|
565
|
-
label?: string;
|
|
566
|
-
container?: RefObject<HTMLElement | null>;
|
|
567
|
-
};
|
|
568
|
-
declare const PromptInputDropZone: ({ label, className, container, ...props }: PromptInputDropZoneProps) => react_jsx_runtime.JSX.Element;
|
|
569
|
-
|
|
570
|
-
interface SpeechRecognition extends EventTarget {
|
|
571
|
-
continuous: boolean;
|
|
572
|
-
interimResults: boolean;
|
|
573
|
-
lang: string;
|
|
574
|
-
start(): void;
|
|
575
|
-
stop(): void;
|
|
576
|
-
onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
577
|
-
onend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
578
|
-
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
|
|
579
|
-
onerror: ((this: SpeechRecognition, ev: SpeechRecognitionErrorEvent) => any) | null;
|
|
580
|
-
}
|
|
581
|
-
interface SpeechRecognitionEvent extends Event {
|
|
582
|
-
results: SpeechRecognitionResultList;
|
|
583
|
-
}
|
|
584
|
-
type SpeechRecognitionResultList = {
|
|
585
|
-
readonly length: number;
|
|
586
|
-
item(index: number): SpeechRecognitionResult;
|
|
587
|
-
[index: number]: SpeechRecognitionResult;
|
|
588
|
-
};
|
|
589
|
-
type SpeechRecognitionResult = {
|
|
590
|
-
readonly length: number;
|
|
591
|
-
item(index: number): SpeechRecognitionAlternative;
|
|
592
|
-
[index: number]: SpeechRecognitionAlternative;
|
|
593
|
-
isFinal: boolean;
|
|
594
|
-
};
|
|
595
|
-
type SpeechRecognitionAlternative = {
|
|
596
|
-
transcript: string;
|
|
597
|
-
confidence: number;
|
|
598
|
-
};
|
|
599
|
-
interface SpeechRecognitionErrorEvent extends Event {
|
|
600
|
-
error: string;
|
|
601
|
-
}
|
|
602
|
-
declare global {
|
|
603
|
-
interface Window {
|
|
604
|
-
SpeechRecognition: {
|
|
605
|
-
new (): SpeechRecognition;
|
|
606
|
-
};
|
|
607
|
-
webkitSpeechRecognition: {
|
|
608
|
-
new (): SpeechRecognition;
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
type PromptInputSpeechButtonProps = ComponentProps<typeof PromptInputButton> & {
|
|
613
|
-
onTranscriptionChange?: (text: string) => void;
|
|
614
|
-
lang?: string;
|
|
615
|
-
};
|
|
616
|
-
declare const PromptInputSpeechButton: ({ className, onTranscriptionChange, lang, ...props }: PromptInputSpeechButtonProps) => react_jsx_runtime.JSX.Element;
|
|
617
|
-
|
|
618
|
-
type PromptInputModelSelectProps = ComponentProps<typeof Select>;
|
|
619
|
-
declare const PromptInputModelSelect: (props: PromptInputModelSelectProps) => react_jsx_runtime.JSX.Element;
|
|
620
|
-
type PromptInputModelSelectTriggerProps = ComponentProps<typeof SelectTrigger>;
|
|
621
|
-
declare const PromptInputModelSelectTrigger: ({ className, ...props }: PromptInputModelSelectTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
622
|
-
type PromptInputModelSelectContentProps = ComponentProps<typeof SelectContent>;
|
|
623
|
-
declare const PromptInputModelSelectContent: ({ className, ...props }: PromptInputModelSelectContentProps) => react_jsx_runtime.JSX.Element;
|
|
624
|
-
type PromptInputModelSelectItemProps = ComponentProps<typeof SelectItem>;
|
|
625
|
-
declare const PromptInputModelSelectItem: ({ className, ...props }: PromptInputModelSelectItemProps) => react_jsx_runtime.JSX.Element;
|
|
626
|
-
type PromptInputModelSelectValueProps = ComponentProps<typeof SelectValue>;
|
|
627
|
-
declare const PromptInputModelSelectValue: ({ className, ...props }: PromptInputModelSelectValueProps) => react_jsx_runtime.JSX.Element;
|
|
628
|
-
|
|
629
|
-
type PromptInputTabsListProps = HTMLAttributes<HTMLDivElement>;
|
|
630
|
-
declare const PromptInputTabsList: ({ className, ...props }: PromptInputTabsListProps) => react_jsx_runtime.JSX.Element;
|
|
631
|
-
type PromptInputTabProps = HTMLAttributes<HTMLDivElement>;
|
|
632
|
-
declare const PromptInputTab: ({ className, ...props }: PromptInputTabProps) => react_jsx_runtime.JSX.Element;
|
|
633
|
-
type PromptInputTabLabelProps = HTMLAttributes<HTMLHeadingElement>;
|
|
634
|
-
declare const PromptInputTabLabel: ({ className, ...props }: PromptInputTabLabelProps) => react_jsx_runtime.JSX.Element;
|
|
635
|
-
type PromptInputTabBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
636
|
-
declare const PromptInputTabBody: ({ className, ...props }: PromptInputTabBodyProps) => react_jsx_runtime.JSX.Element;
|
|
637
|
-
type PromptInputTabItemProps = HTMLAttributes<HTMLDivElement>;
|
|
638
|
-
declare const PromptInputTabItem: ({ className, ...props }: PromptInputTabItemProps) => react_jsx_runtime.JSX.Element;
|
|
639
|
-
|
|
640
|
-
type PromptInputCommandProps = ComponentProps<typeof Command>;
|
|
641
|
-
declare const PromptInputCommand: ({ className, ...props }: PromptInputCommandProps) => react_jsx_runtime.JSX.Element;
|
|
642
|
-
type PromptInputCommandInputProps = ComponentProps<typeof CommandInput>;
|
|
643
|
-
declare const PromptInputCommandInput: ({ className, ...props }: PromptInputCommandInputProps) => react_jsx_runtime.JSX.Element;
|
|
644
|
-
type PromptInputCommandListProps = ComponentProps<typeof CommandList>;
|
|
645
|
-
declare const PromptInputCommandList: ({ className, ...props }: PromptInputCommandListProps) => react_jsx_runtime.JSX.Element;
|
|
646
|
-
type PromptInputCommandEmptyProps = ComponentProps<typeof CommandEmpty>;
|
|
647
|
-
declare const PromptInputCommandEmpty: ({ className, ...props }: PromptInputCommandEmptyProps) => react_jsx_runtime.JSX.Element;
|
|
648
|
-
type PromptInputCommandGroupProps = ComponentProps<typeof CommandGroup>;
|
|
649
|
-
declare const PromptInputCommandGroup: ({ className, ...props }: PromptInputCommandGroupProps) => react_jsx_runtime.JSX.Element;
|
|
650
|
-
type PromptInputCommandItemProps = ComponentProps<typeof CommandItem>;
|
|
651
|
-
declare const PromptInputCommandItem: ({ className, ...props }: PromptInputCommandItemProps) => react_jsx_runtime.JSX.Element;
|
|
652
|
-
type PromptInputCommandSeparatorProps = ComponentProps<typeof CommandSeparator>;
|
|
653
|
-
declare const PromptInputCommandSeparator: ({ className, ...props }: PromptInputCommandSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
654
|
-
|
|
655
|
-
interface AgnoMessageItemProps {
|
|
656
|
-
message: ChatMessage;
|
|
657
|
-
className?: string;
|
|
658
|
-
classNames?: AgnoMessageItemClassNames;
|
|
659
|
-
/** Custom render for the entire message content area */
|
|
660
|
-
renderContent?: (message: ChatMessage) => ReactNode;
|
|
661
|
-
/** Custom render for individual tool calls */
|
|
662
|
-
renderToolCall?: (tool: NonNullable<ChatMessage['tool_calls']>[0], index: number) => ReactNode;
|
|
663
|
-
/** Custom render for media sections */
|
|
664
|
-
renderMedia?: (message: ChatMessage) => ReactNode;
|
|
665
|
-
/** Render action buttons below assistant messages (e.g., copy, like, dislike) */
|
|
666
|
-
renderActions?: (message: ChatMessage) => ReactNode;
|
|
667
|
-
/** Custom user avatar */
|
|
668
|
-
userAvatar?: ReactNode;
|
|
669
|
-
/** Custom assistant avatar */
|
|
670
|
-
assistantAvatar?: ReactNode;
|
|
671
|
-
/** Show reasoning steps (default: true) */
|
|
672
|
-
showReasoning?: boolean;
|
|
673
|
-
/** Show references (default: true) */
|
|
674
|
-
showReferences?: boolean;
|
|
675
|
-
/** Show timestamp (default: true) */
|
|
676
|
-
showTimestamp?: boolean;
|
|
677
|
-
/** Show generative UI renders (default: true) */
|
|
678
|
-
showGenerativeUI?: boolean;
|
|
679
|
-
/** Show tool call details (default: true) */
|
|
680
|
-
showToolCalls?: boolean;
|
|
681
|
-
/** Enable file preview cards with click-to-open modal (default: true) */
|
|
682
|
-
showFilePreview?: boolean;
|
|
683
|
-
/** Enable image lightbox on click (default: true) */
|
|
684
|
-
showImageLightbox?: boolean;
|
|
685
|
-
/** Custom timestamp formatter */
|
|
686
|
-
formatTimestamp?: (date: Date) => string;
|
|
687
|
-
}
|
|
688
|
-
declare function AgnoMessageItem({ message, className, classNames, renderContent, renderToolCall, renderMedia, renderActions, userAvatar, assistantAvatar, showReasoning, showReferences, showTimestamp, showGenerativeUI, showToolCalls, showFilePreview, showImageLightbox, formatTimestamp, }: AgnoMessageItemProps): react_jsx_runtime.JSX.Element;
|
|
689
|
-
|
|
690
|
-
interface AgnoChatInputProps {
|
|
691
|
-
onSend: (message: string | FormData) => void;
|
|
692
|
-
disabled?: boolean;
|
|
693
|
-
placeholder?: string;
|
|
694
|
-
className?: string;
|
|
695
|
-
/** File upload configuration */
|
|
696
|
-
fileUpload?: FileUploadConfig;
|
|
697
|
-
/** Show audio recorder button (default: false) */
|
|
698
|
-
showAudioRecorder?: boolean;
|
|
699
|
-
/** Show attachments button (default: true) */
|
|
700
|
-
showAttachments?: boolean;
|
|
701
|
-
/** Override chat status for submit button icon */
|
|
702
|
-
status?: ChatStatus;
|
|
703
|
-
/** Whether a run is currently streaming */
|
|
704
|
-
isStreaming?: boolean;
|
|
705
|
-
/** Called when the user clicks stop during streaming */
|
|
706
|
-
onCancel?: () => void;
|
|
707
|
-
/** Show a stop button that cancels the run while streaming (default: false) */
|
|
708
|
-
allowCancelRun?: boolean;
|
|
709
|
-
/** Extra tools to add to the toolbar */
|
|
710
|
-
extraTools?: ReactNode;
|
|
711
|
-
/** Audio mode: 'send' sends blob immediately, 'transcribe' transcribes and adds text to input */
|
|
712
|
-
audioMode?: 'send' | 'transcribe';
|
|
713
|
-
/** Transcription endpoint URL (required when audioMode='transcribe') */
|
|
714
|
-
transcriptionEndpoint?: string;
|
|
715
|
-
/** Extra headers for transcription request */
|
|
716
|
-
transcriptionHeaders?: Record<string, string>;
|
|
717
|
-
/** Custom parser for the transcription response — receives the parsed JSON and returns the text */
|
|
718
|
-
parseTranscriptionResponse?: (data: unknown) => string;
|
|
719
|
-
/** Async callback to request microphone permission before recording (e.g., for WebView bridges) */
|
|
720
|
-
onRequestPermission?: () => Promise<boolean>;
|
|
721
|
-
/** Custom labels for the audio recorder button (useful for i18n) */
|
|
722
|
-
audioRecorderLabels?: AudioRecorderLabels;
|
|
723
|
-
/** Ref to a container element for rendering the drop zone overlay via portal */
|
|
724
|
-
dropZoneContainerRef?: RefObject<HTMLElement | null>;
|
|
725
|
-
/** Props forwarded to PromptInputDropZone (className, label) */
|
|
726
|
-
dropZoneProps?: Partial<Pick<PromptInputDropZoneProps, 'label' | 'className'>>;
|
|
727
|
-
}
|
|
728
|
-
declare function AgnoChatInput({ onSend, disabled, placeholder, className, fileUpload, showAudioRecorder, showAttachments, status, isStreaming, onCancel, allowCancelRun, extraTools, audioMode, transcriptionEndpoint, transcriptionHeaders, parseTranscriptionResponse, onRequestPermission, audioRecorderLabels, dropZoneContainerRef, dropZoneProps, }: AgnoChatInputProps): react_jsx_runtime.JSX.Element;
|
|
729
|
-
|
|
730
|
-
interface AgnoChatInterfaceProps {
|
|
731
|
-
className?: string;
|
|
732
|
-
classNames?: AgnoChatInterfaceClassNames;
|
|
733
|
-
/** Custom render for individual messages */
|
|
734
|
-
renderMessage?: (message: ChatMessage, index: number) => ReactNode;
|
|
735
|
-
/** Custom render for the input area */
|
|
736
|
-
renderInput?: (props: {
|
|
737
|
-
onSend: (msg: string | FormData) => void;
|
|
738
|
-
disabled: boolean;
|
|
739
|
-
}) => ReactNode;
|
|
740
|
-
/** Custom empty state content */
|
|
741
|
-
emptyState?: ReactNode;
|
|
742
|
-
/** Slot: content above the messages area */
|
|
743
|
-
headerSlot?: ReactNode;
|
|
744
|
-
/** Slot: extra buttons in the input toolbar */
|
|
745
|
-
inputToolbarSlot?: ReactNode;
|
|
746
|
-
/** Suggested prompts for empty state */
|
|
747
|
-
suggestedPrompts?: SuggestedPrompt[];
|
|
748
|
-
/** Tool handlers for HITL execution */
|
|
749
|
-
toolHandlers?: Record<string, ToolHandler>;
|
|
750
|
-
/** Auto-execute tools (default: true) */
|
|
751
|
-
autoExecuteTools?: boolean;
|
|
752
|
-
/** Input placeholder */
|
|
753
|
-
placeholder?: string;
|
|
754
|
-
/** Custom user avatar */
|
|
755
|
-
userAvatar?: ReactNode;
|
|
756
|
-
/** Custom assistant avatar */
|
|
757
|
-
assistantAvatar?: ReactNode;
|
|
758
|
-
/** File upload config */
|
|
759
|
-
fileUpload?: FileUploadConfig;
|
|
760
|
-
/** Show audio recorder (default: true) */
|
|
761
|
-
showAudioRecorder?: boolean;
|
|
762
|
-
/** Show attachments button and drop zone (default: true) */
|
|
763
|
-
showAttachments?: boolean;
|
|
764
|
-
/** Props forwarded to AgnoMessageItem */
|
|
765
|
-
messageItemProps?: Partial<Omit<AgnoMessageItemProps, 'message'>>;
|
|
766
|
-
/** Props forwarded to AgnoChatInput */
|
|
767
|
-
chatInputProps?: Partial<Omit<AgnoChatInputProps, 'onSend'>>;
|
|
768
|
-
/** Custom label for the drop zone overlay */
|
|
769
|
-
dropZoneLabel?: string;
|
|
770
|
-
}
|
|
771
|
-
declare function AgnoChatInterface({ className, classNames, renderMessage, renderInput, emptyState, headerSlot, inputToolbarSlot, suggestedPrompts, toolHandlers, autoExecuteTools, placeholder, userAvatar, assistantAvatar, fileUpload, showAudioRecorder, showAttachments, messageItemProps, chatInputProps, dropZoneLabel, }: AgnoChatInterfaceProps): react_jsx_runtime.JSX.Element;
|
|
772
|
-
|
|
773
|
-
interface AgnoChatRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
774
|
-
children: ReactNode;
|
|
775
|
-
toolHandlers?: Record<string, ToolHandler>;
|
|
776
|
-
autoExecuteTools?: boolean;
|
|
777
|
-
}
|
|
778
|
-
declare function AgnoChatRoot({ children, toolHandlers, autoExecuteTools, className, ...divProps }: AgnoChatRootProps): react_jsx_runtime.JSX.Element;
|
|
779
|
-
|
|
780
|
-
interface AgnoChatMessagesProps {
|
|
781
|
-
className?: string;
|
|
782
|
-
renderMessage?: (message: ChatMessage, index: number) => ReactNode;
|
|
783
|
-
userAvatar?: ReactNode;
|
|
784
|
-
assistantAvatar?: ReactNode;
|
|
785
|
-
messageItemProps?: Partial<Omit<AgnoMessageItemProps, 'message'>>;
|
|
786
|
-
emptyState?: ReactNode;
|
|
787
|
-
suggestedPrompts?: SuggestedPrompt[];
|
|
788
|
-
/** Custom empty state via children — takes priority over emptyState prop */
|
|
789
|
-
children?: ReactNode;
|
|
790
|
-
/** Show the thinking indicator while waiting for the first response content (default: true) */
|
|
791
|
-
showThinkingIndicator?: boolean;
|
|
792
|
-
/** Custom component to render instead of the default thinking indicator */
|
|
793
|
-
renderThinkingIndicator?: ReactNode;
|
|
794
|
-
}
|
|
795
|
-
declare function AgnoChatMessages({ className, renderMessage, userAvatar, assistantAvatar, messageItemProps, emptyState, suggestedPrompts, children, showThinkingIndicator, renderThinkingIndicator, }: AgnoChatMessagesProps): react_jsx_runtime.JSX.Element;
|
|
796
|
-
|
|
797
|
-
interface AgnoChatEmptyStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
798
|
-
children: ReactNode;
|
|
799
|
-
}
|
|
800
|
-
declare function AgnoChatEmptyState({ children, className, ...props }: AgnoChatEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
801
|
-
|
|
802
|
-
interface AgnoChatSuggestedPromptsProps {
|
|
803
|
-
className?: string;
|
|
804
|
-
prompts: SuggestedPrompt[];
|
|
805
|
-
}
|
|
806
|
-
declare function AgnoChatSuggestedPrompts({ className, prompts }: AgnoChatSuggestedPromptsProps): react_jsx_runtime.JSX.Element | null;
|
|
807
|
-
|
|
808
|
-
interface AgnoChatToolStatusProps {
|
|
809
|
-
className?: string;
|
|
810
|
-
}
|
|
811
|
-
declare function AgnoChatToolStatus({ className }: AgnoChatToolStatusProps): react_jsx_runtime.JSX.Element | null;
|
|
812
|
-
|
|
813
|
-
interface AgnoChatErrorBarProps {
|
|
814
|
-
className?: string;
|
|
815
|
-
}
|
|
816
|
-
declare function AgnoChatErrorBar({ className }: AgnoChatErrorBarProps): react_jsx_runtime.JSX.Element | null;
|
|
817
|
-
|
|
818
|
-
interface AgnoChatInputRenderProps {
|
|
819
|
-
onSend: (message: string | FormData) => Promise<void>;
|
|
820
|
-
disabled: boolean;
|
|
821
|
-
isStreaming: boolean;
|
|
822
|
-
isPaused: boolean;
|
|
823
|
-
}
|
|
824
|
-
interface AgnoChatInputAreaProps {
|
|
825
|
-
className?: string;
|
|
826
|
-
children?: (props: AgnoChatInputRenderProps) => ReactNode;
|
|
827
|
-
placeholder?: string;
|
|
828
|
-
fileUpload?: FileUploadConfig;
|
|
829
|
-
showAudioRecorder?: boolean;
|
|
830
|
-
showAttachments?: boolean;
|
|
831
|
-
extraTools?: ReactNode;
|
|
832
|
-
chatInputProps?: Partial<Omit<AgnoChatInputProps, 'onSend'>>;
|
|
833
|
-
/** Audio mode: 'send' sends blob immediately, 'transcribe' transcribes and adds text to input */
|
|
834
|
-
audioMode?: 'send' | 'transcribe';
|
|
835
|
-
/** Transcription endpoint URL (required when audioMode='transcribe') */
|
|
836
|
-
transcriptionEndpoint?: string;
|
|
837
|
-
/** Extra headers for transcription request */
|
|
838
|
-
transcriptionHeaders?: Record<string, string>;
|
|
839
|
-
/** Custom parser for the transcription response — receives the parsed JSON and returns the text */
|
|
840
|
-
parseTranscriptionResponse?: (data: unknown) => string;
|
|
841
|
-
/** Async callback to request microphone permission before recording (e.g., for WebView bridges) */
|
|
842
|
-
onRequestPermission?: () => Promise<boolean>;
|
|
843
|
-
/** Custom labels for the audio recorder button (useful for i18n) */
|
|
844
|
-
audioRecorderLabels?: AudioRecorderLabels;
|
|
845
|
-
/** Show a stop button that cancels the run while streaming (default: false) */
|
|
846
|
-
allowCancelRun?: boolean;
|
|
847
|
-
/** Props forwarded to PromptInputDropZone (className, label) */
|
|
848
|
-
dropZoneProps?: Partial<Pick<PromptInputDropZoneProps, 'label' | 'className'>>;
|
|
849
|
-
}
|
|
850
|
-
declare function AgnoChatInputArea({ className, children, placeholder, fileUpload, showAudioRecorder, showAttachments, extraTools, chatInputProps, audioMode, transcriptionEndpoint, transcriptionHeaders, parseTranscriptionResponse, onRequestPermission, audioRecorderLabels, allowCancelRun, dropZoneProps, }: AgnoChatInputAreaProps): react_jsx_runtime.JSX.Element;
|
|
851
|
-
|
|
852
|
-
interface AgnoChatContextValue {
|
|
853
|
-
messages: ChatMessage[];
|
|
854
|
-
sendMessage: (message: string | FormData, options?: {
|
|
855
|
-
headers?: Record<string, string>;
|
|
856
|
-
params?: Record<string, string>;
|
|
857
|
-
}) => Promise<void>;
|
|
858
|
-
clearMessages: () => void;
|
|
859
|
-
cancelRun: () => Promise<void>;
|
|
860
|
-
isStreaming: boolean;
|
|
861
|
-
isRefreshing: boolean;
|
|
862
|
-
isCancelling: boolean;
|
|
863
|
-
currentRunId?: string;
|
|
864
|
-
error?: string;
|
|
865
|
-
state: ClientState;
|
|
866
|
-
isPaused: boolean;
|
|
867
|
-
isExecuting: boolean;
|
|
868
|
-
pendingTools: ToolCall[];
|
|
869
|
-
executeAndContinue: () => Promise<void>;
|
|
870
|
-
executeTools: (tools: ToolCall[]) => Promise<ToolCall[]>;
|
|
871
|
-
continueWithResults: (tools: ToolCall[], options?: {
|
|
872
|
-
headers?: Record<string, string>;
|
|
873
|
-
params?: Record<string, string>;
|
|
874
|
-
}) => Promise<void>;
|
|
875
|
-
executionError?: string;
|
|
876
|
-
handleSend: (message: string | FormData) => Promise<void>;
|
|
877
|
-
inputDisabled: boolean;
|
|
878
|
-
dropZoneContainerRef?: RefObject<HTMLElement | null>;
|
|
879
|
-
}
|
|
880
|
-
declare function useAgnoChatContext(): AgnoChatContextValue;
|
|
881
|
-
|
|
882
|
-
declare const AgnoChat: typeof AgnoChatRoot & {
|
|
883
|
-
Messages: typeof AgnoChatMessages;
|
|
884
|
-
EmptyState: typeof AgnoChatEmptyState;
|
|
885
|
-
SuggestedPrompts: typeof AgnoChatSuggestedPrompts;
|
|
886
|
-
ToolStatus: typeof AgnoChatToolStatus;
|
|
887
|
-
ErrorBar: typeof AgnoChatErrorBar;
|
|
888
|
-
Input: typeof AgnoChatInputArea;
|
|
889
|
-
};
|
|
890
|
-
|
|
891
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgnoChat, type AgnoChatContextValue, AgnoChatEmptyState, type AgnoChatEmptyStateProps, AgnoChatErrorBar, type AgnoChatErrorBarProps, AgnoChatInput, AgnoChatInputArea, type AgnoChatInputAreaProps, type AgnoChatInputProps, type AgnoChatInputRenderProps, AgnoChatInterface, type AgnoChatInterfaceClassNames, type AgnoChatInterfaceProps, AgnoChatMessages, type AgnoChatMessagesProps, AgnoChatRoot, type AgnoChatRootProps, AgnoChatSuggestedPrompts, type AgnoChatSuggestedPromptsProps, AgnoChatToolStatus, type AgnoChatToolStatusProps, AgnoMessageItem, type AgnoMessageItemClassNames, type AgnoMessageItemProps, Artifact, ArtifactAction, type ArtifactActionProps, ArtifactActions, type ArtifactActionsProps, ArtifactClose, type ArtifactCloseProps, ArtifactContent, type ArtifactContentProps, ArtifactDescription, type ArtifactDescriptionProps, ArtifactHeader, type ArtifactHeaderProps, type ArtifactProps, ArtifactTitle, type ArtifactTitleProps, type AttachmentsContext, AudioRecorder, type AudioRecorderLabels, type AudioRecorderProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, type ChatStatus, CodeBlock, CodeBlockCopyButton, type CodeBlockCopyButtonProps, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Conversation, ConversationContent, type ConversationContentProps, ConversationEmptyState, type ConversationEmptyStateProps, type ConversationProps, ConversationScrollButton, type ConversationScrollButtonProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DropZoneContextValue, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FileAttachment, FilePreviewCard, type FilePreviewCardProps, type FilePreviewFile, FilePreviewModal, type FilePreviewModalProps, type FilePreviewType, type FileUploadConfig, HoverCard, HoverCardContent, HoverCardTrigger, ImageLightbox, type ImageLightboxProps, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type LightboxImage, Message, MessageAvatar, type MessageAvatarProps, MessageContent, type MessageContentProps, type MessageProps, PromptInput, PromptInputActionAddAttachments, type PromptInputActionAddAttachmentsProps, PromptInputActionMenu, PromptInputActionMenuContent, type PromptInputActionMenuContentProps, PromptInputActionMenuItem, type PromptInputActionMenuItemProps, type PromptInputActionMenuProps, PromptInputActionMenuTrigger, type PromptInputActionMenuTriggerProps, PromptInputAttachment, type PromptInputAttachmentProps, PromptInputAttachments, type PromptInputAttachmentsProps, PromptInputBody, type PromptInputBodyProps, PromptInputButton, type PromptInputButtonProps, PromptInputCommand, PromptInputCommandEmpty, type PromptInputCommandEmptyProps, PromptInputCommandGroup, type PromptInputCommandGroupProps, PromptInputCommandInput, type PromptInputCommandInputProps, PromptInputCommandItem, type PromptInputCommandItemProps, PromptInputCommandList, type PromptInputCommandListProps, type PromptInputCommandProps, PromptInputCommandSeparator, type PromptInputCommandSeparatorProps, type PromptInputControllerProps, PromptInputDropZone, type PromptInputDropZoneProps, PromptInputFooter, type PromptInputFooterProps, PromptInputHeader, type PromptInputHeaderProps, type PromptInputMessage, PromptInputModelSelect, PromptInputModelSelectContent, type PromptInputModelSelectContentProps, PromptInputModelSelectItem, type PromptInputModelSelectItemProps, type PromptInputModelSelectProps, PromptInputModelSelectTrigger, type PromptInputModelSelectTriggerProps, PromptInputModelSelectValue, type PromptInputModelSelectValueProps, type PromptInputProps, PromptInputProvider, type PromptInputProviderProps, PromptInputSpeechButton, type PromptInputSpeechButtonProps, PromptInputSubmit, type PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, type PromptInputTabBodyProps, PromptInputTabItem, type PromptInputTabItemProps, PromptInputTabLabel, type PromptInputTabLabelProps, type PromptInputTabProps, PromptInputTabsList, type PromptInputTabsListProps, PromptInputTextarea, type PromptInputTextareaProps, PromptInputTools, type PromptInputToolsProps, Response, type ResponseProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SmartTimestamp, type SmartTimestampProps, StreamingIndicator, type StreamingIndicatorProps, type SuggestedPrompt, type TextInputContext, Tool, ToolContent, type ToolContentProps, ToolHeader, type ToolHeaderProps, ToolInput, type ToolInputProps, ToolOutput, type ToolOutputProps, type ToolProps, type ToolState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, formatFileSize, formatFullTimestamp, formatSmartTimestamp, getFileExtension, getFilePreviewType, isPreviewable, useAgnoChatContext, usePromptInputAttachments, usePromptInputController, usePromptInputDropZone, useProviderAttachments };
|