modifywithai 1.10.0 → 2.2.1

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.
Files changed (39) hide show
  1. package/README.md +145 -0
  2. package/dist/assistant/index.d.ts +3 -0
  3. package/dist/assistant/index.js +1 -0
  4. package/dist/assistant-7f9B_gWg.js +2 -0
  5. package/dist/assistant-nextjs/api.d.ts +42 -0
  6. package/dist/assistant-nextjs/api.js +1 -0
  7. package/dist/assistant-remix/api.d.ts +46 -0
  8. package/dist/assistant-remix/api.js +1 -0
  9. package/dist/assistant-tanstack-start/api.d.ts +56 -0
  10. package/dist/assistant-tanstack-start/api.js +1 -0
  11. package/dist/index-B2dmSvFt.d.ts +1272 -0
  12. package/dist/index.d.ts +3 -69
  13. package/dist/index.js +1 -1
  14. package/dist/types-C7I0JuqF.d.ts +344 -0
  15. package/dist/utils-DQD-DMi0.js +1 -0
  16. package/package.json +67 -20
  17. package/dist/index-Dp00MJvS.d.ts +0 -391
  18. package/dist/nextjs/api.d.ts +0 -67
  19. package/dist/nextjs/api.js +0 -1
  20. package/dist/nextjs/shims.d.ts +0 -13
  21. package/dist/nextjs/shims.js +0 -1
  22. package/dist/react/index.d.ts +0 -3
  23. package/dist/react/index.js +0 -1
  24. package/dist/react-CREl6aTM.js +0 -1
  25. package/dist/remix/api.d.ts +0 -45
  26. package/dist/remix/api.js +0 -1
  27. package/dist/remix/index.d.ts +0 -38
  28. package/dist/remix/index.js +0 -1
  29. package/dist/remix/shims.d.ts +0 -14
  30. package/dist/remix/shims.js +0 -1
  31. package/dist/shims-C5D8K0uz.js +0 -191
  32. package/dist/tanstack-start/api.d.ts +0 -43
  33. package/dist/tanstack-start/api.js +0 -1
  34. package/dist/tanstack-start/index.d.ts +0 -33
  35. package/dist/tanstack-start/index.js +0 -1
  36. package/dist/tanstack-start/shims.d.ts +0 -15
  37. package/dist/tanstack-start/shims.js +0 -1
  38. package/dist/types-D83LZSks.d.ts +0 -190
  39. package/dist/types-V6wytIkL.js +0 -1
@@ -0,0 +1,1272 @@
1
+ import { S as UseDynamicUIReturn, a as AssistantConfig, b as UseAssistantTokenOptions, c as DynamicButton, g as ToolAction, l as DynamicButtonGroup, t as ActionDefinition, v as UseAssistantOptions, x as UseAssistantTokenReturn, y as UseAssistantReturn } from "./types-C7I0JuqF.js";
2
+ import * as React$2 from "react";
3
+ import React$1, { ComponentProps, FormEvent, HTMLAttributes, ReactNode } from "react";
4
+ import { ClassValue } from "clsx";
5
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
6
+ import { ComponentRegistry, ComponentRenderProps } from "@json-render/react";
7
+ import { Streamdown } from "streamdown";
8
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
9
+ import { ChatStatus, ToolUIPart, UIMessage } from "ai";
10
+ import { Drawer } from "vaul-base";
11
+ import { UITree } from "@json-render/core";
12
+
13
+ //#region src/assistant/components/assistant-messages.d.ts
14
+ interface AssistantMessagesProps {
15
+ /** The chat messages to render */
16
+ messages: UIMessage[];
17
+ /** Function to send a new message */
18
+ sendMessage: (message: {
19
+ text: string;
20
+ }) => void;
21
+ /** Function to add a tool approval response */
22
+ addToolApprovalResponse: (response: {
23
+ id: string;
24
+ approved: boolean;
25
+ }) => void;
26
+ /**
27
+ * Optional function to get a human-readable description for an action.
28
+ * If not provided, uses action.name as the description.
29
+ */
30
+ getActionDescription?: (action: ToolAction) => string;
31
+ /** Optional className for the container */
32
+ className?: string;
33
+ }
34
+ /**
35
+ * Renders a list of chat messages with proper handling of all part types:
36
+ * - text: Rendered as markdown via MessageResponse
37
+ * - tool-performActions: Rendered as Confirmation (if approval needed) or Task (if not)
38
+ * - tool-renderUI: Rendered as AssistantFormRenderer (only on last message)
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <AssistantMessages
43
+ * messages={assistant.messages}
44
+ * sendMessage={assistant.sendMessage}
45
+ * addToolApprovalResponse={assistant.addToolApprovalResponse}
46
+ * getActionDescription={(action) => `${ACTION_LABELS[action.name]}: ${action.options?.text}`}
47
+ * />
48
+ * ```
49
+ */
50
+ declare function AssistantMessages({
51
+ messages,
52
+ sendMessage,
53
+ addToolApprovalResponse,
54
+ getActionDescription,
55
+ className
56
+ }: AssistantMessagesProps): react_jsx_runtime0.JSX.Element;
57
+ //#endregion
58
+ //#region src/assistant/components/confirmation.d.ts
59
+ /**
60
+ * Approval state for a tool invocation
61
+ */
62
+ type ToolUIPartApproval = {
63
+ id: string;
64
+ approved?: never;
65
+ reason?: never;
66
+ } | {
67
+ id: string;
68
+ approved: boolean;
69
+ reason?: string;
70
+ } | undefined;
71
+ type ConfirmationProps = ComponentProps<"div"> & {
72
+ /** The approval state from the tool invocation */approval?: ToolUIPartApproval; /** The current state of the tool invocation */
73
+ state: ToolUIPart["state"];
74
+ };
75
+ /**
76
+ * Container for tool approval/confirmation UI
77
+ *
78
+ * Provides context for child components and handles visibility
79
+ * based on the tool invocation state.
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * <Confirmation state={state} approval={approval}>
84
+ * <ConfirmationTitle>Confirm action</ConfirmationTitle>
85
+ * <ConfirmationRequest>
86
+ * <ul>{actions.map(a => <li key={a.name}>{a.name}</li>)}</ul>
87
+ * </ConfirmationRequest>
88
+ * <ConfirmationAccepted>Done!</ConfirmationAccepted>
89
+ * <ConfirmationRejected>Cancelled</ConfirmationRejected>
90
+ * <ConfirmationActions>
91
+ * <ConfirmationAction onClick={deny}>Deny</ConfirmationAction>
92
+ * <ConfirmationAction onClick={approve}>Approve</ConfirmationAction>
93
+ * </ConfirmationActions>
94
+ * </Confirmation>
95
+ * ```
96
+ */
97
+ declare function Confirmation({
98
+ className,
99
+ approval,
100
+ state,
101
+ ...props
102
+ }: ConfirmationProps): react_jsx_runtime0.JSX.Element | null;
103
+ type ConfirmationTitleProps = ComponentProps<"p">;
104
+ /**
105
+ * Title for the confirmation dialog
106
+ */
107
+ declare function ConfirmationTitle({
108
+ className,
109
+ ...props
110
+ }: ConfirmationTitleProps): react_jsx_runtime0.JSX.Element;
111
+ type ConfirmationRequestProps = {
112
+ children?: ReactNode;
113
+ };
114
+ /**
115
+ * Content shown when approval is requested (before user response)
116
+ */
117
+ declare function ConfirmationRequest({
118
+ children
119
+ }: ConfirmationRequestProps): react_jsx_runtime0.JSX.Element | null;
120
+ type ConfirmationAcceptedProps = {
121
+ children?: ReactNode;
122
+ };
123
+ /**
124
+ * Content shown when the action was approved
125
+ */
126
+ declare function ConfirmationAccepted({
127
+ children
128
+ }: ConfirmationAcceptedProps): react_jsx_runtime0.JSX.Element | null;
129
+ type ConfirmationRejectedProps = {
130
+ children?: ReactNode;
131
+ };
132
+ /**
133
+ * Content shown when the action was rejected/denied
134
+ */
135
+ declare function ConfirmationRejected({
136
+ children
137
+ }: ConfirmationRejectedProps): react_jsx_runtime0.JSX.Element | null;
138
+ type ConfirmationActionsProps = ComponentProps<"div">;
139
+ /**
140
+ * Container for approve/deny action buttons
141
+ *
142
+ * Only visible when approval is requested.
143
+ */
144
+ declare function ConfirmationActions({
145
+ className,
146
+ ...props
147
+ }: ConfirmationActionsProps): react_jsx_runtime0.JSX.Element | null;
148
+ type ConfirmationActionProps = ComponentProps<"button"> & {
149
+ /** Button variant for styling */variant?: "default" | "outline" | "destructive";
150
+ };
151
+ /**
152
+ * Action button for the confirmation dialog (approve/deny)
153
+ *
154
+ * @example
155
+ * ```tsx
156
+ * <ConfirmationActions>
157
+ * <ConfirmationAction variant="outline" onClick={deny}>
158
+ * Deny
159
+ * </ConfirmationAction>
160
+ * <ConfirmationAction onClick={approve}>
161
+ * Approve
162
+ * </ConfirmationAction>
163
+ * </ConfirmationActions>
164
+ * ```
165
+ */
166
+ declare function ConfirmationAction({
167
+ className,
168
+ variant,
169
+ ...props
170
+ }: ConfirmationActionProps): react_jsx_runtime0.JSX.Element;
171
+ //#endregion
172
+ //#region src/assistant/components/conversation.d.ts
173
+ type ConversationProps = HTMLAttributes<HTMLDivElement>;
174
+ /**
175
+ * Container for the chat conversation
176
+ *
177
+ * Provides semantic structure with `role="log"` for accessibility.
178
+ *
179
+ * @example
180
+ * ```tsx
181
+ * <Conversation>
182
+ * <ConversationContent>
183
+ * {messages.length === 0 ? (
184
+ * <ConversationEmptyState
185
+ * title="No messages yet"
186
+ * description="Start a conversation"
187
+ * />
188
+ * ) : (
189
+ * messages.map(msg => <Message key={msg.id} {...msg} />)
190
+ * )}
191
+ * </ConversationContent>
192
+ * </Conversation>
193
+ * ```
194
+ */
195
+ declare function Conversation({
196
+ className,
197
+ children,
198
+ ...props
199
+ }: ConversationProps): react_jsx_runtime0.JSX.Element;
200
+ type ConversationContentProps = HTMLAttributes<HTMLDivElement>;
201
+ /**
202
+ * Scrollable content area for messages
203
+ *
204
+ * Automatically scrolls to the bottom when children change,
205
+ * keeping the most recent messages visible.
206
+ *
207
+ * @example
208
+ * ```tsx
209
+ * <ConversationContent aria-live="polite">
210
+ * {messages.map(msg => <Message key={msg.id} {...msg} />)}
211
+ * </ConversationContent>
212
+ * ```
213
+ */
214
+ declare function ConversationContent({
215
+ className,
216
+ children,
217
+ ...props
218
+ }: ConversationContentProps): react_jsx_runtime0.JSX.Element;
219
+ type ConversationEmptyStateProps = ComponentProps<"div"> & {
220
+ /** Title text for the empty state */title?: string; /** Description text for the empty state */
221
+ description?: string; /** Icon to display above the title */
222
+ icon?: ReactNode;
223
+ };
224
+ /**
225
+ * Empty state placeholder shown when there are no messages
226
+ *
227
+ * @example
228
+ * ```tsx
229
+ * <ConversationEmptyState
230
+ * icon={<MessageSquare className="size-12" />}
231
+ * title="Start a conversation"
232
+ * description="Ask me anything about your tasks"
233
+ * />
234
+ * ```
235
+ */
236
+ declare function ConversationEmptyState({
237
+ className,
238
+ title,
239
+ description,
240
+ icon,
241
+ children,
242
+ ...props
243
+ }: ConversationEmptyStateProps): react_jsx_runtime0.JSX.Element;
244
+ type ConversationScrollButtonProps = ComponentProps<"button">;
245
+ /**
246
+ * Button to scroll to the bottom of the conversation
247
+ *
248
+ * @example
249
+ * ```tsx
250
+ * <ConversationScrollButton onClick={scrollToBottom}>
251
+ * <ArrowDownIcon />
252
+ * </ConversationScrollButton>
253
+ * ```
254
+ */
255
+ declare function ConversationScrollButton({
256
+ className,
257
+ ...props
258
+ }: ConversationScrollButtonProps): null;
259
+ //#endregion
260
+ //#region src/assistant/components/dynamic-action-modal.d.ts
261
+ interface DynamicActionModalProps {
262
+ /** The button that was clicked */
263
+ button: DynamicButton | null;
264
+ /** Available action definitions (to check for required options) */
265
+ availableActions?: ActionDefinition[];
266
+ /** Called when actions should be executed */
267
+ onExecute: (actions: ToolAction[]) => void;
268
+ /** Called when modal should close */
269
+ onClose: () => void;
270
+ }
271
+ /**
272
+ * Modal that handles button click flows:
273
+ * 1. If actions need input, render form fields
274
+ * 2. If actions need approval, show confirmation
275
+ * 3. Execute actions when complete
276
+ */
277
+ declare function DynamicActionModal({
278
+ button,
279
+ availableActions,
280
+ onExecute,
281
+ onClose
282
+ }: DynamicActionModalProps): react_jsx_runtime0.JSX.Element | null;
283
+ //#endregion
284
+ //#region src/assistant/components/dynamic-ui.d.ts
285
+ interface DynamicUIProps {
286
+ /** Additional CSS class names */
287
+ className?: string;
288
+ }
289
+ /**
290
+ * DynamicUI component that renders persistent action buttons
291
+ *
292
+ * This component:
293
+ * - Renders within AssistantProvider context
294
+ * - Displays buttons that trigger arrays of actions
295
+ * - Shows input modal when actions require data collection
296
+ * - Shows approval modal when actions have approvalRequired: true
297
+ * - Persists button configuration to localStorage
298
+ *
299
+ * The AI can add/remove/update buttons via the manageDynamicUI tool.
300
+ *
301
+ * @example
302
+ * ```tsx
303
+ * import { AssistantProvider, DynamicUI } from "modifywithai"
304
+ *
305
+ * function App() {
306
+ * return (
307
+ * <AssistantProvider
308
+ * endUserId="user-123"
309
+ * availableActions={MY_ACTIONS}
310
+ * onAction={handleAction}
311
+ * >
312
+ * <DynamicUI className="my-quick-actions" />
313
+ * <MainContent />
314
+ * <AssistantChat />
315
+ * </AssistantProvider>
316
+ * )
317
+ * }
318
+ * ```
319
+ */
320
+ declare function DynamicUI({
321
+ className
322
+ }: DynamicUIProps): react_jsx_runtime0.JSX.Element | null;
323
+ //#endregion
324
+ //#region src/assistant/components/dynamic-ui-components.d.ts
325
+ /**
326
+ * Renderer for DynamicButton elements
327
+ *
328
+ * Renders a button that triggers its configured actions when clicked.
329
+ * Uses the onAction callback to handle action execution.
330
+ */
331
+ declare function DynamicButtonRenderer({
332
+ element,
333
+ onAction
334
+ }: ComponentRenderProps<DynamicButton>): react_jsx_runtime0.JSX.Element | null;
335
+ /**
336
+ * Renderer for DynamicButtonGroup elements
337
+ *
338
+ * Renders a container for organizing buttons.
339
+ * When no label is set (e.g., root group), renders children directly without wrapper.
340
+ */
341
+ declare function DynamicButtonGroupRenderer({
342
+ element,
343
+ children
344
+ }: ComponentRenderProps<DynamicButtonGroup>): react_jsx_runtime0.JSX.Element;
345
+ /**
346
+ * Component registry for DynamicUI rendering
347
+ */
348
+ declare const dynamicUIRegistry: ComponentRegistry;
349
+ //#endregion
350
+ //#region src/assistant/components/form-components.d.ts
351
+ /**
352
+ * Form component - renders a card container with children and submit button
353
+ *
354
+ * Props:
355
+ * - id: Form identifier (used in submit/cancel callbacks)
356
+ * - title: Optional title displayed in header
357
+ * - submitLabel: Label for submit button (default: "Submit")
358
+ */
359
+ declare function FormRenderer({
360
+ element,
361
+ children,
362
+ onAction
363
+ }: ComponentRenderProps<{
364
+ id: string;
365
+ title?: string;
366
+ submitLabel?: string;
367
+ }>): react_jsx_runtime0.JSX.Element;
368
+ /**
369
+ * TextField component - renders a labeled input field
370
+ *
371
+ * Props:
372
+ * - name: Input name attribute
373
+ * - label: Label text
374
+ * - placeholder: Placeholder text
375
+ * - required: Whether field is required
376
+ * - defaultValue: Initial value
377
+ */
378
+ declare function TextFieldRenderer({
379
+ element
380
+ }: ComponentRenderProps<{
381
+ name: string;
382
+ label: string;
383
+ placeholder?: string;
384
+ required?: boolean;
385
+ defaultValue?: string;
386
+ }>): react_jsx_runtime0.JSX.Element;
387
+ /**
388
+ * TextArea component - renders a labeled textarea for longer text
389
+ *
390
+ * Props:
391
+ * - name: Input name attribute
392
+ * - label: Label text
393
+ * - placeholder: Placeholder text
394
+ * - required: Whether field is required
395
+ * - defaultValue: Initial value
396
+ * - rows: Number of rows (default: 3)
397
+ */
398
+ declare function TextAreaRenderer({
399
+ element
400
+ }: ComponentRenderProps<{
401
+ name: string;
402
+ label: string;
403
+ placeholder?: string;
404
+ required?: boolean;
405
+ defaultValue?: string;
406
+ rows?: number;
407
+ }>): react_jsx_runtime0.JSX.Element;
408
+ /**
409
+ * DateField component - renders a labeled date input
410
+ *
411
+ * Props:
412
+ * - name: Input name attribute
413
+ * - label: Label text
414
+ * - required: Whether field is required
415
+ * - defaultValue: Initial value (ISO format)
416
+ * - min: Minimum date (ISO format)
417
+ * - max: Maximum date (ISO format)
418
+ */
419
+ declare function DateFieldRenderer({
420
+ element
421
+ }: ComponentRenderProps<{
422
+ name: string;
423
+ label: string;
424
+ required?: boolean;
425
+ defaultValue?: string;
426
+ min?: string;
427
+ max?: string;
428
+ }>): react_jsx_runtime0.JSX.Element;
429
+ /**
430
+ * Default component registry for form rendering
431
+ *
432
+ * Available components:
433
+ * - Form: Container with submit/cancel buttons
434
+ * - TextField: Text input with label
435
+ * - TextArea: Multi-line text input
436
+ * - DateField: Date picker input
437
+ *
438
+ * @example Extending the registry
439
+ * ```tsx
440
+ * import { defaultFormRegistry } from "modifywithai"
441
+ *
442
+ * const myRegistry = {
443
+ * ...defaultFormRegistry,
444
+ * CustomField: MyCustomFieldComponent,
445
+ * }
446
+ * ```
447
+ */
448
+ declare const defaultFormRegistry: ComponentRegistry;
449
+ //#endregion
450
+ //#region src/assistant/components/form-renderer.d.ts
451
+ interface AssistantFormRendererProps {
452
+ /** The UI tree to render (from renderUI tool output) */
453
+ ui: UITree;
454
+ /** Optional context data to pass to the form */
455
+ context?: Record<string, unknown>;
456
+ /** Called when form is submitted with formId and data */
457
+ onSubmit: (formId: string, data: Record<string, string>) => void;
458
+ /** Called when form is cancelled */
459
+ onCancel?: (formId: string) => void;
460
+ /** Custom component registry (defaults to defaultFormRegistry) */
461
+ registry?: ComponentRegistry;
462
+ }
463
+ /**
464
+ * Renders AI-generated forms from the renderUI tool output
465
+ *
466
+ * Wraps json-render's Renderer with a form component registry
467
+ * and handles form submission/cancellation.
468
+ *
469
+ * @example Basic usage
470
+ * ```tsx
471
+ * <AssistantFormRenderer
472
+ * ui={output.ui}
473
+ * context={output.context}
474
+ * onSubmit={(formId, data) => {
475
+ * sendMessage({ text: `[Form:${formId}] ${JSON.stringify(data)}` })
476
+ * }}
477
+ * onCancel={(formId) => {
478
+ * sendMessage({ text: `[Form:${formId}] cancelled` })
479
+ * }}
480
+ * />
481
+ * ```
482
+ *
483
+ * @example With custom registry
484
+ * ```tsx
485
+ * import { defaultFormRegistry } from "modifywithai"
486
+ *
487
+ * <AssistantFormRenderer
488
+ * ui={output.ui}
489
+ * onSubmit={handleSubmit}
490
+ * registry={{
491
+ * ...defaultFormRegistry,
492
+ * CustomField: MyCustomFieldComponent,
493
+ * }}
494
+ * />
495
+ * ```
496
+ */
497
+ declare function AssistantFormRenderer({
498
+ ui,
499
+ context,
500
+ onSubmit,
501
+ onCancel,
502
+ registry
503
+ }: AssistantFormRendererProps): react_jsx_runtime0.JSX.Element;
504
+ //#endregion
505
+ //#region src/assistant/components/message.d.ts
506
+ type MessageProps = HTMLAttributes<HTMLDivElement> & {
507
+ /** The role of the message sender */from: UIMessage["role"];
508
+ };
509
+ /**
510
+ * Container for a single chat message
511
+ *
512
+ * Automatically styles user messages on the right and assistant messages on the left.
513
+ * Uses CSS class `.is-user` and `.is-assistant` for easy customization.
514
+ *
515
+ * @example
516
+ * ```tsx
517
+ * <Message from="user">
518
+ * <MessageContent>Hello!</MessageContent>
519
+ * </Message>
520
+ *
521
+ * <Message from="assistant">
522
+ * <MessageContent>
523
+ * <MessageResponse>{response.text}</MessageResponse>
524
+ * </MessageContent>
525
+ * </Message>
526
+ * ```
527
+ */
528
+ declare function Message({
529
+ className,
530
+ from,
531
+ ...props
532
+ }: MessageProps): react_jsx_runtime0.JSX.Element;
533
+ type MessageContentProps = HTMLAttributes<HTMLDivElement>;
534
+ /**
535
+ * Content wrapper for message text/elements
536
+ *
537
+ * Provides styling context for user vs assistant messages.
538
+ * User messages get a background and rounded corners.
539
+ *
540
+ * @example
541
+ * ```tsx
542
+ * <MessageContent>
543
+ * {part.type === "text" ? (
544
+ * <MessageResponse>{part.text}</MessageResponse>
545
+ * ) : null}
546
+ * </MessageContent>
547
+ * ```
548
+ */
549
+ declare function MessageContent({
550
+ children,
551
+ className,
552
+ ...props
553
+ }: MessageContentProps): react_jsx_runtime0.JSX.Element;
554
+ type MessageResponseProps = ComponentProps<typeof Streamdown>;
555
+ /**
556
+ * Renders markdown content from the assistant using Streamdown
557
+ *
558
+ * Memoized for performance - only re-renders when children change.
559
+ * Supports streaming markdown content with proper rendering.
560
+ *
561
+ * @example
562
+ * ```tsx
563
+ * <MessageResponse>
564
+ * {message.text}
565
+ * </MessageResponse>
566
+ * ```
567
+ */
568
+ declare const MessageResponse: React$1.MemoExoticComponent<(props: MessageResponseProps) => React$1.JSX.Element>;
569
+ //#endregion
570
+ //#region src/assistant/components/primitives/collapsible.d.ts
571
+ /**
572
+ * Root collapsible component
573
+ *
574
+ * @example
575
+ * ```tsx
576
+ * <Collapsible defaultOpen={true}>
577
+ * <CollapsibleTrigger>Toggle</CollapsibleTrigger>
578
+ * <CollapsibleContent>
579
+ * Content that can be shown/hidden
580
+ * </CollapsibleContent>
581
+ * </Collapsible>
582
+ * ```
583
+ */
584
+ declare function Collapsible({
585
+ ...props
586
+ }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): react_jsx_runtime0.JSX.Element;
587
+ /**
588
+ * Trigger element that toggles the collapsible content
589
+ */
590
+ declare function CollapsibleTrigger({
591
+ ...props
592
+ }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): react_jsx_runtime0.JSX.Element;
593
+ /**
594
+ * Content that is shown/hidden based on the collapsible state
595
+ *
596
+ * Uses data-[state=open] and data-[state=closed] for styling animations
597
+ */
598
+ declare function CollapsibleContent({
599
+ ...props
600
+ }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): react_jsx_runtime0.JSX.Element;
601
+ //#endregion
602
+ //#region src/assistant/components/primitives/drawer.d.ts
603
+ /**
604
+ * Root drawer component
605
+ *
606
+ * @example
607
+ * ```tsx
608
+ * <Drawer>
609
+ * <DrawerTrigger>Open</DrawerTrigger>
610
+ * <DrawerContent>
611
+ * <DrawerHeader>
612
+ * <DrawerTitle>Drawer Title</DrawerTitle>
613
+ * <DrawerDescription>Optional description</DrawerDescription>
614
+ * </DrawerHeader>
615
+ * <div>Content here</div>
616
+ * <DrawerFooter>
617
+ * <DrawerClose>Close</DrawerClose>
618
+ * </DrawerFooter>
619
+ * </DrawerContent>
620
+ * </Drawer>
621
+ * ```
622
+ */
623
+ declare function Drawer$1({
624
+ ...props
625
+ }: React$2.ComponentProps<typeof Drawer.Root>): react_jsx_runtime0.JSX.Element;
626
+ /**
627
+ * Trigger element that opens the drawer
628
+ */
629
+ declare function DrawerTrigger({
630
+ ...props
631
+ }: React$2.ComponentProps<typeof Drawer.Trigger>): react_jsx_runtime0.JSX.Element;
632
+ /**
633
+ * Portal for rendering drawer content outside the DOM hierarchy
634
+ */
635
+ declare function DrawerPortal({
636
+ ...props
637
+ }: React$2.ComponentProps<typeof Drawer.Portal>): react_jsx_runtime0.JSX.Element;
638
+ /**
639
+ * Close button element for the drawer
640
+ */
641
+ declare function DrawerClose({
642
+ ...props
643
+ }: React$2.ComponentProps<typeof Drawer.Close>): react_jsx_runtime0.JSX.Element;
644
+ /**
645
+ * Overlay backdrop for the drawer
646
+ */
647
+ declare function DrawerOverlay({
648
+ className,
649
+ ...props
650
+ }: React$2.ComponentProps<typeof Drawer.Overlay>): react_jsx_runtime0.JSX.Element;
651
+ interface DrawerContentProps extends React$2.ComponentProps<typeof Drawer.Content> {
652
+ /** Whether to render the overlay (default: true) */
653
+ overlay?: boolean;
654
+ }
655
+ /**
656
+ * Content container for the drawer
657
+ *
658
+ * Supports multiple directions via the `direction` prop on the root Drawer:
659
+ * - bottom: Slides up from the bottom
660
+ * - top: Slides down from the top
661
+ * - left: Slides in from the left
662
+ * - right: Slides in from the right
663
+ */
664
+ declare function DrawerContent({
665
+ className,
666
+ children,
667
+ overlay,
668
+ ...props
669
+ }: DrawerContentProps): react_jsx_runtime0.JSX.Element;
670
+ /**
671
+ * Header section for the drawer
672
+ */
673
+ declare function DrawerHeader({
674
+ className,
675
+ ...props
676
+ }: React$2.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
677
+ /**
678
+ * Footer section for the drawer
679
+ */
680
+ declare function DrawerFooter({
681
+ className,
682
+ ...props
683
+ }: React$2.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
684
+ /**
685
+ * Title element for the drawer
686
+ */
687
+ declare function DrawerTitle({
688
+ className,
689
+ ...props
690
+ }: React$2.ComponentProps<typeof Drawer.Title>): react_jsx_runtime0.JSX.Element;
691
+ /**
692
+ * Description element for the drawer
693
+ */
694
+ declare function DrawerDescription({
695
+ className,
696
+ ...props
697
+ }: React$2.ComponentProps<typeof Drawer.Description>): react_jsx_runtime0.JSX.Element;
698
+ //#endregion
699
+ //#region src/assistant/components/prompt-input.d.ts
700
+ type PromptInputMessage = {
701
+ text: string;
702
+ };
703
+ type PromptInputProps = Omit<HTMLAttributes<HTMLFormElement>, "onSubmit"> & {
704
+ /** Called when the form is submitted with the message text */onSubmit: (message: PromptInputMessage, event: FormEvent<HTMLFormElement>) => void | Promise<void>;
705
+ };
706
+ /**
707
+ * Form wrapper for the chat prompt input
708
+ *
709
+ * Handles form submission and extracts the message text from a textarea with name="message".
710
+ *
711
+ * @example
712
+ * ```tsx
713
+ * <PromptInput onSubmit={({ text }) => sendMessage(text)}>
714
+ * <PromptInputTextarea placeholder="Ask me anything..." />
715
+ * <PromptInputFooter>
716
+ * <PromptInputSubmit status={status} />
717
+ * </PromptInputFooter>
718
+ * </PromptInput>
719
+ * ```
720
+ */
721
+ declare function PromptInput({
722
+ className,
723
+ onSubmit,
724
+ children,
725
+ ...props
726
+ }: PromptInputProps): react_jsx_runtime0.JSX.Element;
727
+ type PromptInputTextareaProps = ComponentProps<"textarea">;
728
+ /**
729
+ * Textarea for entering the chat prompt
730
+ *
731
+ * - Press Enter to submit (Shift+Enter for new line)
732
+ * - Handles IME composition for international text input
733
+ * - Auto-resizes based on content
734
+ *
735
+ * @example
736
+ * ```tsx
737
+ * <PromptInputTextarea
738
+ * value={input}
739
+ * onChange={(e) => setInput(e.target.value)}
740
+ * placeholder="Type your message..."
741
+ * />
742
+ * ```
743
+ */
744
+ declare function PromptInputTextarea({
745
+ onChange,
746
+ className,
747
+ placeholder,
748
+ ...props
749
+ }: PromptInputTextareaProps): react_jsx_runtime0.JSX.Element;
750
+ type PromptInputFooterProps = ComponentProps<"div">;
751
+ /**
752
+ * Footer section for the prompt input (contains buttons)
753
+ *
754
+ * @example
755
+ * ```tsx
756
+ * <PromptInputFooter>
757
+ * <div>Optional left content</div>
758
+ * <PromptInputSubmit status={status} />
759
+ * </PromptInputFooter>
760
+ * ```
761
+ */
762
+ declare function PromptInputFooter({
763
+ className,
764
+ ...props
765
+ }: PromptInputFooterProps): react_jsx_runtime0.JSX.Element;
766
+ type PromptInputButtonProps = ComponentProps<"button">;
767
+ /**
768
+ * Generic button for the prompt input area
769
+ *
770
+ * @example
771
+ * ```tsx
772
+ * <PromptInputButton onClick={handleAttach}>
773
+ * <PaperclipIcon />
774
+ * </PromptInputButton>
775
+ * ```
776
+ */
777
+ declare function PromptInputButton({
778
+ className,
779
+ type,
780
+ children,
781
+ ...props
782
+ }: PromptInputButtonProps): react_jsx_runtime0.JSX.Element;
783
+ type PromptInputSubmitProps = ComponentProps<"button"> & {
784
+ /** Current chat status to show appropriate icon */status?: ChatStatus; /** Custom icon to override the default */
785
+ icon?: ReactNode;
786
+ };
787
+ /**
788
+ * Submit button for the prompt input
789
+ *
790
+ * Shows different icons based on the chat status:
791
+ * - ready/undefined: Send icon (CornerDownLeft)
792
+ * - submitted: Loading spinner
793
+ * - streaming: Stop icon (Square)
794
+ * - error: Error icon (X)
795
+ *
796
+ * @example
797
+ * ```tsx
798
+ * <PromptInputSubmit
799
+ * status={status}
800
+ * disabled={!input.trim() || status === "streaming"}
801
+ * />
802
+ * ```
803
+ */
804
+ declare function PromptInputSubmit({
805
+ className,
806
+ status,
807
+ icon,
808
+ children,
809
+ ...props
810
+ }: PromptInputSubmitProps): react_jsx_runtime0.JSX.Element;
811
+ //#endregion
812
+ //#region src/assistant/components/task.d.ts
813
+ type TaskItemFileProps = ComponentProps<"div">;
814
+ /**
815
+ * File badge within a task item
816
+ *
817
+ * @example
818
+ * ```tsx
819
+ * <TaskItem>
820
+ * Updated <TaskItemFile>config.json</TaskItemFile>
821
+ * </TaskItem>
822
+ * ```
823
+ */
824
+ declare function TaskItemFile({
825
+ children,
826
+ className,
827
+ ...props
828
+ }: TaskItemFileProps): react_jsx_runtime0.JSX.Element;
829
+ type TaskItemProps = ComponentProps<"div">;
830
+ /**
831
+ * Individual task/action item within a Task list
832
+ *
833
+ * @example
834
+ * ```tsx
835
+ * <TaskItem>Add todo: "Buy groceries"</TaskItem>
836
+ * ```
837
+ */
838
+ declare function TaskItem({
839
+ children,
840
+ className,
841
+ ...props
842
+ }: TaskItemProps): react_jsx_runtime0.JSX.Element;
843
+ type TaskProps = ComponentProps<typeof Collapsible>;
844
+ /**
845
+ * Collapsible container for displaying a list of actions/tasks
846
+ *
847
+ * @example
848
+ * ```tsx
849
+ * <Task defaultOpen={true}>
850
+ * <TaskTrigger title="Performing 3 actions" />
851
+ * <TaskContent>
852
+ * <TaskItem>Add todo: "Buy groceries"</TaskItem>
853
+ * <TaskItem>Mark "Call mom" as complete</TaskItem>
854
+ * <TaskItem>Delete "Old task"</TaskItem>
855
+ * </TaskContent>
856
+ * </Task>
857
+ * ```
858
+ */
859
+ declare function Task({
860
+ defaultOpen,
861
+ className,
862
+ ...props
863
+ }: TaskProps): react_jsx_runtime0.JSX.Element;
864
+ type TaskTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
865
+ /** Title text for the task group */title: string; /** Custom icon (defaults to SearchIcon) */
866
+ icon?: ReactNode;
867
+ };
868
+ /**
869
+ * Trigger button to expand/collapse the task list
870
+ *
871
+ * @example
872
+ * ```tsx
873
+ * <TaskTrigger title="Performing 3 actions" />
874
+ *
875
+ * // With custom icon
876
+ * <TaskTrigger title="File changes" icon={<FileIcon />} />
877
+ * ```
878
+ */
879
+ declare function TaskTrigger({
880
+ children,
881
+ className,
882
+ title,
883
+ icon,
884
+ ...props
885
+ }: TaskTriggerProps): react_jsx_runtime0.JSX.Element;
886
+ type TaskContentProps = ComponentProps<typeof CollapsibleContent>;
887
+ /**
888
+ * Collapsible content area containing the task items
889
+ *
890
+ * Includes slide animation when opening/closing.
891
+ */
892
+ declare function TaskContent({
893
+ children,
894
+ className,
895
+ ...props
896
+ }: TaskContentProps): react_jsx_runtime0.JSX.Element;
897
+ //#endregion
898
+ //#region src/assistant/context.d.ts
899
+ /**
900
+ * Context value for the assistant provider
901
+ */
902
+ type AssistantContextValue = UseAssistantReturn & {
903
+ /** The configuration passed to the provider */config: AssistantConfig; /** Callback to execute an action directly */
904
+ onAction?: (action: {
905
+ name: string;
906
+ options?: Record<string, unknown>;
907
+ }) => void;
908
+ };
909
+ interface AssistantProviderProps extends AssistantConfig {
910
+ children: ReactNode;
911
+ /** Function to get fresh context for each request */
912
+ getContext?: () => Record<string, unknown>;
913
+ /** Called when the assistant invokes an action */
914
+ onAction?: (action: {
915
+ name: string;
916
+ options?: Record<string, unknown>;
917
+ }) => void;
918
+ /** Called when an error occurs */
919
+ onError?: (error: Error) => void;
920
+ }
921
+ /**
922
+ * Provider component for assistant context
923
+ *
924
+ * Wraps your application (or a portion of it) to provide assistant
925
+ * functionality through context. Use `useAssistantContext` to access
926
+ * the assistant state and methods.
927
+ *
928
+ * @example Basic usage
929
+ * ```tsx
930
+ * function App() {
931
+ * const [todos, setTodos] = useState([])
932
+ *
933
+ * return (
934
+ * <AssistantProvider
935
+ * endUserId="user-123"
936
+ * availableActions={myActions}
937
+ * getContext={() => ({ todos })}
938
+ * onAction={(action) => handleAction(action)}
939
+ * >
940
+ * <TodoList />
941
+ * <AssistantPanel />
942
+ * </AssistantProvider>
943
+ * )
944
+ * }
945
+ *
946
+ * function AssistantPanel() {
947
+ * const { messages, sendMessage, isReady } = useAssistantContext()
948
+ *
949
+ * if (!isReady) return <div>Connecting...</div>
950
+ *
951
+ * return (
952
+ * <div>
953
+ * {messages.map(msg => <Message key={msg.id} {...msg} />)}
954
+ * <PromptInput onSubmit={sendMessage} />
955
+ * </div>
956
+ * )
957
+ * }
958
+ * ```
959
+ */
960
+ declare function AssistantProvider({
961
+ children,
962
+ tokenEndpoint,
963
+ apiUrl,
964
+ endUserId,
965
+ availableActions,
966
+ getContext,
967
+ onAction,
968
+ onError
969
+ }: AssistantProviderProps): react_jsx_runtime0.JSX.Element;
970
+ /**
971
+ * Hook to access the assistant context
972
+ *
973
+ * Must be used within an AssistantProvider.
974
+ *
975
+ * @example
976
+ * ```tsx
977
+ * function ChatPanel() {
978
+ * const {
979
+ * messages,
980
+ * sendMessage,
981
+ * status,
982
+ * isReady,
983
+ * input,
984
+ * setInput,
985
+ * handleSubmit,
986
+ * } = useAssistantContext()
987
+ *
988
+ * if (!isReady) return <div>Loading...</div>
989
+ *
990
+ * return (
991
+ * <div>
992
+ * {messages.map(msg => <Message key={msg.id} {...msg} />)}
993
+ * <form onSubmit={handleSubmit}>
994
+ * <input value={input} onChange={e => setInput(e.target.value)} />
995
+ * <button type="submit">Send</button>
996
+ * </form>
997
+ * </div>
998
+ * )
999
+ * }
1000
+ * ```
1001
+ */
1002
+ declare function useAssistantContext(): AssistantContextValue;
1003
+ //#endregion
1004
+ //#region src/assistant/hooks/use-assistant.d.ts
1005
+ /**
1006
+ * Main hook for integrating the AI assistant into your application
1007
+ *
1008
+ * Combines token management, chat functionality, and tool execution
1009
+ * into a single, easy-to-use hook.
1010
+ *
1011
+ * @example Basic usage
1012
+ * ```tsx
1013
+ * function MyApp() {
1014
+ * const [todos, setTodos] = useState([])
1015
+ *
1016
+ * const assistant = useAssistant({
1017
+ * endUserId: "user-123",
1018
+ * availableActions: [
1019
+ * { name: "addTodo", description: "Add a new todo" },
1020
+ * { name: "deleteTodo", description: "Delete a todo", approvalRequired: true },
1021
+ * ],
1022
+ * getContext: () => ({ todos }),
1023
+ * onAction: (action) => {
1024
+ * if (action.name === "addTodo") {
1025
+ * setTodos(prev => [...prev, { text: action.options.text }])
1026
+ * }
1027
+ * },
1028
+ * })
1029
+ *
1030
+ * if (!assistant.isReady) {
1031
+ * return <div>Connecting...</div>
1032
+ * }
1033
+ *
1034
+ * return (
1035
+ * <div>
1036
+ * {assistant.messages.map(msg => (
1037
+ * <Message key={msg.id} {...msg} />
1038
+ * ))}
1039
+ * <PromptInput onSubmit={({ text }) => assistant.sendMessage({ text })} />
1040
+ * </div>
1041
+ * )
1042
+ * }
1043
+ * ```
1044
+ *
1045
+ * @example With custom token endpoint and API URL
1046
+ * ```tsx
1047
+ * const assistant = useAssistant({
1048
+ * tokenEndpoint: "/api/custom/token",
1049
+ * apiUrl: "https://custom-api.example.com",
1050
+ * endUserId: "user-123",
1051
+ * availableActions: myActions,
1052
+ * })
1053
+ * ```
1054
+ */
1055
+ declare function useAssistant({
1056
+ tokenEndpoint,
1057
+ apiUrl,
1058
+ endUserId,
1059
+ availableActions,
1060
+ getContext,
1061
+ onAction,
1062
+ onError
1063
+ }: UseAssistantOptions): UseAssistantReturn;
1064
+ //#endregion
1065
+ //#region src/assistant/hooks/use-dynamic-ui.d.ts
1066
+ interface UseDynamicUIOptions {
1067
+ /** Storage key for localStorage persistence */
1068
+ storageKey: string;
1069
+ }
1070
+ /**
1071
+ * Hook for managing DynamicUI state with localStorage persistence
1072
+ *
1073
+ * Provides methods to add, remove, and update buttons and groups
1074
+ * in a tree structure that persists across page reloads.
1075
+ *
1076
+ * @example
1077
+ * ```tsx
1078
+ * const dynamicUI = useDynamicUI({
1079
+ * storageKey: `mwai-dynamic-ui-${endUserId}`,
1080
+ * })
1081
+ *
1082
+ * // Add a button
1083
+ * dynamicUI.addButton({
1084
+ * id: "quick-add",
1085
+ * label: "Quick Add Todo",
1086
+ * actions: [{ name: "addTodo", options: { text: "New todo" } }],
1087
+ * })
1088
+ * ```
1089
+ */
1090
+ declare function useDynamicUI({
1091
+ storageKey
1092
+ }: UseDynamicUIOptions): UseDynamicUIReturn;
1093
+ //#endregion
1094
+ //#region src/assistant/hooks/use-dynamic-ui-tool-execution.d.ts
1095
+ interface UseDynamicUIToolExecutionOptions {
1096
+ /** The messages array from useChat */
1097
+ messages: UIMessage[];
1098
+ /** The dynamicUI instance from useDynamicUI */
1099
+ dynamicUI: UseDynamicUIReturn;
1100
+ }
1101
+ /**
1102
+ * Hook for processing manageDynamicUI tool invocations from assistant messages
1103
+ *
1104
+ * Monitors the messages array for completed tool-manageDynamicUI invocations
1105
+ * and applies the operations to the DynamicUI state.
1106
+ *
1107
+ * @example
1108
+ * ```tsx
1109
+ * function MyAssistant() {
1110
+ * const { messages } = useChat(...)
1111
+ * const dynamicUI = useDynamicUI({ storageKey: "my-app" })
1112
+ *
1113
+ * useDynamicUIToolExecution({
1114
+ * messages,
1115
+ * dynamicUI,
1116
+ * })
1117
+ *
1118
+ * return <DynamicUI tree={dynamicUI.tree} />
1119
+ * }
1120
+ * ```
1121
+ */
1122
+ declare function useDynamicUIToolExecution({
1123
+ messages,
1124
+ dynamicUI
1125
+ }: UseDynamicUIToolExecutionOptions): void;
1126
+ //#endregion
1127
+ //#region src/assistant/hooks/use-token.d.ts
1128
+ /**
1129
+ * Hook for managing assistant authentication tokens
1130
+ *
1131
+ * Handles token fetching, caching, and automatic refresh before expiration.
1132
+ * Use this hook when you need direct control over token management,
1133
+ * or use `useAssistant` which wraps this hook with chat functionality.
1134
+ *
1135
+ * @example
1136
+ * ```tsx
1137
+ * function MyComponent() {
1138
+ * const { token, isLoading, error, fetchToken } = useAssistantToken({
1139
+ * tokenEndpoint: "/api/mwai/token",
1140
+ * endUserId: "user-123",
1141
+ * availableActions: [
1142
+ * { name: "addTodo", description: "Add a new todo" },
1143
+ * ],
1144
+ * autoFetch: true, // Fetch on mount (default)
1145
+ * refreshBuffer: 30000, // Refresh 30s before expiry (default)
1146
+ * })
1147
+ *
1148
+ * if (isLoading) return <div>Loading...</div>
1149
+ * if (error) return <div>Error: {error}</div>
1150
+ * if (!token) return <div>No token</div>
1151
+ *
1152
+ * return <div>Token ready!</div>
1153
+ * }
1154
+ * ```
1155
+ */
1156
+ declare function useAssistantToken({
1157
+ tokenEndpoint,
1158
+ endUserId,
1159
+ availableActions,
1160
+ autoFetch,
1161
+ refreshBuffer
1162
+ }: UseAssistantTokenOptions): UseAssistantTokenReturn;
1163
+ //#endregion
1164
+ //#region src/assistant/hooks/use-tool-execution.d.ts
1165
+ interface UseToolExecutionOptions {
1166
+ /** The messages array from useChat */
1167
+ messages: UIMessage[];
1168
+ /** Callback when an action should be executed */
1169
+ onAction?: (action: ToolAction) => void;
1170
+ }
1171
+ /**
1172
+ * Hook for processing tool invocations from assistant messages
1173
+ *
1174
+ * Monitors the messages array for completed tool-performActions invocations
1175
+ * and calls onAction for each action that should be executed.
1176
+ * Tracks processed tool calls to avoid duplicate executions.
1177
+ *
1178
+ * @example
1179
+ * ```tsx
1180
+ * function MyAssistant() {
1181
+ * const { messages } = useChat(...)
1182
+ *
1183
+ * useToolExecution({
1184
+ * messages,
1185
+ * onAction: (action) => {
1186
+ * switch (action.name) {
1187
+ * case "addTodo":
1188
+ * addTodo(action.options.text)
1189
+ * break
1190
+ * case "deleteTodo":
1191
+ * deleteTodo(action.options.id)
1192
+ * break
1193
+ * }
1194
+ * },
1195
+ * })
1196
+ *
1197
+ * return <ChatUI />
1198
+ * }
1199
+ * ```
1200
+ */
1201
+ declare function useToolExecution({
1202
+ messages,
1203
+ onAction
1204
+ }: UseToolExecutionOptions): void;
1205
+ //#endregion
1206
+ //#region src/assistant/shadow/assistant-root.d.ts
1207
+ interface AssistantRootProps extends HTMLAttributes<HTMLDivElement> {
1208
+ children: ReactNode;
1209
+ /** Override theme. If undefined, inherits from host app's .dark class on documentElement */
1210
+ theme?: "light" | "dark";
1211
+ }
1212
+ /**
1213
+ * Shadow DOM wrapper for assistant components
1214
+ *
1215
+ * Provides complete CSS isolation:
1216
+ * - Package styles don't leak into host app
1217
+ * - Host app styles don't affect assistant components
1218
+ * - No need for users to configure Tailwind to scan the package
1219
+ *
1220
+ * @example
1221
+ * ```tsx
1222
+ * <AssistantRoot className="h-full">
1223
+ * <Conversation>
1224
+ * <ConversationContent>
1225
+ * {messages.map((msg) => (
1226
+ * <Message key={msg.id} from={msg.role}>
1227
+ * <MessageContent>
1228
+ * <MessageResponse>{msg.content}</MessageResponse>
1229
+ * </MessageContent>
1230
+ * </Message>
1231
+ * ))}
1232
+ * </ConversationContent>
1233
+ * </Conversation>
1234
+ * <PromptInput onSubmit={handleSubmit}>
1235
+ * <PromptInputTextarea />
1236
+ * <PromptInputFooter>
1237
+ * <div />
1238
+ * <PromptInputSubmit status={status} />
1239
+ * </PromptInputFooter>
1240
+ * </PromptInput>
1241
+ * </AssistantRoot>
1242
+ * ```
1243
+ */
1244
+ declare function AssistantRoot({
1245
+ children,
1246
+ className,
1247
+ theme,
1248
+ ...props
1249
+ }: AssistantRootProps): react_jsx_runtime0.JSX.Element;
1250
+ //#endregion
1251
+ //#region src/assistant/utils/cn.d.ts
1252
+ /**
1253
+ * Utility function for merging Tailwind CSS classes with clsx
1254
+ *
1255
+ * Combines clsx for conditional class names with tailwind-merge
1256
+ * to properly handle Tailwind CSS class conflicts.
1257
+ *
1258
+ * @example
1259
+ * ```tsx
1260
+ * // Basic usage
1261
+ * cn("px-2 py-1", "px-4") // => "py-1 px-4"
1262
+ *
1263
+ * // With conditionals
1264
+ * cn("base-class", isActive && "active-class", className)
1265
+ *
1266
+ * // With objects
1267
+ * cn("base", { "text-red-500": hasError, "text-green-500": isSuccess })
1268
+ * ```
1269
+ */
1270
+ declare function cn(...inputs: ClassValue[]): string;
1271
+ //#endregion
1272
+ export { MessageContentProps as $, PromptInputFooterProps as A, ConfirmationActions as At, DrawerContentProps as B, AssistantMessages as Bt, TaskProps as C, ConversationScrollButton as Ct, PromptInputButton as D, ConfirmationAcceptedProps as Dt, PromptInput as E, ConfirmationAccepted as Et, PromptInputTextarea as F, ConfirmationRequest as Ft, DrawerPortal as G, DrawerFooter as H, PromptInputTextareaProps as I, ConfirmationRequestProps as It, Collapsible as J, DrawerTitle as K, Drawer$1 as L, ConfirmationTitle as Lt, PromptInputProps as M, ConfirmationProps as Mt, PromptInputSubmit as N, ConfirmationRejected as Nt, PromptInputButtonProps as O, ConfirmationAction as Ot, PromptInputSubmitProps as P, ConfirmationRejectedProps as Pt, MessageContent as Q, DrawerClose as R, ConfirmationTitleProps as Rt, TaskItemProps as S, ConversationProps as St, TaskTriggerProps as T, Confirmation as Tt, DrawerHeader as U, DrawerDescription as V, AssistantMessagesProps as Vt, DrawerOverlay as W, CollapsibleTrigger as X, CollapsibleContent as Y, Message as Z, TaskContent as _, Conversation as _t, useToolExecution as a, DateFieldRenderer as at, TaskItemFile as b, ConversationEmptyState as bt, useDynamicUIToolExecution as c, TextFieldRenderer as ct, useAssistant as d, DynamicButtonRenderer as dt, MessageProps as et, AssistantContextValue as f, dynamicUIRegistry as ft, Task as g, DynamicActionModalProps as gt, useAssistantContext as h, DynamicActionModal as ht, UseToolExecutionOptions as i, AssistantFormRendererProps as it, PromptInputMessage as j, ConfirmationActionsProps as jt, PromptInputFooter as k, ConfirmationActionProps as kt, UseDynamicUIOptions as l, defaultFormRegistry as lt, AssistantProviderProps as m, DynamicUIProps as mt, AssistantRoot as n, MessageResponseProps as nt, useAssistantToken as o, FormRenderer as ot, AssistantProvider as p, DynamicUI as pt, DrawerTrigger as q, AssistantRootProps as r, AssistantFormRenderer as rt, UseDynamicUIToolExecutionOptions as s, TextAreaRenderer as st, cn as t, MessageResponse as tt, useDynamicUI as u, DynamicButtonGroupRenderer as ut, TaskContentProps as v, ConversationContent as vt, TaskTrigger as w, ConversationScrollButtonProps as wt, TaskItemFileProps as x, ConversationEmptyStateProps as xt, TaskItem as y, ConversationContentProps as yt, DrawerContent as z, ToolUIPartApproval as zt };