@lukeashford/aurelius 3.4.0 → 3.6.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 +102 -3
- package/dist/index.d.ts +102 -3
- package/dist/index.js +539 -196
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +540 -198
- package/dist/index.mjs.map +1 -1
- package/llms.md +29 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -737,6 +737,25 @@ 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
|
|
743
|
+
* notice
|
|
744
|
+
*/
|
|
745
|
+
variant: 'warning' | 'error';
|
|
746
|
+
/**
|
|
747
|
+
* Content to render — plain text or any React node (e.g. text + button for error state)
|
|
748
|
+
*/
|
|
749
|
+
content: React$1.ReactNode;
|
|
750
|
+
/**
|
|
751
|
+
* Whether to show a dismiss (×) button. Defaults to true for warning, ignored for error.
|
|
752
|
+
*/
|
|
753
|
+
dismissible?: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Called when the dismiss button is clicked. Consumer controls whether the notice disappears.
|
|
756
|
+
*/
|
|
757
|
+
onDismiss?: () => void;
|
|
758
|
+
}
|
|
740
759
|
type ChatInputPosition = 'centered' | 'bottom';
|
|
741
760
|
type AttachmentStatus = 'pending' | 'uploading' | 'complete' | 'error';
|
|
742
761
|
interface Attachment {
|
|
@@ -796,6 +815,18 @@ interface ChatInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
796
815
|
* Accepted file types for attachments
|
|
797
816
|
*/
|
|
798
817
|
acceptedFileTypes?: string;
|
|
818
|
+
/**
|
|
819
|
+
* Optional notice displayed above the input (e.g. credit warnings or exhaustion messages)
|
|
820
|
+
*/
|
|
821
|
+
notice?: ChatInputNotice;
|
|
822
|
+
/**
|
|
823
|
+
* Called whenever the input value changes, giving the consumer access to the current text
|
|
824
|
+
*/
|
|
825
|
+
onInputChange?: (value: string) => void;
|
|
826
|
+
/**
|
|
827
|
+
* Whether to automatically focus the input when it becomes enabled
|
|
828
|
+
*/
|
|
829
|
+
autoFocus?: boolean;
|
|
799
830
|
}
|
|
800
831
|
/**
|
|
801
832
|
* ChatInput is a context-aware input component that can transition between
|
|
@@ -1282,10 +1313,27 @@ interface ChatMessage {
|
|
|
1282
1313
|
isStreaming?: boolean;
|
|
1283
1314
|
}
|
|
1284
1315
|
interface Conversation {
|
|
1316
|
+
/**
|
|
1317
|
+
* Unique identifier for the conversation
|
|
1318
|
+
*/
|
|
1285
1319
|
id: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Title shown as the first line of the row. Editable via the rename affordance.
|
|
1322
|
+
*/
|
|
1286
1323
|
title: string;
|
|
1287
|
-
|
|
1288
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* Project this conversation belongs to. Shown as the second line of the row and
|
|
1326
|
+
* collected into the project filter in the history panel.
|
|
1327
|
+
*/
|
|
1328
|
+
project?: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* Timestamp used to group conversations into Today / Yesterday / Older.
|
|
1331
|
+
* Accepts a Date, ISO string, or millisecond epoch. Not displayed.
|
|
1332
|
+
*/
|
|
1333
|
+
timestamp?: string | number | Date;
|
|
1334
|
+
/**
|
|
1335
|
+
* Whether this conversation is currently active (highlighted in the list).
|
|
1336
|
+
*/
|
|
1289
1337
|
isActive?: boolean;
|
|
1290
1338
|
}
|
|
1291
1339
|
interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
@@ -1334,6 +1382,11 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1334
1382
|
* Called when the "New Chat" button is clicked in the sidebar.
|
|
1335
1383
|
*/
|
|
1336
1384
|
onNewChat?: () => void;
|
|
1385
|
+
/**
|
|
1386
|
+
* Called when a conversation's title is renamed from the history panel.
|
|
1387
|
+
* Receives the conversation id and the new, trimmed title.
|
|
1388
|
+
*/
|
|
1389
|
+
onRenameConversation?: (id: string, newTitle: string) => void;
|
|
1337
1390
|
/**
|
|
1338
1391
|
* Whether the assistant is currently streaming a response.
|
|
1339
1392
|
* Shows a stop button and disables certain actions.
|
|
@@ -1406,6 +1459,16 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1406
1459
|
* the stop request is in flight.
|
|
1407
1460
|
*/
|
|
1408
1461
|
onStopAllTasks?: () => void | Promise<void>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Optional notice displayed above the chat input (e.g. credit warnings or exhaustion messages).
|
|
1464
|
+
* Pass `{ variant: 'warning', content: '...', dismissible: true, onDismiss: () => ... }` for
|
|
1465
|
+
* soft warnings, or `{ variant: 'error', content: <ReactNode> }` for hard blocks.
|
|
1466
|
+
*/
|
|
1467
|
+
inputNotice?: ChatInputNotice;
|
|
1468
|
+
/**
|
|
1469
|
+
* Called whenever the chat input value changes, giving the consumer access to the current text.
|
|
1470
|
+
*/
|
|
1471
|
+
onInputChange?: (value: string) => void;
|
|
1409
1472
|
/**
|
|
1410
1473
|
* Additional tools to add to the tool sidebars. Each ExternalToolDefinition provides
|
|
1411
1474
|
* an id, icon, label, group ('top-left' | 'bottom-left' | 'top-right' | 'bottom-right'),
|
|
@@ -1414,6 +1477,11 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1414
1477
|
* (bottom-right). Consumer tools are added alongside these.
|
|
1415
1478
|
*/
|
|
1416
1479
|
tools?: ExternalToolDefinition[];
|
|
1480
|
+
/**
|
|
1481
|
+
* Whether to automatically focus the chat input when it becomes enabled.
|
|
1482
|
+
* Defaults to true.
|
|
1483
|
+
*/
|
|
1484
|
+
autoFocus?: boolean;
|
|
1417
1485
|
}
|
|
1418
1486
|
/**
|
|
1419
1487
|
* ChatInterface is the main orchestrator for a full-featured chat experience.
|
|
@@ -1518,6 +1586,32 @@ interface ArtifactsPanelToggleProps extends React$1.ButtonHTMLAttributes<HTMLBut
|
|
|
1518
1586
|
}
|
|
1519
1587
|
declare const ArtifactsPanelToggle: React$1.ForwardRefExoticComponent<ArtifactsPanelToggleProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1520
1588
|
|
|
1589
|
+
interface HistoryPanelProps {
|
|
1590
|
+
/**
|
|
1591
|
+
* List of past conversations to display.
|
|
1592
|
+
*/
|
|
1593
|
+
conversations: Conversation[];
|
|
1594
|
+
/**
|
|
1595
|
+
* Called when a conversation is selected.
|
|
1596
|
+
*/
|
|
1597
|
+
onSelectConversation?: (id: string) => void;
|
|
1598
|
+
/**
|
|
1599
|
+
* Called when the "New Chat" button is clicked.
|
|
1600
|
+
*/
|
|
1601
|
+
onNewChat?: () => void;
|
|
1602
|
+
/**
|
|
1603
|
+
* Called when a conversation's title is edited.
|
|
1604
|
+
*/
|
|
1605
|
+
onRenameConversation?: (id: string, newTitle: string) => void;
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* HistoryPanel renders the conversation history sidebar: a project filter,
|
|
1609
|
+
* a "New Chat" button, and the conversation list grouped by recency
|
|
1610
|
+
* (Today / Yesterday / Older). Each row shows the title and an optional
|
|
1611
|
+
* project subtitle, and exposes an inline rename affordance on hover.
|
|
1612
|
+
*/
|
|
1613
|
+
declare function HistoryPanel({ conversations, onSelectConversation, onNewChat, onRenameConversation, }: HistoryPanelProps): React$1.JSX.Element;
|
|
1614
|
+
|
|
1521
1615
|
interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1522
1616
|
/**
|
|
1523
1617
|
* Content for the top tool slot (from the top group).
|
|
@@ -1533,6 +1627,11 @@ interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1533
1627
|
* Panel width as CSS value (e.g., "50vw")
|
|
1534
1628
|
*/
|
|
1535
1629
|
width?: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* Default top panel height percentage (0-100).
|
|
1632
|
+
* @default 60
|
|
1633
|
+
*/
|
|
1634
|
+
initialTopPercent?: number;
|
|
1536
1635
|
/**
|
|
1537
1636
|
* Callback to start horizontal resizing (width dragger)
|
|
1538
1637
|
*/
|
|
@@ -1935,4 +2034,4 @@ declare const ArtifactVariantStack: React$1.ForwardRefExoticComponent<ArtifactVa
|
|
|
1935
2034
|
|
|
1936
2035
|
declare const version = "2.0.0";
|
|
1937
2036
|
|
|
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 };
|
|
2037
|
+
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, HistoryPanel, type HistoryPanelProps, 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,25 @@ 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
|
|
743
|
+
* notice
|
|
744
|
+
*/
|
|
745
|
+
variant: 'warning' | 'error';
|
|
746
|
+
/**
|
|
747
|
+
* Content to render — plain text or any React node (e.g. text + button for error state)
|
|
748
|
+
*/
|
|
749
|
+
content: React$1.ReactNode;
|
|
750
|
+
/**
|
|
751
|
+
* Whether to show a dismiss (×) button. Defaults to true for warning, ignored for error.
|
|
752
|
+
*/
|
|
753
|
+
dismissible?: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Called when the dismiss button is clicked. Consumer controls whether the notice disappears.
|
|
756
|
+
*/
|
|
757
|
+
onDismiss?: () => void;
|
|
758
|
+
}
|
|
740
759
|
type ChatInputPosition = 'centered' | 'bottom';
|
|
741
760
|
type AttachmentStatus = 'pending' | 'uploading' | 'complete' | 'error';
|
|
742
761
|
interface Attachment {
|
|
@@ -796,6 +815,18 @@ interface ChatInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
796
815
|
* Accepted file types for attachments
|
|
797
816
|
*/
|
|
798
817
|
acceptedFileTypes?: string;
|
|
818
|
+
/**
|
|
819
|
+
* Optional notice displayed above the input (e.g. credit warnings or exhaustion messages)
|
|
820
|
+
*/
|
|
821
|
+
notice?: ChatInputNotice;
|
|
822
|
+
/**
|
|
823
|
+
* Called whenever the input value changes, giving the consumer access to the current text
|
|
824
|
+
*/
|
|
825
|
+
onInputChange?: (value: string) => void;
|
|
826
|
+
/**
|
|
827
|
+
* Whether to automatically focus the input when it becomes enabled
|
|
828
|
+
*/
|
|
829
|
+
autoFocus?: boolean;
|
|
799
830
|
}
|
|
800
831
|
/**
|
|
801
832
|
* ChatInput is a context-aware input component that can transition between
|
|
@@ -1282,10 +1313,27 @@ interface ChatMessage {
|
|
|
1282
1313
|
isStreaming?: boolean;
|
|
1283
1314
|
}
|
|
1284
1315
|
interface Conversation {
|
|
1316
|
+
/**
|
|
1317
|
+
* Unique identifier for the conversation
|
|
1318
|
+
*/
|
|
1285
1319
|
id: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Title shown as the first line of the row. Editable via the rename affordance.
|
|
1322
|
+
*/
|
|
1286
1323
|
title: string;
|
|
1287
|
-
|
|
1288
|
-
|
|
1324
|
+
/**
|
|
1325
|
+
* Project this conversation belongs to. Shown as the second line of the row and
|
|
1326
|
+
* collected into the project filter in the history panel.
|
|
1327
|
+
*/
|
|
1328
|
+
project?: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* Timestamp used to group conversations into Today / Yesterday / Older.
|
|
1331
|
+
* Accepts a Date, ISO string, or millisecond epoch. Not displayed.
|
|
1332
|
+
*/
|
|
1333
|
+
timestamp?: string | number | Date;
|
|
1334
|
+
/**
|
|
1335
|
+
* Whether this conversation is currently active (highlighted in the list).
|
|
1336
|
+
*/
|
|
1289
1337
|
isActive?: boolean;
|
|
1290
1338
|
}
|
|
1291
1339
|
interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
@@ -1334,6 +1382,11 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1334
1382
|
* Called when the "New Chat" button is clicked in the sidebar.
|
|
1335
1383
|
*/
|
|
1336
1384
|
onNewChat?: () => void;
|
|
1385
|
+
/**
|
|
1386
|
+
* Called when a conversation's title is renamed from the history panel.
|
|
1387
|
+
* Receives the conversation id and the new, trimmed title.
|
|
1388
|
+
*/
|
|
1389
|
+
onRenameConversation?: (id: string, newTitle: string) => void;
|
|
1337
1390
|
/**
|
|
1338
1391
|
* Whether the assistant is currently streaming a response.
|
|
1339
1392
|
* Shows a stop button and disables certain actions.
|
|
@@ -1406,6 +1459,16 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1406
1459
|
* the stop request is in flight.
|
|
1407
1460
|
*/
|
|
1408
1461
|
onStopAllTasks?: () => void | Promise<void>;
|
|
1462
|
+
/**
|
|
1463
|
+
* Optional notice displayed above the chat input (e.g. credit warnings or exhaustion messages).
|
|
1464
|
+
* Pass `{ variant: 'warning', content: '...', dismissible: true, onDismiss: () => ... }` for
|
|
1465
|
+
* soft warnings, or `{ variant: 'error', content: <ReactNode> }` for hard blocks.
|
|
1466
|
+
*/
|
|
1467
|
+
inputNotice?: ChatInputNotice;
|
|
1468
|
+
/**
|
|
1469
|
+
* Called whenever the chat input value changes, giving the consumer access to the current text.
|
|
1470
|
+
*/
|
|
1471
|
+
onInputChange?: (value: string) => void;
|
|
1409
1472
|
/**
|
|
1410
1473
|
* Additional tools to add to the tool sidebars. Each ExternalToolDefinition provides
|
|
1411
1474
|
* an id, icon, label, group ('top-left' | 'bottom-left' | 'top-right' | 'bottom-right'),
|
|
@@ -1414,6 +1477,11 @@ interface ChatInterfaceProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1414
1477
|
* (bottom-right). Consumer tools are added alongside these.
|
|
1415
1478
|
*/
|
|
1416
1479
|
tools?: ExternalToolDefinition[];
|
|
1480
|
+
/**
|
|
1481
|
+
* Whether to automatically focus the chat input when it becomes enabled.
|
|
1482
|
+
* Defaults to true.
|
|
1483
|
+
*/
|
|
1484
|
+
autoFocus?: boolean;
|
|
1417
1485
|
}
|
|
1418
1486
|
/**
|
|
1419
1487
|
* ChatInterface is the main orchestrator for a full-featured chat experience.
|
|
@@ -1518,6 +1586,32 @@ interface ArtifactsPanelToggleProps extends React$1.ButtonHTMLAttributes<HTMLBut
|
|
|
1518
1586
|
}
|
|
1519
1587
|
declare const ArtifactsPanelToggle: React$1.ForwardRefExoticComponent<ArtifactsPanelToggleProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1520
1588
|
|
|
1589
|
+
interface HistoryPanelProps {
|
|
1590
|
+
/**
|
|
1591
|
+
* List of past conversations to display.
|
|
1592
|
+
*/
|
|
1593
|
+
conversations: Conversation[];
|
|
1594
|
+
/**
|
|
1595
|
+
* Called when a conversation is selected.
|
|
1596
|
+
*/
|
|
1597
|
+
onSelectConversation?: (id: string) => void;
|
|
1598
|
+
/**
|
|
1599
|
+
* Called when the "New Chat" button is clicked.
|
|
1600
|
+
*/
|
|
1601
|
+
onNewChat?: () => void;
|
|
1602
|
+
/**
|
|
1603
|
+
* Called when a conversation's title is edited.
|
|
1604
|
+
*/
|
|
1605
|
+
onRenameConversation?: (id: string, newTitle: string) => void;
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* HistoryPanel renders the conversation history sidebar: a project filter,
|
|
1609
|
+
* a "New Chat" button, and the conversation list grouped by recency
|
|
1610
|
+
* (Today / Yesterday / Older). Each row shows the title and an optional
|
|
1611
|
+
* project subtitle, and exposes an inline rename affordance on hover.
|
|
1612
|
+
*/
|
|
1613
|
+
declare function HistoryPanel({ conversations, onSelectConversation, onNewChat, onRenameConversation, }: HistoryPanelProps): React$1.JSX.Element;
|
|
1614
|
+
|
|
1521
1615
|
interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1522
1616
|
/**
|
|
1523
1617
|
* Content for the top tool slot (from the top group).
|
|
@@ -1533,6 +1627,11 @@ interface ToolPanelContainerProps extends React$1.HTMLAttributes<HTMLDivElement>
|
|
|
1533
1627
|
* Panel width as CSS value (e.g., "50vw")
|
|
1534
1628
|
*/
|
|
1535
1629
|
width?: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* Default top panel height percentage (0-100).
|
|
1632
|
+
* @default 60
|
|
1633
|
+
*/
|
|
1634
|
+
initialTopPercent?: number;
|
|
1536
1635
|
/**
|
|
1537
1636
|
* Callback to start horizontal resizing (width dragger)
|
|
1538
1637
|
*/
|
|
@@ -1935,4 +2034,4 @@ declare const ArtifactVariantStack: React$1.ForwardRefExoticComponent<ArtifactVa
|
|
|
1935
2034
|
|
|
1936
2035
|
declare const version = "2.0.0";
|
|
1937
2036
|
|
|
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 };
|
|
2037
|
+
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, HistoryPanel, type HistoryPanelProps, 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 };
|