@lukeashford/aurelius 3.4.0 → 3.5.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/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +54 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -17
- package/dist/index.mjs.map +1 -1
- package/llms.md +10 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -737,6 +737,24 @@ interface MarkdownContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
737
737
|
}
|
|
738
738
|
declare const MarkdownContent: React$1.ForwardRefExoticComponent<MarkdownContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
739
739
|
|
|
740
|
+
interface ChatInputNotice {
|
|
741
|
+
/**
|
|
742
|
+
* Visual severity: 'warning' shows a dismissible amber notice, 'error' shows a persistent red notice
|
|
743
|
+
*/
|
|
744
|
+
variant: 'warning' | 'error';
|
|
745
|
+
/**
|
|
746
|
+
* Content to render — plain text or any React node (e.g. text + button for error state)
|
|
747
|
+
*/
|
|
748
|
+
content: React$1.ReactNode;
|
|
749
|
+
/**
|
|
750
|
+
* Whether to show a dismiss (×) button. Defaults to true for warning, ignored for error.
|
|
751
|
+
*/
|
|
752
|
+
dismissible?: boolean;
|
|
753
|
+
/**
|
|
754
|
+
* Called when the dismiss button is clicked. Consumer controls whether the notice disappears.
|
|
755
|
+
*/
|
|
756
|
+
onDismiss?: () => void;
|
|
757
|
+
}
|
|
740
758
|
type ChatInputPosition = 'centered' | 'bottom';
|
|
741
759
|
type AttachmentStatus = 'pending' | 'uploading' | 'complete' | 'error';
|
|
742
760
|
interface Attachment {
|
|
@@ -796,6 +814,14 @@ interface ChatInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
796
814
|
* Accepted file types for attachments
|
|
797
815
|
*/
|
|
798
816
|
acceptedFileTypes?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Optional notice displayed above the input (e.g. credit warnings or exhaustion messages)
|
|
819
|
+
*/
|
|
820
|
+
notice?: ChatInputNotice;
|
|
821
|
+
/**
|
|
822
|
+
* Called whenever the input value changes, giving the consumer access to the current text
|
|
823
|
+
*/
|
|
824
|
+
onInputChange?: (value: string) => void;
|
|
799
825
|
}
|
|
800
826
|
/**
|
|
801
827
|
* ChatInput is a context-aware input component that can transition between
|
|
@@ -1406,6 +1432,16 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1406
1432
|
* the stop request is in flight.
|
|
1407
1433
|
*/
|
|
1408
1434
|
onStopAllTasks?: () => void | Promise<void>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Optional notice displayed above the chat input (e.g. credit warnings or exhaustion messages).
|
|
1437
|
+
* Pass `{ variant: 'warning', content: '...', dismissible: true, onDismiss: () => ... }` for
|
|
1438
|
+
* soft warnings, or `{ variant: 'error', content: <ReactNode> }` for hard blocks.
|
|
1439
|
+
*/
|
|
1440
|
+
inputNotice?: ChatInputNotice;
|
|
1441
|
+
/**
|
|
1442
|
+
* Called whenever the chat input value changes, giving the consumer access to the current text.
|
|
1443
|
+
*/
|
|
1444
|
+
onInputChange?: (value: string) => void;
|
|
1409
1445
|
/**
|
|
1410
1446
|
* Additional tools to add to the tool sidebars. Each ExternalToolDefinition provides
|
|
1411
1447
|
* an id, icon, label, group ('top-left' | 'bottom-left' | 'top-right' | 'bottom-right'),
|
|
@@ -1533,6 +1569,11 @@ interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1533
1569
|
* Panel width as CSS value (e.g., "50vw")
|
|
1534
1570
|
*/
|
|
1535
1571
|
width?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Default top panel height percentage (0-100).
|
|
1574
|
+
* @default 60
|
|
1575
|
+
*/
|
|
1576
|
+
initialTopPercent?: number;
|
|
1536
1577
|
/**
|
|
1537
1578
|
* Callback to start horizontal resizing (width dragger)
|
|
1538
1579
|
*/
|
|
@@ -1935,4 +1976,4 @@ declare const ArtifactVariantStack: React$1.ForwardRefExoticComponent<ArtifactVa
|
|
|
1935
1976
|
|
|
1936
1977
|
declare const version = "2.0.0";
|
|
1937
1978
|
|
|
1938
|
-
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, type ArtifactNode, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatView, type ChatViewItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CrossSquareIcon, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, HelperText, type HelperTextProps, HistoryIcon, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextCard, type TextCardProps, Textarea, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type UseArtifactTreeNavigationReturn, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addMessageToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, generateId, getActivePathMessages, getSiblingInfo, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, switchBranch, updateNodeContent, useArtifactTreeNavigation, useResizable, useScrollAnchor, useToast, version };
|
|
1979
|
+
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, type ArtifactNode, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatView, type ChatViewItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CrossSquareIcon, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, HelperText, type HelperTextProps, HistoryIcon, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextCard, type TextCardProps, Textarea, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type UseArtifactTreeNavigationReturn, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addMessageToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, generateId, getActivePathMessages, getSiblingInfo, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, switchBranch, updateNodeContent, useArtifactTreeNavigation, useResizable, useScrollAnchor, useToast, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -737,6 +737,24 @@ interface MarkdownContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
737
737
|
}
|
|
738
738
|
declare const MarkdownContent: React$1.ForwardRefExoticComponent<MarkdownContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
739
739
|
|
|
740
|
+
interface ChatInputNotice {
|
|
741
|
+
/**
|
|
742
|
+
* Visual severity: 'warning' shows a dismissible amber notice, 'error' shows a persistent red notice
|
|
743
|
+
*/
|
|
744
|
+
variant: 'warning' | 'error';
|
|
745
|
+
/**
|
|
746
|
+
* Content to render — plain text or any React node (e.g. text + button for error state)
|
|
747
|
+
*/
|
|
748
|
+
content: React$1.ReactNode;
|
|
749
|
+
/**
|
|
750
|
+
* Whether to show a dismiss (×) button. Defaults to true for warning, ignored for error.
|
|
751
|
+
*/
|
|
752
|
+
dismissible?: boolean;
|
|
753
|
+
/**
|
|
754
|
+
* Called when the dismiss button is clicked. Consumer controls whether the notice disappears.
|
|
755
|
+
*/
|
|
756
|
+
onDismiss?: () => void;
|
|
757
|
+
}
|
|
740
758
|
type ChatInputPosition = 'centered' | 'bottom';
|
|
741
759
|
type AttachmentStatus = 'pending' | 'uploading' | 'complete' | 'error';
|
|
742
760
|
interface Attachment {
|
|
@@ -796,6 +814,14 @@ interface ChatInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
796
814
|
* Accepted file types for attachments
|
|
797
815
|
*/
|
|
798
816
|
acceptedFileTypes?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Optional notice displayed above the input (e.g. credit warnings or exhaustion messages)
|
|
819
|
+
*/
|
|
820
|
+
notice?: ChatInputNotice;
|
|
821
|
+
/**
|
|
822
|
+
* Called whenever the input value changes, giving the consumer access to the current text
|
|
823
|
+
*/
|
|
824
|
+
onInputChange?: (value: string) => void;
|
|
799
825
|
}
|
|
800
826
|
/**
|
|
801
827
|
* ChatInput is a context-aware input component that can transition between
|
|
@@ -1406,6 +1432,16 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1406
1432
|
* the stop request is in flight.
|
|
1407
1433
|
*/
|
|
1408
1434
|
onStopAllTasks?: () => void | Promise<void>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Optional notice displayed above the chat input (e.g. credit warnings or exhaustion messages).
|
|
1437
|
+
* Pass `{ variant: 'warning', content: '...', dismissible: true, onDismiss: () => ... }` for
|
|
1438
|
+
* soft warnings, or `{ variant: 'error', content: <ReactNode> }` for hard blocks.
|
|
1439
|
+
*/
|
|
1440
|
+
inputNotice?: ChatInputNotice;
|
|
1441
|
+
/**
|
|
1442
|
+
* Called whenever the chat input value changes, giving the consumer access to the current text.
|
|
1443
|
+
*/
|
|
1444
|
+
onInputChange?: (value: string) => void;
|
|
1409
1445
|
/**
|
|
1410
1446
|
* Additional tools to add to the tool sidebars. Each ExternalToolDefinition provides
|
|
1411
1447
|
* an id, icon, label, group ('top-left' | 'bottom-left' | 'top-right' | 'bottom-right'),
|
|
@@ -1533,6 +1569,11 @@ interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1533
1569
|
* Panel width as CSS value (e.g., "50vw")
|
|
1534
1570
|
*/
|
|
1535
1571
|
width?: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Default top panel height percentage (0-100).
|
|
1574
|
+
* @default 60
|
|
1575
|
+
*/
|
|
1576
|
+
initialTopPercent?: number;
|
|
1536
1577
|
/**
|
|
1537
1578
|
* Callback to start horizontal resizing (width dragger)
|
|
1538
1579
|
*/
|
|
@@ -1935,4 +1976,4 @@ declare const ArtifactVariantStack: React$1.ForwardRefExoticComponent<ArtifactVa
|
|
|
1935
1976
|
|
|
1936
1977
|
declare const version = "2.0.0";
|
|
1937
1978
|
|
|
1938
|
-
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, type ArtifactNode, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatView, type ChatViewItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CrossSquareIcon, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, HelperText, type HelperTextProps, HistoryIcon, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextCard, type TextCardProps, Textarea, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type UseArtifactTreeNavigationReturn, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addMessageToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, generateId, getActivePathMessages, getSiblingInfo, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, switchBranch, updateNodeContent, useArtifactTreeNavigation, useResizable, useScrollAnchor, useToast, version };
|
|
1979
|
+
export { ARTIFACT_TYPES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDialog, type AlertDialogProps, type AlertProps, type AlertVariant, type Artifact, ArtifactCard, type ArtifactCardProps, ArtifactGroup, type ArtifactGroupProps, type ArtifactNode, type ArtifactType, ArtifactVariantStack, type ArtifactVariantStackProps, ArtifactsPanel, type ArtifactsPanelProps, ArtifactsPanelToggle, type ArtifactsPanelToggleProps, type AspectRatio, type AspectRatioPreset, type Attachment, type AttachmentItem, AttachmentPreview, type AttachmentPreviewProps, type AttachmentStatus, AudioCard, type AudioCardProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, type BadgeVariant, BranchNavigator, type BranchNavigatorProps, BrandIcon, type BrandIconProps, type BrandIconSize, type BrandIconVariant, Breadcrumb, type BreadcrumbEntry, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardProps, type CardVariant, ChatBubbleIcon, ChatInput, type ChatInputNotice, type ChatInputPosition, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatView, type ChatViewItem, type ChatViewProps, CheckSquareIcon, Checkbox, type CheckboxProps, ChevronLeftIcon, ChevronRightIcon, CloseIcon, Col, type ColOffset, type ColOrder, type ColProps, type ColSpan, ColorSwatch, type ColorSwatchProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerProps, type ContainerSize, type Conversation, type ConversationTree, CrossSquareIcon, Divider, type DividerProps, Drawer, type DrawerPosition, type DrawerProps, EmptySquareIcon, ExpandIcon, type ExternalToolDefinition, FileChip, type FileChipProps, type FileChipStatus, HelperText, type HelperTextProps, HistoryIcon, type IconProps, ImageCard, type ImageCardProps, Input, type InputAddonProps, type InputElementProps, InputGroup, type InputGroupProps, InputLeftAddon, InputLeftElement, type InputProps, InputRightAddon, InputRightElement, InputWrapper, type InputWrapperProps, Label, type LabelProps, LayersIcon, List, ListItem, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MarkdownContent, type MarkdownContentProps, MediaIcon, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, Message, MessageActions, type MessageActionsConfig, type MessageActionsProps, type MessageActionsVariant, type MessageBranchInfo, type MessageNode, type MessageProps, type MessageVariant, Modal, type ModalProps, NODE_TYPES, Navbar, NavbarBrand, type NavbarBrandProps, NavbarContent, type NavbarContentProps, NavbarDivider, NavbarItem, type NavbarItemProps, NavbarLink, type NavbarLinkProps, type NavbarProps, type NodeType, Pagination, type PaginationProps, PdfCard, type PdfCardProps, PlusIcon, Popover, type PopoverAlign, type PopoverPosition, type PopoverProps, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Radio, type RadioProps, Row, type RowAlign, type RowGutter, type RowJustify, type RowProps, SCRIPT_ELEMENT_TYPES, ScriptCard, type ScriptCardProps, type ScriptElement, type ScriptElementType, SectionHeading, type SectionHeadingLevel, type SectionHeadingProps, Select, type SelectOption, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, SquareLoaderIcon, Stack, type StackDirection, type StackGap, type StackProps, type Step, type StepStatus, Stepper, type StepperProps, StreamingCursor, type StreamingCursorProps, Switch, type SwitchProps, TASK_STATUSES, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type Task, type TaskStatus, TextCard, type TextCardProps, Textarea, type TextareaProps, ThinkingIndicator, type ThinkingIndicatorProps, type ToastData, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, TodosList, type TodosListProps, type ToolDefinition, type ToolGroup, ToolPanelContainer, type ToolPanelContainerProps, type ToolPanelState, ToolSidebar, type ToolSidebarProps, Tooltip, type TooltipProps, type UseArtifactTreeNavigationReturn, type UseScrollAnchorOptions, type UseScrollAnchorReturn, type VideoAspectRatio, type VideoAspectRatioPreset, VideoCard, type VideoCardProps, addMessageToTree, areAllTasksSettled, createEmptyTree, createPreviewUrl, generateId, getActivePathMessages, getSiblingInfo, isBranchPoint, isImageFile, messagesToTree, revokePreviewUrl, switchBranch, updateNodeContent, useArtifactTreeNavigation, useResizable, useScrollAnchor, useToast, version };
|
package/dist/index.js
CHANGED
|
@@ -4796,6 +4796,8 @@ var ChatInput = import_react61.default.forwardRef(
|
|
|
4796
4796
|
onAttachmentsChange,
|
|
4797
4797
|
showAttachmentButton = true,
|
|
4798
4798
|
acceptedFileTypes,
|
|
4799
|
+
notice,
|
|
4800
|
+
onInputChange,
|
|
4799
4801
|
className,
|
|
4800
4802
|
...rest
|
|
4801
4803
|
}, ref) => {
|
|
@@ -4842,10 +4844,11 @@ var ChatInput = import_react61.default.forwardRef(
|
|
|
4842
4844
|
);
|
|
4843
4845
|
const handleChange = (0, import_react61.useCallback)((e) => {
|
|
4844
4846
|
setValue(e.target.value);
|
|
4847
|
+
onInputChange?.(e.target.value);
|
|
4845
4848
|
const textarea = e.target;
|
|
4846
4849
|
textarea.style.height = "auto";
|
|
4847
4850
|
textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;
|
|
4848
|
-
}, []);
|
|
4851
|
+
}, [onInputChange]);
|
|
4849
4852
|
(0, import_react61.useEffect)(() => {
|
|
4850
4853
|
if (!disabled && !isStreaming && textareaRef.current) {
|
|
4851
4854
|
textareaRef.current.focus();
|
|
@@ -4929,6 +4932,23 @@ var ChatInput = import_react61.default.forwardRef(
|
|
|
4929
4932
|
...rest
|
|
4930
4933
|
},
|
|
4931
4934
|
isCentered && helperText && /* @__PURE__ */ import_react61.default.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
|
|
4935
|
+
notice && /* @__PURE__ */ import_react61.default.createElement("div", { className: cx(
|
|
4936
|
+
"w-full flex items-start gap-2 px-3 py-2 mb-1 text-xs",
|
|
4937
|
+
isCentered && "max-w-lg",
|
|
4938
|
+
notice.variant === "warning" ? "bg-gold/5 border border-gold/20 text-gold/80" : "bg-error/10 border border-error/30 text-error"
|
|
4939
|
+
) }, /* @__PURE__ */ import_react61.default.createElement("span", { className: "flex-1" }, notice.content), (notice.dismissible ?? notice.variant === "warning") && notice.onDismiss && /* @__PURE__ */ import_react61.default.createElement(
|
|
4940
|
+
"button",
|
|
4941
|
+
{
|
|
4942
|
+
type: "button",
|
|
4943
|
+
onClick: notice.onDismiss,
|
|
4944
|
+
"aria-label": "Dismiss",
|
|
4945
|
+
className: cx(
|
|
4946
|
+
"shrink-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
4947
|
+
notice.variant === "warning" ? "text-gold" : "text-error"
|
|
4948
|
+
)
|
|
4949
|
+
},
|
|
4950
|
+
/* @__PURE__ */ import_react61.default.createElement(import_lucide_react11.X, { className: "w-3 h-3" })
|
|
4951
|
+
)),
|
|
4932
4952
|
/* @__PURE__ */ import_react61.default.createElement(
|
|
4933
4953
|
"div",
|
|
4934
4954
|
{
|
|
@@ -6274,8 +6294,17 @@ ToolSidebar.displayName = "ToolSidebar";
|
|
|
6274
6294
|
// src/components/chat/ToolPanelContainer.tsx
|
|
6275
6295
|
var import_react75 = __toESM(require("react"));
|
|
6276
6296
|
var ToolPanelContainer = import_react75.default.forwardRef(
|
|
6277
|
-
({
|
|
6278
|
-
|
|
6297
|
+
({
|
|
6298
|
+
topContent,
|
|
6299
|
+
bottomContent,
|
|
6300
|
+
width,
|
|
6301
|
+
onResizeStart,
|
|
6302
|
+
side = "right",
|
|
6303
|
+
className,
|
|
6304
|
+
initialTopPercent = 60,
|
|
6305
|
+
...rest
|
|
6306
|
+
}, ref) => {
|
|
6307
|
+
const [topPercent, setTopPercent] = (0, import_react75.useState)(initialTopPercent);
|
|
6279
6308
|
const [isResizingHeight, setIsResizingHeight] = (0, import_react75.useState)(false);
|
|
6280
6309
|
const containerRef = (0, import_react75.useRef)(null);
|
|
6281
6310
|
const lastY = (0, import_react75.useRef)(null);
|
|
@@ -6477,6 +6506,8 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6477
6506
|
tasks = [],
|
|
6478
6507
|
tasksTitle,
|
|
6479
6508
|
onStopAllTasks,
|
|
6509
|
+
inputNotice,
|
|
6510
|
+
onInputChange,
|
|
6480
6511
|
tools: externalTools = [],
|
|
6481
6512
|
className,
|
|
6482
6513
|
...rest
|
|
@@ -6506,9 +6537,9 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6506
6537
|
width: rightToolsWidth,
|
|
6507
6538
|
startResizing: startResizingRightTools
|
|
6508
6539
|
} = useResizable({
|
|
6509
|
-
initialWidthPercent:
|
|
6510
|
-
minWidthPercent:
|
|
6511
|
-
maxWidthPercent:
|
|
6540
|
+
initialWidthPercent: 40,
|
|
6541
|
+
minWidthPercent: 30,
|
|
6542
|
+
maxWidthPercent: 80,
|
|
6512
6543
|
direction: "left"
|
|
6513
6544
|
});
|
|
6514
6545
|
const {
|
|
@@ -6601,10 +6632,7 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6601
6632
|
if (c.status !== p.status || c.label !== p.label) {
|
|
6602
6633
|
return true;
|
|
6603
6634
|
}
|
|
6604
|
-
|
|
6605
|
-
return true;
|
|
6606
|
-
}
|
|
6607
|
-
return false;
|
|
6635
|
+
return !!(c.subtasks && hasNewOrUpdatedTask(c.subtasks, p?.subtasks || []));
|
|
6608
6636
|
});
|
|
6609
6637
|
};
|
|
6610
6638
|
if (hasNewOrUpdatedTask(tasks, prevTasksRef.current) && !dismissedToolsRef.current.has("todos")) {
|
|
@@ -6737,7 +6765,15 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6737
6765
|
}
|
|
6738
6766
|
);
|
|
6739
6767
|
case "todos":
|
|
6740
|
-
return tasks.length > 0 ? /* @__PURE__ */ import_react77.default.createElement(
|
|
6768
|
+
return tasks.length > 0 ? /* @__PURE__ */ import_react77.default.createElement(
|
|
6769
|
+
TodosList,
|
|
6770
|
+
{
|
|
6771
|
+
tasks,
|
|
6772
|
+
title: tasksTitle,
|
|
6773
|
+
onStopAllTasks,
|
|
6774
|
+
className: "h-full"
|
|
6775
|
+
}
|
|
6776
|
+
) : /* @__PURE__ */ import_react77.default.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center p-4 border-b border-ash/40 shrink-0" }, /* @__PURE__ */ import_react77.default.createElement("h3", { className: "text-xs font-medium text-white" }, "Tasks")), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex-1 flex items-center justify-center" }, /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-xs text-silver/60" }, "No tasks")));
|
|
6741
6777
|
default: {
|
|
6742
6778
|
const externalTool = externalTools.find((t) => t.id === toolId);
|
|
6743
6779
|
return externalTool?.content ?? null;
|
|
@@ -6767,7 +6803,8 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6767
6803
|
bottomContent: renderToolContent(activeTools["bottom-left"]),
|
|
6768
6804
|
width: leftToolsWidth,
|
|
6769
6805
|
onResizeStart: startResizingLeftTools,
|
|
6770
|
-
side: "left"
|
|
6806
|
+
side: "left",
|
|
6807
|
+
initialTopPercent: 30
|
|
6771
6808
|
}
|
|
6772
6809
|
),
|
|
6773
6810
|
/* @__PURE__ */ import_react77.default.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: cx(
|
|
@@ -6803,7 +6840,9 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6803
6840
|
onStop,
|
|
6804
6841
|
showAttachmentButton,
|
|
6805
6842
|
attachments: propsAttachments,
|
|
6806
|
-
onAttachmentsChange
|
|
6843
|
+
onAttachmentsChange,
|
|
6844
|
+
notice: inputNotice,
|
|
6845
|
+
onInputChange
|
|
6807
6846
|
}
|
|
6808
6847
|
)), /* @__PURE__ */ import_react77.default.createElement("div", { className: cx(
|
|
6809
6848
|
"transition-all duration-500 ease-in-out",
|
|
@@ -6816,7 +6855,8 @@ var ChatInterface = import_react77.default.forwardRef(
|
|
|
6816
6855
|
bottomContent: renderToolContent(activeTools["bottom-right"]),
|
|
6817
6856
|
width: rightToolsWidth,
|
|
6818
6857
|
onResizeStart: startResizingRightTools,
|
|
6819
|
-
side: "right"
|
|
6858
|
+
side: "right",
|
|
6859
|
+
initialTopPercent: 70
|
|
6820
6860
|
}
|
|
6821
6861
|
),
|
|
6822
6862
|
hasRightTools && /* @__PURE__ */ import_react77.default.createElement(
|