@cadraos/sdk 0.1.11-test → 0.1.12
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/chat/index.cjs +899 -252
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +277 -39
- package/dist/chat/index.d.ts +277 -39
- package/dist/chat/index.js +894 -253
- package/dist/chat/index.js.map +1 -1
- package/dist/index.cjs +52 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +52 -3
- package/dist/index.js.map +1 -1
- package/package.json +14 -19
- package/dist/chat/styles.css +0 -1
package/dist/chat/index.d.ts
CHANGED
|
@@ -3,28 +3,6 @@ import { Components } from 'react-markdown';
|
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
|
|
6
|
-
interface MarkdownContentProps {
|
|
7
|
-
/** Markdown content to render */
|
|
8
|
-
content: string;
|
|
9
|
-
/** Additional CSS classes */
|
|
10
|
-
className?: string;
|
|
11
|
-
/** Custom React-Markdown component overrides (merged with defaults, user wins) */
|
|
12
|
-
components?: Partial<Components>;
|
|
13
|
-
/** Custom URL transform for React-Markdown (e.g., to preserve custom protocols like artifact:) */
|
|
14
|
-
urlTransform?: (url: string) => string;
|
|
15
|
-
/** Transform content string before rendering (e.g., strip certain patterns) */
|
|
16
|
-
contentTransform?: (content: string) => string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Renders markdown content with chat-appropriate styling
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* <MarkdownContent content="# Hello\n\nThis is **bold** text." />
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare function MarkdownContent({ content, className, components: customComponents, urlTransform, contentTransform, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
6
|
/**
|
|
29
7
|
* Type definitions for @cadraos/sdk/chat
|
|
30
8
|
*
|
|
@@ -49,7 +27,11 @@ interface ChatMessage$1 {
|
|
|
49
27
|
/** Tool calls made during this message */
|
|
50
28
|
toolCalls?: ToolCall[];
|
|
51
29
|
/** Thinking blocks (for models that support extended thinking) */
|
|
52
|
-
thinkingBlocks?: ThinkingBlock[];
|
|
30
|
+
thinkingBlocks?: ThinkingBlock$1[];
|
|
31
|
+
/** Images extracted from tool results (convenience projection, derived from toolCalls) */
|
|
32
|
+
images?: ImageData[];
|
|
33
|
+
/** Delegation events for team execution (orchestrator → specialist handoffs) */
|
|
34
|
+
delegationEvents?: DelegationEvent[];
|
|
53
35
|
}
|
|
54
36
|
/**
|
|
55
37
|
* Attachment data for files sent with messages
|
|
@@ -94,7 +76,7 @@ interface ToolCall {
|
|
|
94
76
|
/**
|
|
95
77
|
* Thinking block for extended thinking models
|
|
96
78
|
*/
|
|
97
|
-
interface ThinkingBlock {
|
|
79
|
+
interface ThinkingBlock$1 {
|
|
98
80
|
/** Unique identifier */
|
|
99
81
|
id: string;
|
|
100
82
|
/** Thinking content */
|
|
@@ -102,6 +84,52 @@ interface ThinkingBlock {
|
|
|
102
84
|
/** When the thinking block was created */
|
|
103
85
|
timestamp: Date;
|
|
104
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Image data extracted from tool results.
|
|
89
|
+
* Always derived from toolCalls[] (single source of truth).
|
|
90
|
+
*/
|
|
91
|
+
interface ImageData {
|
|
92
|
+
/** Image URL */
|
|
93
|
+
url: string;
|
|
94
|
+
/** Alt text for accessibility */
|
|
95
|
+
alt?: string;
|
|
96
|
+
/** Original filename */
|
|
97
|
+
filename?: string;
|
|
98
|
+
/** Image width in pixels */
|
|
99
|
+
width?: number;
|
|
100
|
+
/** Image height in pixels */
|
|
101
|
+
height?: number;
|
|
102
|
+
/** ID of the tool call that produced this image */
|
|
103
|
+
sourceToolCallId?: string;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Delegation event for team execution (orchestrator → specialist handoffs).
|
|
107
|
+
* Uses wire types: delegation_started / delegation_completed.
|
|
108
|
+
*/
|
|
109
|
+
interface DelegationEvent {
|
|
110
|
+
/** Event type matching the wire protocol */
|
|
111
|
+
type: "delegation_started" | "delegation_completed";
|
|
112
|
+
/** Unique handoff ID linking start/complete pairs */
|
|
113
|
+
handoffId?: string;
|
|
114
|
+
/** Orchestrator agent name */
|
|
115
|
+
fromAgent?: string;
|
|
116
|
+
/** Target specialist agent name */
|
|
117
|
+
toAgent?: string;
|
|
118
|
+
/** Target agent UUID (raw from wire event) */
|
|
119
|
+
targetAgentUuid?: string;
|
|
120
|
+
/** Sub-execution ID */
|
|
121
|
+
executionId?: string;
|
|
122
|
+
/** Preview of the delegated task (from delegation_started) */
|
|
123
|
+
taskPreview?: string;
|
|
124
|
+
/** Preview of the result (from delegation_completed) */
|
|
125
|
+
resultPreview?: string;
|
|
126
|
+
/** When the event occurred */
|
|
127
|
+
timestamp: Date;
|
|
128
|
+
/** Current status */
|
|
129
|
+
status?: "active" | "completed" | "failed";
|
|
130
|
+
/** Duration in milliseconds (from delegation_completed) */
|
|
131
|
+
durationMs?: number;
|
|
132
|
+
}
|
|
105
133
|
/**
|
|
106
134
|
* Chat error information
|
|
107
135
|
*/
|
|
@@ -137,6 +165,14 @@ interface TodoItem {
|
|
|
137
165
|
/** Present continuous form for active display */
|
|
138
166
|
activeForm: string;
|
|
139
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Tool call verbosity levels for controlling which tool calls are displayed
|
|
170
|
+
*
|
|
171
|
+
* - `"compact"` (default) — Hide internal/orchestration tools, show user-facing tools in compact style
|
|
172
|
+
* - `"verbose"` — Show all tools including internal ones (useful for debugging)
|
|
173
|
+
* - `"hidden"` — Hide all tool calls entirely
|
|
174
|
+
*/
|
|
175
|
+
type ToolCallVerbosity = "compact" | "verbose" | "hidden";
|
|
140
176
|
/**
|
|
141
177
|
* SSE stream event from agent execution
|
|
142
178
|
*/
|
|
@@ -176,14 +212,6 @@ interface ExecutionStreamEvent {
|
|
|
176
212
|
[key: string]: unknown;
|
|
177
213
|
};
|
|
178
214
|
}
|
|
179
|
-
/**
|
|
180
|
-
* Tool call verbosity levels for controlling which tool calls are displayed
|
|
181
|
-
*
|
|
182
|
-
* - `"compact"` (default) — Hide internal/orchestration tools, show user-facing tools in compact style
|
|
183
|
-
* - `"verbose"` — Show all tools including internal ones (useful for debugging)
|
|
184
|
-
* - `"hidden"` — Hide all tool calls entirely
|
|
185
|
-
*/
|
|
186
|
-
type ToolCallVerbosity = "compact" | "verbose" | "hidden";
|
|
187
215
|
/**
|
|
188
216
|
* Theme mode options
|
|
189
217
|
*/
|
|
@@ -212,6 +240,43 @@ interface AttachmentFile {
|
|
|
212
240
|
actualSize?: number;
|
|
213
241
|
}
|
|
214
242
|
|
|
243
|
+
interface MarkdownContentProps {
|
|
244
|
+
/** Markdown content to render */
|
|
245
|
+
content: string;
|
|
246
|
+
/** Additional CSS classes */
|
|
247
|
+
className?: string;
|
|
248
|
+
/** Custom React-Markdown component overrides (merged with defaults, user wins) */
|
|
249
|
+
components?: Partial<Components>;
|
|
250
|
+
/** Custom URL transform for React-Markdown (e.g., to preserve custom protocols like artifact:) */
|
|
251
|
+
urlTransform?: (url: string) => string;
|
|
252
|
+
/** Transform content string before rendering (e.g., strip certain patterns) */
|
|
253
|
+
contentTransform?: (content: string) => string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Renders markdown content with chat-appropriate styling
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```tsx
|
|
260
|
+
* <MarkdownContent content="# Hello\n\nThis is **bold** text." />
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
declare function MarkdownContent({ content, className, components: customComponents, urlTransform, contentTransform, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* CSS custom properties supported by ChatMessage for theming:
|
|
267
|
+
*
|
|
268
|
+
* --chat-user-bg: User message bubble background (default: #3b82f6)
|
|
269
|
+
* --chat-user-text: User message text color (default: white)
|
|
270
|
+
* --chat-user-avatar-bg: User avatar background (default: #3b82f6)
|
|
271
|
+
* --chat-user-avatar-text: User avatar text color (default: white)
|
|
272
|
+
* --chat-assistant-bg: Assistant message bubble background (default: #f3f4f6)
|
|
273
|
+
* --chat-assistant-text: Assistant message text color (default: #111827)
|
|
274
|
+
* --chat-assistant-avatar-bg: Assistant avatar background (default: #e5e7eb)
|
|
275
|
+
* --chat-assistant-avatar-text: Assistant avatar text color (default: #4b5563)
|
|
276
|
+
* --chat-meta-text: Timestamp and metadata text color (default: #6b7280)
|
|
277
|
+
*
|
|
278
|
+
* Set these on a parent element (e.g., .cadra-chat-container) to theme the chat.
|
|
279
|
+
*/
|
|
215
280
|
interface ChatMessageProps {
|
|
216
281
|
/** Message data */
|
|
217
282
|
message: ChatMessage$1;
|
|
@@ -235,6 +300,20 @@ interface ChatMessageProps {
|
|
|
235
300
|
alt?: string;
|
|
236
301
|
filename?: string;
|
|
237
302
|
}) => void;
|
|
303
|
+
/** Show thinking blocks (default true) */
|
|
304
|
+
showThinking?: boolean;
|
|
305
|
+
/** Show delegation progress (default true) */
|
|
306
|
+
showDelegation?: boolean;
|
|
307
|
+
/** Show images from tool results (default true) */
|
|
308
|
+
showImages?: boolean;
|
|
309
|
+
/** Custom tool call rendering override */
|
|
310
|
+
renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
|
|
311
|
+
/**
|
|
312
|
+
* Visual variant for the message layout.
|
|
313
|
+
* - "bubble" (default): Chat bubble style with colored backgrounds and right-aligned user messages.
|
|
314
|
+
* - "flat": Full-width flat layout (like Claude AI). Both roles left-aligned, no bubble backgrounds.
|
|
315
|
+
*/
|
|
316
|
+
variant?: "bubble" | "flat";
|
|
238
317
|
}
|
|
239
318
|
/**
|
|
240
319
|
* Renders a single chat message with appropriate styling
|
|
@@ -253,7 +332,7 @@ interface ChatMessageProps {
|
|
|
253
332
|
* />
|
|
254
333
|
* ```
|
|
255
334
|
*/
|
|
256
|
-
declare function ChatMessage({ message, enableMarkdown, showToolCalls, toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
|
|
335
|
+
declare function ChatMessage({ message, enableMarkdown, showToolCalls, toolCallVerbosity: _toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, showThinking, showDelegation, showImages, renderToolCall, variant, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
|
|
257
336
|
|
|
258
337
|
interface MessageListProps {
|
|
259
338
|
/** Array of messages to display */
|
|
@@ -297,6 +376,22 @@ interface MessageListProps {
|
|
|
297
376
|
alt?: string;
|
|
298
377
|
filename?: string;
|
|
299
378
|
}) => void;
|
|
379
|
+
/** Show thinking blocks (default true) */
|
|
380
|
+
showThinking?: boolean;
|
|
381
|
+
/** Show delegation progress (default true) */
|
|
382
|
+
showDelegation?: boolean;
|
|
383
|
+
/** Show images from tool results (default true) */
|
|
384
|
+
showImages?: boolean;
|
|
385
|
+
/** Custom message rendering override */
|
|
386
|
+
renderMessage?: (message: ChatMessage$1, defaultRender: () => React.ReactNode) => React.ReactNode;
|
|
387
|
+
/** Custom tool call rendering override */
|
|
388
|
+
renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
|
|
389
|
+
/**
|
|
390
|
+
* Visual variant for message rendering.
|
|
391
|
+
* - "bubble" (default): Chat bubble style with colored backgrounds.
|
|
392
|
+
* - "flat": Full-width flat layout (like Claude AI).
|
|
393
|
+
*/
|
|
394
|
+
messageVariant?: "bubble" | "flat";
|
|
300
395
|
/**
|
|
301
396
|
* Send message function passed from parent (AgentChat).
|
|
302
397
|
* Used to forward to renderWelcome render function for suggestion chips.
|
|
@@ -319,7 +414,7 @@ interface MessageListProps {
|
|
|
319
414
|
* />
|
|
320
415
|
* ```
|
|
321
416
|
*/
|
|
322
|
-
declare function MessageList({ messages, welcomeMessage, renderWelcome, isLoading, isStreaming, isLoadingHistory, enableMarkdown, showToolCalls, toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, sendMessage, }: MessageListProps): react_jsx_runtime.JSX.Element;
|
|
417
|
+
declare function MessageList({ messages, welcomeMessage, renderWelcome, isLoading, isStreaming, isLoadingHistory, enableMarkdown, showToolCalls, toolCallVerbosity, className, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, showThinking, showDelegation, showImages, renderMessage, renderToolCall, messageVariant, sendMessage, }: MessageListProps): react_jsx_runtime.JSX.Element;
|
|
323
418
|
|
|
324
419
|
/**
|
|
325
420
|
* Common types shared across all resources
|
|
@@ -1234,12 +1329,18 @@ interface AgentChatProps {
|
|
|
1234
1329
|
renderWelcome?: React.ReactNode | ((props: {
|
|
1235
1330
|
sendMessage: (text: string) => void;
|
|
1236
1331
|
}) => React.ReactNode);
|
|
1237
|
-
/** Maximum height of the chat container */
|
|
1332
|
+
/** Maximum height of the chat container (only used in "fixed" layout) */
|
|
1238
1333
|
maxHeight?: string | number;
|
|
1239
1334
|
/** Additional CSS class for the container */
|
|
1240
1335
|
className?: string;
|
|
1241
1336
|
/** Theme mode */
|
|
1242
1337
|
theme?: ThemeMode;
|
|
1338
|
+
/**
|
|
1339
|
+
* Layout mode for the chat container.
|
|
1340
|
+
* - "fixed" (default): Widget-style with maxHeight constraint.
|
|
1341
|
+
* - "fill": Fills parent flex container. Use for full-page layouts.
|
|
1342
|
+
*/
|
|
1343
|
+
layout?: "fixed" | "fill";
|
|
1243
1344
|
/** Enable file attachments */
|
|
1244
1345
|
enableAttachments?: boolean;
|
|
1245
1346
|
/** Enable markdown rendering */
|
|
@@ -1268,6 +1369,40 @@ interface AgentChatProps {
|
|
|
1268
1369
|
alt?: string;
|
|
1269
1370
|
filename?: string;
|
|
1270
1371
|
}) => void;
|
|
1372
|
+
/** Hide the default chat header when true */
|
|
1373
|
+
hideHeader?: boolean;
|
|
1374
|
+
/** Render slot above the chat input (e.g., config pills, action buttons) */
|
|
1375
|
+
renderAboveInput?: () => React.ReactNode;
|
|
1376
|
+
/** Render slot below the message list (e.g., image carousel) */
|
|
1377
|
+
renderBelowMessages?: () => React.ReactNode;
|
|
1378
|
+
/**
|
|
1379
|
+
* Custom message rendering override.
|
|
1380
|
+
* Receives the message and a defaultRender function for selective override.
|
|
1381
|
+
*/
|
|
1382
|
+
renderMessage?: (message: ChatMessage$1, defaultRender: () => React.ReactNode) => React.ReactNode;
|
|
1383
|
+
/**
|
|
1384
|
+
* Custom tool call rendering override.
|
|
1385
|
+
* Receives the tool call and a defaultRender function for selective override.
|
|
1386
|
+
*/
|
|
1387
|
+
renderToolCall?: (toolCall: ToolCall, defaultRender: () => React.ReactNode) => React.ReactNode;
|
|
1388
|
+
/**
|
|
1389
|
+
* Visual variant for message rendering.
|
|
1390
|
+
* - "bubble" (default): Chat bubble style with colored backgrounds.
|
|
1391
|
+
* - "flat": Full-width flat layout (like Claude AI).
|
|
1392
|
+
*/
|
|
1393
|
+
messageVariant?: "bubble" | "flat";
|
|
1394
|
+
/** Show thinking blocks (default true) */
|
|
1395
|
+
showThinking?: boolean;
|
|
1396
|
+
/** Show delegation progress (default true) */
|
|
1397
|
+
showDelegation?: boolean;
|
|
1398
|
+
/** Show images from tool results (default true) */
|
|
1399
|
+
showImages?: boolean;
|
|
1400
|
+
/** Polling interval in ms (default 2000) */
|
|
1401
|
+
pollingInterval?: number;
|
|
1402
|
+
/** Enable polling fallback (default true) */
|
|
1403
|
+
pollingEnabled?: boolean;
|
|
1404
|
+
/** Callback fired when a delegation event occurs */
|
|
1405
|
+
onDelegation?: (event: DelegationEvent) => void;
|
|
1271
1406
|
}
|
|
1272
1407
|
/**
|
|
1273
1408
|
* Complete chat interface for interacting with AI agents
|
|
@@ -1290,7 +1425,7 @@ interface AgentChatProps {
|
|
|
1290
1425
|
* />
|
|
1291
1426
|
* ```
|
|
1292
1427
|
*/
|
|
1293
|
-
declare function AgentChat({ agentId, teamId, sessionId, adapter, onMessage, onError, onSessionCreated, onSessionStart, onToolCall, onToolResult, onClarification, initialMessages, placeholder, welcomeMessage, renderWelcome, maxHeight, className, theme, enableAttachments, enableMarkdown, showToolCalls, toolCallVerbosity, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1428
|
+
declare function AgentChat({ agentId, teamId, sessionId, adapter, onMessage, onError, onSessionCreated, onSessionStart, onToolCall, onToolResult, onClarification, initialMessages, placeholder, welcomeMessage, renderWelcome, maxHeight, className, theme, layout, enableAttachments, enableMarkdown, showToolCalls, toolCallVerbosity, markdownComponents, markdownUrlTransform, markdownContentTransform, onImageClick, hideHeader, renderAboveInput, renderBelowMessages, renderMessage, renderToolCall, messageVariant, showThinking, showDelegation, showImages, pollingInterval, pollingEnabled, onDelegation, }: AgentChatProps): react_jsx_runtime.JSX.Element;
|
|
1294
1429
|
|
|
1295
1430
|
/**
|
|
1296
1431
|
* Retry utility with exponential backoff
|
|
@@ -2938,6 +3073,20 @@ interface UseAgentChatOptions {
|
|
|
2938
3073
|
onToolResult?: (toolName: string, result: unknown, durationMs?: number) => void;
|
|
2939
3074
|
/** Callback fired when clarification is needed */
|
|
2940
3075
|
onClarification?: (data: ClarificationData) => void;
|
|
3076
|
+
/** Callback fired when a delegation event occurs (team execution) */
|
|
3077
|
+
onDelegation?: (event: DelegationEvent) => void;
|
|
3078
|
+
/**
|
|
3079
|
+
* Polling interval in milliseconds for the polling fallback.
|
|
3080
|
+
* Used when SSE connection fails and falls back to polling.
|
|
3081
|
+
* Default: 2000ms
|
|
3082
|
+
*/
|
|
3083
|
+
pollingInterval?: number;
|
|
3084
|
+
/**
|
|
3085
|
+
* Whether polling fallback is enabled.
|
|
3086
|
+
* When false, SSE failure will result in an error instead of falling back to polling.
|
|
3087
|
+
* Default: true
|
|
3088
|
+
*/
|
|
3089
|
+
pollingEnabled?: boolean;
|
|
2941
3090
|
}
|
|
2942
3091
|
/**
|
|
2943
3092
|
* Options for sendMessage
|
|
@@ -2961,6 +3110,8 @@ interface UseAgentChatResult {
|
|
|
2961
3110
|
sessionId: string | null;
|
|
2962
3111
|
/** Current clarification request if any */
|
|
2963
3112
|
clarification: ClarificationData | null;
|
|
3113
|
+
/** Currently active delegation event (team execution) */
|
|
3114
|
+
activeDelegation: DelegationEvent | null;
|
|
2964
3115
|
/** Send a message to the agent */
|
|
2965
3116
|
sendMessage: (content: string, options?: SendMessageOptions) => Promise<void>;
|
|
2966
3117
|
/** Respond to a clarification request */
|
|
@@ -3188,12 +3339,21 @@ declare function useFileAttachments(options: UseFileAttachmentsOptions): UseFile
|
|
|
3188
3339
|
interface ChatContainerProps {
|
|
3189
3340
|
/** Child components (MessageList, ChatInput, etc.) */
|
|
3190
3341
|
children: React$1.ReactNode;
|
|
3191
|
-
/**
|
|
3342
|
+
/**
|
|
3343
|
+
* Maximum height of the container (only used in "fixed" layout).
|
|
3344
|
+
* Ignored when layout is "fill".
|
|
3345
|
+
*/
|
|
3192
3346
|
maxHeight?: string | number;
|
|
3193
3347
|
/** Additional CSS classes */
|
|
3194
3348
|
className?: string;
|
|
3195
3349
|
/** Theme mode */
|
|
3196
3350
|
theme?: ThemeMode;
|
|
3351
|
+
/**
|
|
3352
|
+
* Layout mode for the container.
|
|
3353
|
+
* - "fixed" (default): Uses maxHeight for a widget-style bounded container.
|
|
3354
|
+
* - "fill": Uses flex-1/min-h-0 to fill parent container. Ideal for full-page layouts.
|
|
3355
|
+
*/
|
|
3356
|
+
layout?: "fixed" | "fill";
|
|
3197
3357
|
}
|
|
3198
3358
|
/**
|
|
3199
3359
|
* Container component for the chat interface
|
|
@@ -3206,7 +3366,7 @@ interface ChatContainerProps {
|
|
|
3206
3366
|
* </ChatContainer>
|
|
3207
3367
|
* ```
|
|
3208
3368
|
*/
|
|
3209
|
-
declare function ChatContainer({ children, maxHeight, className, theme, }: ChatContainerProps): react_jsx_runtime.JSX.Element;
|
|
3369
|
+
declare function ChatContainer({ children, maxHeight, className, theme, layout, }: ChatContainerProps): react_jsx_runtime.JSX.Element;
|
|
3210
3370
|
|
|
3211
3371
|
interface ChatInputProps {
|
|
3212
3372
|
/** Callback when user sends a message */
|
|
@@ -3294,6 +3454,84 @@ interface ToolCallEntryProps {
|
|
|
3294
3454
|
*/
|
|
3295
3455
|
declare function ToolCallEntry({ toolCall, className, showFullJson, onImageClick, compact, }: ToolCallEntryProps): react_jsx_runtime.JSX.Element;
|
|
3296
3456
|
|
|
3457
|
+
interface ThinkingBlockProps {
|
|
3458
|
+
/** Thinking block data */
|
|
3459
|
+
block: ThinkingBlock$1;
|
|
3460
|
+
/** Whether the block starts expanded */
|
|
3461
|
+
defaultExpanded?: boolean;
|
|
3462
|
+
/** Additional CSS classes */
|
|
3463
|
+
className?: string;
|
|
3464
|
+
}
|
|
3465
|
+
interface ThinkingBlockListProps {
|
|
3466
|
+
/** Array of thinking blocks to display */
|
|
3467
|
+
blocks: ThinkingBlock$1[];
|
|
3468
|
+
/** Whether blocks start expanded */
|
|
3469
|
+
defaultExpanded?: boolean;
|
|
3470
|
+
/** Additional CSS classes */
|
|
3471
|
+
className?: string;
|
|
3472
|
+
}
|
|
3473
|
+
/**
|
|
3474
|
+
* Renders a single collapsible thinking/reasoning block
|
|
3475
|
+
*/
|
|
3476
|
+
declare function ThinkingBlock({ block, defaultExpanded, className, }: ThinkingBlockProps): react_jsx_runtime.JSX.Element;
|
|
3477
|
+
/**
|
|
3478
|
+
* Renders a list of thinking blocks
|
|
3479
|
+
*/
|
|
3480
|
+
declare function ThinkingBlockList({ blocks, defaultExpanded, className, }: ThinkingBlockListProps): react_jsx_runtime.JSX.Element | null;
|
|
3481
|
+
|
|
3482
|
+
interface DelegationProgressProps {
|
|
3483
|
+
/** Delegation event data */
|
|
3484
|
+
event: DelegationEvent;
|
|
3485
|
+
/** Additional CSS classes */
|
|
3486
|
+
className?: string;
|
|
3487
|
+
}
|
|
3488
|
+
interface DelegationProgressListProps {
|
|
3489
|
+
/** Array of delegation events to display */
|
|
3490
|
+
events: DelegationEvent[];
|
|
3491
|
+
/** Additional CSS classes */
|
|
3492
|
+
className?: string;
|
|
3493
|
+
}
|
|
3494
|
+
/**
|
|
3495
|
+
* Renders a single delegation progress indicator
|
|
3496
|
+
*/
|
|
3497
|
+
declare function DelegationProgress({ event, className, }: DelegationProgressProps): react_jsx_runtime.JSX.Element;
|
|
3498
|
+
/**
|
|
3499
|
+
* Renders a list of delegation progress indicators
|
|
3500
|
+
*/
|
|
3501
|
+
declare function DelegationProgressList({ events, className, }: DelegationProgressListProps): react_jsx_runtime.JSX.Element | null;
|
|
3502
|
+
|
|
3503
|
+
interface ImageGalleryProps {
|
|
3504
|
+
/** Array of images to display */
|
|
3505
|
+
images: ImageData[];
|
|
3506
|
+
/** Callback when an image is clicked. Overrides default lightbox behavior. */
|
|
3507
|
+
onImageClick?: (image: ImageData) => void;
|
|
3508
|
+
/** Additional CSS classes */
|
|
3509
|
+
className?: string;
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Renders images in a responsive grid with optional lightbox
|
|
3513
|
+
*/
|
|
3514
|
+
declare function ImageGallery({ images, onImageClick, className, }: ImageGalleryProps): react_jsx_runtime.JSX.Element | null;
|
|
3515
|
+
|
|
3516
|
+
interface ImageLightboxProps {
|
|
3517
|
+
/** Array of images */
|
|
3518
|
+
images: ImageData[];
|
|
3519
|
+
/** Current image index */
|
|
3520
|
+
currentIndex: number;
|
|
3521
|
+
/** Close the lightbox */
|
|
3522
|
+
onClose: () => void;
|
|
3523
|
+
/** Navigate to previous image */
|
|
3524
|
+
onPrev: () => void;
|
|
3525
|
+
/** Navigate to next image */
|
|
3526
|
+
onNext: () => void;
|
|
3527
|
+
/** Additional CSS classes for the overlay */
|
|
3528
|
+
className?: string;
|
|
3529
|
+
}
|
|
3530
|
+
/**
|
|
3531
|
+
* Fullscreen image viewer with prev/next navigation
|
|
3532
|
+
*/
|
|
3533
|
+
declare function ImageLightbox({ images, currentIndex, onClose, onPrev, onNext, className, }: ImageLightboxProps): react_jsx_runtime.JSX.Element | null;
|
|
3534
|
+
|
|
3297
3535
|
interface AskUserPromptProps {
|
|
3298
3536
|
/** The question to display to the user */
|
|
3299
3537
|
question: string;
|
|
@@ -3412,4 +3650,4 @@ declare function ClockIcon({ className, ...props }: IconProps): react_jsx_runtim
|
|
|
3412
3650
|
*/
|
|
3413
3651
|
declare function compressImage(file: File, targetSizeKB?: number): Promise<File>;
|
|
3414
3652
|
|
|
3415
|
-
export { AgentChat, type AgentChatProps, AlertCircleIcon, type Artifact$1 as Artifact, AskUserPrompt, type AskUserPromptProps, type AttachmentData, type AttachmentFile, BotIcon, type ChatAdapter, ChatConfigProvider, type ChatConfigProviderProps, ChatContainer, type ChatContainerProps, type ChatError, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageProps, type ChatMessage$1 as ChatMessageType, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleIcon, type ClarificationData, ClockIcon, CodeIcon, CopyIcon, DatabaseIcon, type DefaultAdapterConfig, DownloadIcon, type Execution, type ExecutionResult, type ExecutionStreamEvent, ExternalLinkIcon, FileDropZone, type FileDropZoneProps, type FileDropZoneRef, FileIcon, FileTextIcon, HelpCircleIcon, type HistoryMessage, INTERNAL_TOOL_NAMES, type IconProps, ImageIcon, ImagesIcon, type ListSessionsInput, ListTodoIcon, LoadingSpinner, MarkdownContent, type MarkdownContentProps, Maximize2Icon, MessageCircleIcon, MessageList, type MessageListProps, Minimize2Icon, PaperclipIcon, SendIcon, type SendMessageInput$1 as SendMessageInput, type SendMessageOptions, type SessionHistory$1 as SessionHistory, type SessionList, type SessionListItem, SparklesIcon, type StartExecutionInput, StopCircleIcon, type ThemeMode, type ThinkingBlock, type TodoItem, TodoList, type TodoListProps, type ToolCall, ToolCallEntry, type ToolCallEntryProps, type ToolCallVerbosity, type UploadUrlInput, type UploadUrlResult, type UseAgentChatOptions, type UseAgentChatResult, type UseExecutionStreamOptions, type UseExecutionStreamResult, type UseFileAttachmentsOptions, type UseFileAttachmentsResult, UserIcon, XIcon, ZoomInIcon, ZoomOutIcon, compressImage, createDefaultAdapter, isInternalTool, useAgentChat, useChatConfig, useChatConfigOptional, useExecutionStream, useFileAttachments };
|
|
3653
|
+
export { AgentChat, type AgentChatProps, AlertCircleIcon, type Artifact$1 as Artifact, AskUserPrompt, type AskUserPromptProps, type AttachmentData, type AttachmentFile, BotIcon, type ChatAdapter, ChatConfigProvider, type ChatConfigProviderProps, ChatContainer, type ChatContainerProps, type ChatError, ChatInput, type ChatInputProps, ChatMessage, type ChatMessageProps, type ChatMessage$1 as ChatMessageType, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleIcon, type ClarificationData, ClockIcon, CodeIcon, CopyIcon, DatabaseIcon, type DefaultAdapterConfig, type DelegationEvent, DelegationProgress, DelegationProgressList, type DelegationProgressListProps, type DelegationProgressProps, DownloadIcon, type Execution, type ExecutionResult, type ExecutionStreamEvent, ExternalLinkIcon, FileDropZone, type FileDropZoneProps, type FileDropZoneRef, FileIcon, FileTextIcon, HelpCircleIcon, type HistoryMessage, INTERNAL_TOOL_NAMES, type IconProps, type ImageData, ImageGallery, type ImageGalleryProps, ImageIcon, ImageLightbox, type ImageLightboxProps, ImagesIcon, type ListSessionsInput, ListTodoIcon, LoadingSpinner, MarkdownContent, type MarkdownContentProps, Maximize2Icon, MessageCircleIcon, MessageList, type MessageListProps, Minimize2Icon, PaperclipIcon, SendIcon, type SendMessageInput$1 as SendMessageInput, type SendMessageOptions, type SessionHistory$1 as SessionHistory, type SessionList, type SessionListItem, SparklesIcon, type StartExecutionInput, StopCircleIcon, type ThemeMode, ThinkingBlock, ThinkingBlockList, type ThinkingBlockListProps, type ThinkingBlockProps, type ThinkingBlock$1 as ThinkingBlockType, type TodoItem, TodoList, type TodoListProps, type ToolCall, ToolCallEntry, type ToolCallEntryProps, type ToolCallVerbosity, type UploadUrlInput, type UploadUrlResult, type UseAgentChatOptions, type UseAgentChatResult, type UseExecutionStreamOptions, type UseExecutionStreamResult, type UseFileAttachmentsOptions, type UseFileAttachmentsResult, UserIcon, XIcon, ZoomInIcon, ZoomOutIcon, compressImage, createDefaultAdapter, isInternalTool, useAgentChat, useChatConfig, useChatConfigOptional, useExecutionStream, useFileAttachments };
|