@yourgpt/copilot-sdk 2.1.5-alpha.2 → 2.1.5-alpha.3
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/ui/index.cjs +622 -231
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +297 -52
- package/dist/ui/index.d.ts +297 -52
- package/dist/ui/index.js +573 -183
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -13,57 +13,6 @@ import { B as BranchInfo } from '../MessageTree-CoIt_4nB.cjs';
|
|
|
13
13
|
import { d as MCPUIIntent, n as MCPUIFrameProps, M as MCPUIResource } from '../types-B20VCJXL.cjs';
|
|
14
14
|
import { ClassValue } from 'clsx';
|
|
15
15
|
|
|
16
|
-
interface LoaderProps {
|
|
17
|
-
variant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
18
|
-
size?: "sm" | "md" | "lg";
|
|
19
|
-
text?: string;
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
declare function Loader({ variant, size, text, className, }: LoaderProps): react_jsx_runtime.JSX.Element;
|
|
23
|
-
|
|
24
|
-
type MarkdownProps = {
|
|
25
|
-
children: string;
|
|
26
|
-
id?: string;
|
|
27
|
-
className?: string;
|
|
28
|
-
isStreaming?: boolean;
|
|
29
|
-
/** Link safety modal configuration. Disabled by default. */
|
|
30
|
-
linkSafety?: LinkSafetyConfig;
|
|
31
|
-
};
|
|
32
|
-
declare function MarkdownComponent({ children, className, isStreaming, linkSafety, }: MarkdownProps): react_jsx_runtime.JSX.Element;
|
|
33
|
-
declare const Markdown: React$1.MemoExoticComponent<typeof MarkdownComponent>;
|
|
34
|
-
|
|
35
|
-
type CodeBlockProps = {
|
|
36
|
-
children?: React__default.ReactNode;
|
|
37
|
-
className?: string;
|
|
38
|
-
} & React__default.HTMLProps<HTMLDivElement>;
|
|
39
|
-
declare function CodeBlock({ children, className, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
40
|
-
|
|
41
|
-
declare const buttonVariants: (props?: ({
|
|
42
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
43
|
-
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
44
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
45
|
-
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
46
|
-
asChild?: boolean;
|
|
47
|
-
}
|
|
48
|
-
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
49
|
-
|
|
50
|
-
type FeedbackBarProps = {
|
|
51
|
-
className?: string;
|
|
52
|
-
title?: string;
|
|
53
|
-
icon?: React.ReactNode;
|
|
54
|
-
onHelpful?: () => void;
|
|
55
|
-
onNotHelpful?: () => void;
|
|
56
|
-
onClose?: () => void;
|
|
57
|
-
};
|
|
58
|
-
declare function FeedbackBar({ className, title, icon, onHelpful, onNotHelpful, onClose, }: FeedbackBarProps): react_jsx_runtime.JSX.Element;
|
|
59
|
-
|
|
60
|
-
type ScrollButtonProps = {
|
|
61
|
-
className?: string;
|
|
62
|
-
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
63
|
-
size?: VariantProps<typeof buttonVariants>["size"];
|
|
64
|
-
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
65
|
-
declare function ScrollButton({ className, variant, size, ...props }: ScrollButtonProps): react_jsx_runtime.JSX.Element;
|
|
66
|
-
|
|
67
16
|
type TooltipProviderProps = {
|
|
68
17
|
children: React__default.ReactNode;
|
|
69
18
|
delayDuration?: number;
|
|
@@ -92,6 +41,17 @@ type TooltipContentProps = {
|
|
|
92
41
|
};
|
|
93
42
|
declare function TooltipContent({ children, className, side, align, sideOffset, showArrow, }: TooltipContentProps): react_jsx_runtime.JSX.Element;
|
|
94
43
|
|
|
44
|
+
type MarkdownProps = {
|
|
45
|
+
children: string;
|
|
46
|
+
id?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
isStreaming?: boolean;
|
|
49
|
+
/** Link safety modal configuration. Disabled by default. */
|
|
50
|
+
linkSafety?: LinkSafetyConfig;
|
|
51
|
+
};
|
|
52
|
+
declare function MarkdownComponent({ children, className, isStreaming, linkSafety, }: MarkdownProps): react_jsx_runtime.JSX.Element;
|
|
53
|
+
declare const Markdown: React$1.MemoExoticComponent<typeof MarkdownComponent>;
|
|
54
|
+
|
|
95
55
|
type MessageProps = {
|
|
96
56
|
children: React.ReactNode;
|
|
97
57
|
className?: string;
|
|
@@ -120,6 +80,56 @@ type MessageContentProps = {
|
|
|
120
80
|
size?: "sm" | "base" | "lg";
|
|
121
81
|
} & React.ComponentProps<typeof Markdown> & Omit<React.HTMLProps<HTMLDivElement>, "size">;
|
|
122
82
|
declare const MessageContent: ({ children, markdown, className, size, ...props }: MessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
83
|
+
type MessageActionsProps$1 = {
|
|
84
|
+
children: React.ReactNode;
|
|
85
|
+
className?: string;
|
|
86
|
+
} & React.HTMLProps<HTMLDivElement>;
|
|
87
|
+
type MessageActionProps = {
|
|
88
|
+
className?: string;
|
|
89
|
+
tooltip: React.ReactNode;
|
|
90
|
+
children: React.ReactNode;
|
|
91
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
92
|
+
} & React.ComponentProps<typeof Tooltip>;
|
|
93
|
+
|
|
94
|
+
interface LoaderProps {
|
|
95
|
+
variant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
96
|
+
size?: "sm" | "md" | "lg";
|
|
97
|
+
text?: string;
|
|
98
|
+
className?: string;
|
|
99
|
+
}
|
|
100
|
+
declare function Loader({ variant, size, text, className, }: LoaderProps): react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
type CodeBlockProps = {
|
|
103
|
+
children?: React__default.ReactNode;
|
|
104
|
+
className?: string;
|
|
105
|
+
} & React__default.HTMLProps<HTMLDivElement>;
|
|
106
|
+
declare function CodeBlock({ children, className, ...props }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
107
|
+
|
|
108
|
+
declare const buttonVariants: (props?: ({
|
|
109
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
110
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
111
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
112
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
113
|
+
asChild?: boolean;
|
|
114
|
+
}
|
|
115
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
116
|
+
|
|
117
|
+
type FeedbackBarProps = {
|
|
118
|
+
className?: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
icon?: React.ReactNode;
|
|
121
|
+
onHelpful?: () => void;
|
|
122
|
+
onNotHelpful?: () => void;
|
|
123
|
+
onClose?: () => void;
|
|
124
|
+
};
|
|
125
|
+
declare function FeedbackBar({ className, title, icon, onHelpful, onNotHelpful, onClose, }: FeedbackBarProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
|
|
127
|
+
type ScrollButtonProps = {
|
|
128
|
+
className?: string;
|
|
129
|
+
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
130
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
131
|
+
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
132
|
+
declare function ScrollButton({ className, variant, size, ...props }: ScrollButtonProps): react_jsx_runtime.JSX.Element;
|
|
123
133
|
|
|
124
134
|
declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
125
135
|
|
|
@@ -1701,6 +1711,76 @@ type ChatProps = {
|
|
|
1701
1711
|
onEditMessage?: (messageId: string, newContent: string) => void;
|
|
1702
1712
|
};
|
|
1703
1713
|
|
|
1714
|
+
interface CopyActionProps {
|
|
1715
|
+
tooltip?: string;
|
|
1716
|
+
className?: string;
|
|
1717
|
+
}
|
|
1718
|
+
/** Built-in copy-to-clipboard action. Use inside CopilotChat.MessageActions. */
|
|
1719
|
+
declare function CopyAction({ tooltip, className }: CopyActionProps): null;
|
|
1720
|
+
declare namespace CopyAction {
|
|
1721
|
+
var displayName: string;
|
|
1722
|
+
}
|
|
1723
|
+
interface EditActionProps {
|
|
1724
|
+
tooltip?: string;
|
|
1725
|
+
className?: string;
|
|
1726
|
+
}
|
|
1727
|
+
/** Built-in edit action for user messages. Use inside CopilotChat.MessageActions role="user". */
|
|
1728
|
+
declare function EditAction({ tooltip, className }: EditActionProps): null;
|
|
1729
|
+
declare namespace EditAction {
|
|
1730
|
+
var displayName: string;
|
|
1731
|
+
}
|
|
1732
|
+
interface FeedbackActionProps {
|
|
1733
|
+
onFeedback?: (message: ChatMessage, type: "helpful" | "not-helpful") => void;
|
|
1734
|
+
tooltip?: string;
|
|
1735
|
+
className?: string;
|
|
1736
|
+
}
|
|
1737
|
+
/** Built-in thumbs up/down feedback action. Use inside CopilotChat.MessageActions. */
|
|
1738
|
+
declare function FeedbackAction({ onFeedback, tooltip, className, }: FeedbackActionProps): null;
|
|
1739
|
+
declare namespace FeedbackAction {
|
|
1740
|
+
var displayName: string;
|
|
1741
|
+
}
|
|
1742
|
+
interface ActionProps {
|
|
1743
|
+
id?: string;
|
|
1744
|
+
icon: React__default.ReactNode;
|
|
1745
|
+
tooltip: string;
|
|
1746
|
+
onClick: (props: {
|
|
1747
|
+
message: ChatMessage;
|
|
1748
|
+
}) => void;
|
|
1749
|
+
hidden?: boolean | ((props: {
|
|
1750
|
+
message: ChatMessage;
|
|
1751
|
+
}) => boolean);
|
|
1752
|
+
className?: string;
|
|
1753
|
+
}
|
|
1754
|
+
/** Custom action button. Use inside CopilotChat.MessageActions. */
|
|
1755
|
+
declare function Action({ icon, tooltip, onClick, hidden, className, }: ActionProps): null;
|
|
1756
|
+
declare namespace Action {
|
|
1757
|
+
var displayName: string;
|
|
1758
|
+
}
|
|
1759
|
+
interface MessageActionsProps {
|
|
1760
|
+
role: "user" | "assistant";
|
|
1761
|
+
children?: React__default.ReactNode;
|
|
1762
|
+
}
|
|
1763
|
+
/**
|
|
1764
|
+
* Registers message actions for a specific role.
|
|
1765
|
+
* Place inside <CopilotChat> as a direct child.
|
|
1766
|
+
*
|
|
1767
|
+
* @example
|
|
1768
|
+
* ```tsx
|
|
1769
|
+
* <CopilotChat>
|
|
1770
|
+
* <CopilotChat.MessageActions role="assistant">
|
|
1771
|
+
* <CopilotChat.CopyAction />
|
|
1772
|
+
* <CopilotChat.FeedbackAction onFeedback={(msg, type) => log(type)} />
|
|
1773
|
+
* <CopilotChat.Action icon={<ShareIcon />} tooltip="Share" onClick={({ message }) => share(message)} />
|
|
1774
|
+
* </CopilotChat.MessageActions>
|
|
1775
|
+
*
|
|
1776
|
+
* <CopilotChat.MessageActions role="user">
|
|
1777
|
+
* <CopilotChat.EditAction />
|
|
1778
|
+
* </CopilotChat.MessageActions>
|
|
1779
|
+
* </CopilotChat>
|
|
1780
|
+
* ```
|
|
1781
|
+
*/
|
|
1782
|
+
declare function MessageActions({ role, children }: MessageActionsProps): null;
|
|
1783
|
+
|
|
1704
1784
|
interface CopilotChatInternalContext {
|
|
1705
1785
|
view: "home" | "chat";
|
|
1706
1786
|
send: (message: string, attachments?: MessageAttachment[]) => void;
|
|
@@ -1708,6 +1788,8 @@ interface CopilotChatInternalContext {
|
|
|
1708
1788
|
onStop?: () => void;
|
|
1709
1789
|
attachmentsEnabled: boolean;
|
|
1710
1790
|
placeholder: string;
|
|
1791
|
+
messages: ChatMessage[];
|
|
1792
|
+
registeredTools?: ToolDefinition[];
|
|
1711
1793
|
onNewChat?: () => void;
|
|
1712
1794
|
threads?: Thread[];
|
|
1713
1795
|
currentThreadId?: string | null;
|
|
@@ -1868,8 +1950,56 @@ declare const Chat: typeof ChatComponent & {
|
|
|
1868
1950
|
Suggestions: typeof SuggestionsCompound;
|
|
1869
1951
|
BackButton: typeof BackButton;
|
|
1870
1952
|
ThreadPicker: typeof ThreadPickerCompound;
|
|
1953
|
+
MessageActions: typeof MessageActions;
|
|
1954
|
+
CopyAction: typeof CopyAction;
|
|
1955
|
+
EditAction: typeof EditAction;
|
|
1956
|
+
FeedbackAction: typeof FeedbackAction;
|
|
1957
|
+
Action: typeof Action;
|
|
1871
1958
|
};
|
|
1872
1959
|
|
|
1960
|
+
interface MessageListProps {
|
|
1961
|
+
/**
|
|
1962
|
+
* Render function called for each message.
|
|
1963
|
+
* Return your own component or fall back to <Chat.DefaultMessage />.
|
|
1964
|
+
*
|
|
1965
|
+
* @example
|
|
1966
|
+
* ```tsx
|
|
1967
|
+
* <Chat.MessageList>
|
|
1968
|
+
* {(message) =>
|
|
1969
|
+
* message.metadata?.type === "plan"
|
|
1970
|
+
* ? <PlanCard key={message.id} data={message.metadata} />
|
|
1971
|
+
* : <Chat.DefaultMessage key={message.id} message={message} />
|
|
1972
|
+
* }
|
|
1973
|
+
* </Chat.MessageList>
|
|
1974
|
+
* ```
|
|
1975
|
+
*/
|
|
1976
|
+
children?: (message: ChatMessage, index: number) => React$1.ReactNode;
|
|
1977
|
+
className?: string;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Chat.MessageList — renders the message list using a render-prop pattern.
|
|
1981
|
+
* Must be used inside <CopilotChat>.
|
|
1982
|
+
*
|
|
1983
|
+
* If no children are provided, renders all messages with the default SDK layout.
|
|
1984
|
+
*/
|
|
1985
|
+
declare function MessageList({ children, className }: MessageListProps): react_jsx_runtime.JSX.Element;
|
|
1986
|
+
|
|
1987
|
+
type ChatHeaderProps = {
|
|
1988
|
+
/** Logo image URL (pass empty string to hide logo) */
|
|
1989
|
+
logo?: string;
|
|
1990
|
+
/** Copilot name */
|
|
1991
|
+
name?: string;
|
|
1992
|
+
/** @deprecated Use `name` instead */
|
|
1993
|
+
title?: string;
|
|
1994
|
+
/** Thread picker element (injected by parent) */
|
|
1995
|
+
threadPicker?: React__default.ReactNode;
|
|
1996
|
+
/** Called when close button is clicked */
|
|
1997
|
+
onClose?: () => void;
|
|
1998
|
+
/** Additional class names */
|
|
1999
|
+
className?: string;
|
|
2000
|
+
};
|
|
2001
|
+
declare function ChatHeader({ logo, name, title, threadPicker, onClose, className, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
|
|
2002
|
+
|
|
1873
2003
|
interface ChatWelcomeProps {
|
|
1874
2004
|
/** Welcome screen configuration */
|
|
1875
2005
|
config?: WelcomeConfig;
|
|
@@ -1912,6 +2042,73 @@ interface ChatWelcomeProps {
|
|
|
1912
2042
|
}
|
|
1913
2043
|
declare function ChatWelcome({ config, suggestions, recentThreads, onSendMessage, onSelectThread, onDeleteThread, onViewMoreThreads, isLoading, onStop, placeholder, attachmentsEnabled, attachmentsDisabledTooltip, maxFileSize, allowedFileTypes, processAttachment: processAttachmentProp, classNames, }: ChatWelcomeProps): react_jsx_runtime.JSX.Element;
|
|
1914
2044
|
|
|
2045
|
+
type DefaultMessageProps = {
|
|
2046
|
+
message: ChatMessage;
|
|
2047
|
+
userAvatar: {
|
|
2048
|
+
src?: string;
|
|
2049
|
+
fallback?: string;
|
|
2050
|
+
component?: React$1.ReactNode;
|
|
2051
|
+
className?: string;
|
|
2052
|
+
};
|
|
2053
|
+
assistantAvatar: {
|
|
2054
|
+
src?: string;
|
|
2055
|
+
fallback?: string;
|
|
2056
|
+
component?: React$1.ReactNode;
|
|
2057
|
+
className?: string;
|
|
2058
|
+
};
|
|
2059
|
+
showUserAvatar?: boolean;
|
|
2060
|
+
userMessageClassName?: string;
|
|
2061
|
+
assistantMessageClassName?: string;
|
|
2062
|
+
/** Font size variant: 'sm' (14px), 'base' (16px), 'lg' (18px) */
|
|
2063
|
+
size?: "sm" | "base" | "lg";
|
|
2064
|
+
/** Whether this is the last message (for streaming state) */
|
|
2065
|
+
isLastMessage?: boolean;
|
|
2066
|
+
/** Whether the chat is currently loading/streaming */
|
|
2067
|
+
isLoading?: boolean;
|
|
2068
|
+
/** Whether waiting for server after tool completion */
|
|
2069
|
+
isProcessing?: boolean;
|
|
2070
|
+
/** Loader variant for typing indicator */
|
|
2071
|
+
loaderVariant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
2072
|
+
/** Registered tools (for accessing tool's render function) */
|
|
2073
|
+
registeredTools?: ToolDefinition[];
|
|
2074
|
+
/** Custom renderers for tool results (Generative UI) - fallback when tool has no render prop */
|
|
2075
|
+
toolRenderers?: ToolRenderers;
|
|
2076
|
+
/** Catch-all renderer for MCP tools (tools with source: "mcp") */
|
|
2077
|
+
mcpToolRenderer?: React$1.ComponentType<ToolRendererProps>;
|
|
2078
|
+
/** Catch-all renderer for any tool not matched by toolRenderers */
|
|
2079
|
+
fallbackToolRenderer?: React$1.ComponentType<ToolRendererProps>;
|
|
2080
|
+
/** Called when user approves a tool execution */
|
|
2081
|
+
onApproveToolExecution?: (executionId: string, extraData?: Record<string, unknown>, permissionLevel?: PermissionLevel) => void;
|
|
2082
|
+
/** Called when user rejects a tool execution */
|
|
2083
|
+
onRejectToolExecution?: (executionId: string, reason?: string, permissionLevel?: PermissionLevel) => void;
|
|
2084
|
+
/** Show follow-up questions (default: true) */
|
|
2085
|
+
showFollowUps?: boolean;
|
|
2086
|
+
/** Called when a follow-up question is clicked */
|
|
2087
|
+
onFollowUpClick?: (question: string) => void;
|
|
2088
|
+
/** Custom class for follow-up container */
|
|
2089
|
+
followUpClassName?: string;
|
|
2090
|
+
/** Custom class for follow-up buttons */
|
|
2091
|
+
followUpButtonClassName?: string;
|
|
2092
|
+
/** Citation/Sources configuration */
|
|
2093
|
+
citations?: CitationConfig;
|
|
2094
|
+
/**
|
|
2095
|
+
* Branch navigation info for this message.
|
|
2096
|
+
* When non-null and totalSiblings > 1, the BranchNavigator is shown.
|
|
2097
|
+
*/
|
|
2098
|
+
branchInfo?: BranchInfo | null;
|
|
2099
|
+
/**
|
|
2100
|
+
* Called when the user navigates to a sibling branch.
|
|
2101
|
+
* Receives the message ID to switch to.
|
|
2102
|
+
*/
|
|
2103
|
+
onSwitchBranch?: (messageId: string) => void;
|
|
2104
|
+
/**
|
|
2105
|
+
* Called when the user submits an edited message.
|
|
2106
|
+
* Triggers a new branch from the same parent as messageId.
|
|
2107
|
+
*/
|
|
2108
|
+
onEditMessage?: (messageId: string, newContent: string) => void;
|
|
2109
|
+
};
|
|
2110
|
+
declare function DefaultMessage({ message, userAvatar, assistantAvatar, showUserAvatar, userMessageClassName, assistantMessageClassName, size, isLastMessage, isLoading, isProcessing, loaderVariant, registeredTools, toolRenderers, mcpToolRenderer, fallbackToolRenderer, onApproveToolExecution, onRejectToolExecution, showFollowUps, onFollowUpClick, followUpClassName, followUpButtonClassName, citations, branchInfo, onSwitchBranch, onEditMessage, }: DefaultMessageProps): react_jsx_runtime.JSX.Element;
|
|
2111
|
+
|
|
1915
2112
|
interface ToolExecutionMessageProps {
|
|
1916
2113
|
executions: ToolExecutionData[];
|
|
1917
2114
|
assistantAvatar?: {
|
|
@@ -2218,4 +2415,52 @@ declare function MCPUIFrameList({ resources, onIntent, onError, className, frame
|
|
|
2218
2415
|
|
|
2219
2416
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2220
2417
|
|
|
2221
|
-
|
|
2418
|
+
/**
|
|
2419
|
+
* ChatPrimitives — composable primitives for building custom chat layouts.
|
|
2420
|
+
* Must be used inside <CopilotChat>.
|
|
2421
|
+
*
|
|
2422
|
+
* @example
|
|
2423
|
+
* ```tsx
|
|
2424
|
+
* import { ChatPrimitives as Chat } from '@yourgpt/copilot-sdk-ui';
|
|
2425
|
+
*
|
|
2426
|
+
* <CopilotChat>
|
|
2427
|
+
* <Chat.Header />
|
|
2428
|
+
* <Chat.MessageList>
|
|
2429
|
+
* {(message) =>
|
|
2430
|
+
* message.metadata?.type === "plan"
|
|
2431
|
+
* ? <PlanCard key={message.id} />
|
|
2432
|
+
* : <Chat.DefaultMessage key={message.id} message={message} />
|
|
2433
|
+
* }
|
|
2434
|
+
* </Chat.MessageList>
|
|
2435
|
+
* <Chat.Input />
|
|
2436
|
+
* </CopilotChat>
|
|
2437
|
+
* ```
|
|
2438
|
+
*/
|
|
2439
|
+
declare const ChatPrimitives: {
|
|
2440
|
+
/** Renders the message list via render-prop. Falls back to DefaultMessage if no children. */
|
|
2441
|
+
MessageList: typeof MessageList;
|
|
2442
|
+
/** Full SDK message bubble (user + assistant + tools). Use as fallback inside MessageList. */
|
|
2443
|
+
DefaultMessage: typeof DefaultMessage;
|
|
2444
|
+
/** Low-level message row wrapper (flex layout + avatar slot) */
|
|
2445
|
+
Message: ({ children, className, ...props }: MessageProps) => react_jsx_runtime.JSX.Element;
|
|
2446
|
+
/** Message avatar — image with fallback text/icon */
|
|
2447
|
+
MessageAvatar: ({ src, alt, fallback, fallbackIcon, children, delayMs, className, }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
2448
|
+
/** Message content bubble — supports markdown */
|
|
2449
|
+
MessageContent: ({ children, markdown, className, size, ...props }: MessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
2450
|
+
/** Action bar below a message (copy, feedback, etc.) */
|
|
2451
|
+
MessageActions: ({ children, className, ...props }: MessageActionsProps$1) => react_jsx_runtime.JSX.Element;
|
|
2452
|
+
/** Single action button with tooltip inside MessageActions */
|
|
2453
|
+
MessageAction: ({ tooltip, children, className, side, ...props }: MessageActionProps) => react_jsx_runtime.JSX.Element;
|
|
2454
|
+
/** Chat header bar with title and controls */
|
|
2455
|
+
Header: typeof ChatHeader;
|
|
2456
|
+
/** Welcome screen shown when there are no messages */
|
|
2457
|
+
Welcome: typeof ChatWelcome;
|
|
2458
|
+
/** Chat input / composer */
|
|
2459
|
+
Input: typeof PromptInput;
|
|
2460
|
+
/** Scroll anchor — keeps the view pinned to the latest message */
|
|
2461
|
+
ScrollAnchor: typeof ChatContainerScrollAnchor;
|
|
2462
|
+
/** Loading / streaming indicator (dots, wave, typing variants) */
|
|
2463
|
+
Loader: typeof Loader;
|
|
2464
|
+
};
|
|
2465
|
+
|
|
2466
|
+
export { AlertTriangleIcon, type BackButtonProps, BotIcon, BranchNavigator, type BranchNavigatorProps, Button, CapabilityBadge, type CapabilityBadgeProps, CapabilityList, type CapabilityListProps, type CapabilityType, Chat, ChatContainerContent, ChatContainerRoot, ChatContainerScrollAnchor, type ChatMessage, ChatPrimitives, type ChatProps, type ChatViewProps, ChatWelcome, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronUpIcon, type Citation, CitationBadge, type CitationBadgeProps, type CitationConfig, CitationSuperscript, type CitationSuperscriptProps, type CitationsConfig, CloseIcon, type CloudPersistenceConfig, CodeBlock, CompactPermissionConfirmation, type CompactPermissionConfirmationProps, Confirmation, ConfirmationActions, type ConfirmationActionsProps, ConfirmationApproved, type ConfirmationApprovedProps, ConfirmationMessage, type ConfirmationMessageProps, ConfirmationPending, type ConfirmationPendingProps, type ConfirmationProps, ConfirmationRejected, type ConfirmationRejectedProps, type ConfirmationState$1 as ConfirmationState, ConnectedChat, type ConnectedChatProps, CopilotChat, type CopilotChatClassNames, type CopilotChatPersistenceConfig, type CopilotChatProps, type CopilotUIConfig, type CopilotUIContextValue, CopilotUIProvider, type CopilotUIProviderProps, CopyIcon, DEFAULT_PERMISSION_OPTIONS, DevLogger, type DevLoggerProps, type DevLoggerState, FeedbackBar, type FollowUpProps, FollowUpQuestions, type FooterProps, type HeaderProps, type HomeViewProps as HomeProps, type HomeViewProps, InlineToolSteps, type InlineToolStepsProps, Loader, type LocalPersistenceConfig, MCPUIFrame, MCPUIFrameList, type MCPUIFrameListProps, MCPUIFrameProps, Markdown, MessageAvatar, MessageContent, type MessageListProps, Message as MessagePrimitive, MessageWithCitations, type MessageWithCitationsProps, type ModelOption, ModelSelector, type ModelSelectorProps, PermissionConfirmation, type PermissionConfirmationProps, type PermissionLevel, type PermissionOption, PoweredBy, type PoweredByProps, PromptInput, PromptInputAction, PromptInputActions, PromptInputTextarea, type ProviderGroup, Reasoning, ReasoningContent, type ReasoningContentProps, type ReasoningProps, ReasoningTrigger, type ReasoningTriggerProps, RefreshIcon, ScrollButton, SearchAnswer, type SearchAnswerProps, SearchResults, type SearchResultsProps, SearchResultsWithAnswer, type SearchResultsWithAnswerProps, SendIcon, type ServerPersistenceConfig, SimpleConfirmation, type SimpleConfirmationProps, SimpleModelSelector, type SimpleModelSelectorProps, SimpleReasoning, type SimpleReasoningProps, SimpleSource, type SimpleSourceProps, Source, SourceContent, type SourceContentProps, SourceGroup, type SourceGroupProps, type SourceItem, SourcePill, type SourcePillProps, type SourceProps, SourceTrigger, type SourceTriggerProps, SourcesBar, type SourcesBarProps, SourcesCollapsible, type SourcesCollapsibleProps, SourcesList, type SourcesListProps, StopIcon, ThreadCard, type ThreadCardProps, ThreadList, type ThreadListProps, ThreadPicker, type ThreadPickerCompoundProps, type ThreadPickerProps, ThumbsDownIcon, ThumbsUpIcon, ToolExecutionMessage, type ToolRendererProps, type ToolRenderers, ToolStep, type ToolStepData, type ToolStepProps, type ToolStepStatus, ToolSteps, type ToolStepsProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, UserIcon, type WelcomeConfig, XIcon, annotationsToCitations, cn, parseFollowUps, resultsToCitations, useChatContainer, useCopilotChatContext, useCopilotUI };
|