@copilotkitnext/react 0.0.18 → 0.0.19-threads-and-attachements.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode } from 'react';
4
- import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage } from '@ag-ui/core';
4
+ import { AssistantMessage, Message, UserMessage, InputContent, ToolCall, ToolMessage } from '@ag-ui/core';
5
5
  import { Streamdown } from 'streamdown';
6
6
  import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber } from '@copilotkitnext/core';
7
+ import { ThreadMetadata } from '@copilotkitnext/shared';
8
+ export { ThreadMetadata } from '@copilotkitnext/shared';
7
9
  import { z } from 'zod';
8
10
  import * as _lit_labs_react from '@lit-labs/react';
9
- import { WebInspectorElement } from '@copilotkitnext/web-inspector';
10
11
  import { AbstractAgent, Context } from '@ag-ui/client';
11
12
 
12
13
  declare const CopilotChatDefaultLabels: {
@@ -35,6 +36,7 @@ interface CopilotChatConfigurationValue {
35
36
  labels: CopilotChatLabels;
36
37
  agentId: string;
37
38
  threadId: string;
39
+ setThreadId?: (threadId: string) => void;
38
40
  isModalOpen: boolean;
39
41
  setModalOpen: (open: boolean) => void;
40
42
  isModalDefaultOpen: boolean;
@@ -196,26 +198,29 @@ type CopilotChatUserMessageProps = WithSlots<{
196
198
  } & React.HTMLAttributes<HTMLDivElement>>;
197
199
  declare function CopilotChatUserMessage({ message, onEditMessage, branchIndex, numberOfBranches, onSwitchToBranch, additionalToolbarItems, messageRenderer, toolbar, copyButton, editButton, branchNavigation, children, className, ...props }: CopilotChatUserMessageProps): react_jsx_runtime.JSX.Element;
198
200
  declare namespace CopilotChatUserMessage {
199
- const Container: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>>;
200
- const MessageRenderer: React.FC<{
201
+ export const Container: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>>;
202
+ type MessageRendererProps = {
201
203
  content: string;
204
+ contents?: InputContent[];
202
205
  className?: string;
203
- }>;
204
- const Toolbar: React.FC<React.HTMLAttributes<HTMLDivElement>>;
205
- const ToolbarButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
206
+ };
207
+ export const MessageRenderer: React.FC<MessageRendererProps>;
208
+ export const Toolbar: React.FC<React.HTMLAttributes<HTMLDivElement>>;
209
+ export const ToolbarButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
206
210
  title: string;
207
211
  children: React.ReactNode;
208
212
  }>;
209
- const CopyButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
213
+ export const CopyButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & {
210
214
  copied?: boolean;
211
215
  }>;
212
- const EditButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement>>;
213
- const BranchNavigation: React.FC<React.HTMLAttributes<HTMLDivElement> & {
216
+ export const EditButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement>>;
217
+ export const BranchNavigation: React.FC<React.HTMLAttributes<HTMLDivElement> & {
214
218
  currentBranch?: number;
215
219
  numberOfBranches?: number;
216
220
  onSwitchToBranch?: (props: CopilotChatUserMessageOnSwitchToBranchProps) => void;
217
221
  message: UserMessage;
218
222
  }>;
223
+ export { };
219
224
  }
220
225
 
221
226
  interface CopilotChatSuggestionPillProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -286,16 +291,26 @@ type CopilotChatViewProps = WithSlots<{
286
291
  }, {
287
292
  messages?: Message[];
288
293
  autoScroll?: boolean;
294
+ /**
295
+ * Controls scroll behavior:
296
+ * - "smooth": Always smooth scroll
297
+ * - "instant": Always instant scroll
298
+ * - "auto": Instant scroll on mount and thread switches, smooth scroll during generation (default)
299
+ */
300
+ scrollBehavior?: "smooth" | "instant" | "auto";
289
301
  inputProps?: Partial<Omit<CopilotChatInputProps, "children">>;
290
302
  isRunning?: boolean;
303
+ isSwitchingThread?: boolean;
291
304
  suggestions?: Suggestion[];
292
305
  suggestionLoadingIndexes?: ReadonlyArray<number>;
293
306
  onSelectSuggestion?: (suggestion: Suggestion, index: number) => void;
294
307
  } & React__default.HTMLAttributes<HTMLDivElement>>;
295
- declare function CopilotChatView({ messageView, input, scrollView, scrollToBottomButton, feather, inputContainer, disclaimer, suggestionView, messages, autoScroll, inputProps, isRunning, suggestions, suggestionLoadingIndexes, onSelectSuggestion, children, className, ...props }: CopilotChatViewProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
308
+ declare function CopilotChatView({ messageView, input, scrollView, scrollToBottomButton, feather, inputContainer, disclaimer, suggestionView, messages, autoScroll, scrollBehavior, inputProps, isRunning, isSwitchingThread, suggestions, suggestionLoadingIndexes, onSelectSuggestion, children, className, ...props }: CopilotChatViewProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
296
309
  declare namespace CopilotChatView {
297
310
  const ScrollView: React__default.FC<React__default.HTMLAttributes<HTMLDivElement> & {
298
311
  autoScroll?: boolean;
312
+ scrollBehavior?: "smooth" | "instant" | "auto";
313
+ isSwitchingThread?: boolean;
299
314
  scrollToBottomButton?: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
300
315
  inputContainerHeight?: number;
301
316
  isResizing?: boolean;
@@ -334,25 +349,41 @@ declare const CopilotChatToggleButton: React__default.ForwardRefExoticComponent<
334
349
  type HeaderSlots = {
335
350
  titleContent: typeof CopilotModalHeader.Title;
336
351
  closeButton: typeof CopilotModalHeader.CloseButton;
352
+ leftContent: typeof CopilotModalHeader.LeftContent;
337
353
  };
338
354
  type HeaderRestProps = {
339
355
  title?: string;
356
+ onThreadListClick?: () => void;
357
+ showThreadListButton?: boolean;
358
+ onNewThreadClick?: () => void;
359
+ showNewThreadButton?: boolean;
340
360
  } & Omit<React__default.HTMLAttributes<HTMLDivElement>, "children">;
341
361
  type CopilotModalHeaderProps = WithSlots<HeaderSlots, HeaderRestProps>;
342
- declare function CopilotModalHeader({ title, titleContent, closeButton, children, className, ...rest }: CopilotModalHeaderProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
362
+ declare function CopilotModalHeader({ title, titleContent, closeButton, leftContent, onThreadListClick, showThreadListButton, onNewThreadClick, showNewThreadButton, children, className, ...rest }: CopilotModalHeaderProps): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
343
363
  declare namespace CopilotModalHeader {
344
364
  var displayName: string;
345
365
  }
346
366
  declare namespace CopilotModalHeader {
347
367
  const Title: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
348
368
  const CloseButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
369
+ interface LeftContentProps {
370
+ onThreadListClick?: () => void;
371
+ showThreadListButton?: boolean;
372
+ onNewThreadClick?: () => void;
373
+ showNewThreadButton?: boolean;
374
+ className?: string;
375
+ children?: React__default.ReactNode;
376
+ }
377
+ const LeftContent: React__default.FC<LeftContentProps>;
349
378
  }
350
379
 
351
380
  type CopilotSidebarViewProps = CopilotChatViewProps & {
352
381
  header?: SlotValue<typeof CopilotModalHeader>;
353
382
  width?: number | string;
383
+ showThreadListButton?: boolean;
384
+ showNewThreadButton?: boolean;
354
385
  };
355
- declare function CopilotSidebarView({ header, width, ...props }: CopilotSidebarViewProps): react_jsx_runtime.JSX.Element;
386
+ declare function CopilotSidebarView({ header, width, showThreadListButton, showNewThreadButton, ...props }: CopilotSidebarViewProps): react_jsx_runtime.JSX.Element;
356
387
  declare namespace CopilotSidebarView {
357
388
  var displayName: string;
358
389
  }
@@ -362,8 +393,10 @@ type CopilotPopupViewProps = CopilotChatViewProps & {
362
393
  width?: number | string;
363
394
  height?: number | string;
364
395
  clickOutsideToClose?: boolean;
396
+ showThreadListButton?: boolean;
397
+ showNewThreadButton?: boolean;
365
398
  };
366
- declare function CopilotPopupView({ header, width, height, clickOutsideToClose, className, ...restProps }: CopilotPopupViewProps): react_jsx_runtime.JSX.Element;
399
+ declare function CopilotPopupView({ header, width, height, clickOutsideToClose, showThreadListButton, showNewThreadButton, className, ...restProps }: CopilotPopupViewProps): react_jsx_runtime.JSX.Element;
367
400
  declare namespace CopilotPopupView {
368
401
  var displayName: string;
369
402
  }
@@ -372,8 +405,10 @@ type CopilotSidebarProps = Omit<CopilotChatProps, "chatView"> & {
372
405
  header?: CopilotSidebarViewProps["header"];
373
406
  defaultOpen?: boolean;
374
407
  width?: number | string;
408
+ showThreadListButton?: boolean;
409
+ showNewThreadButton?: boolean;
375
410
  };
376
- declare function CopilotSidebar({ header, defaultOpen, width, ...chatProps }: CopilotSidebarProps): react_jsx_runtime.JSX.Element;
411
+ declare function CopilotSidebar({ header, defaultOpen, width, showThreadListButton, showNewThreadButton, ...chatProps }: CopilotSidebarProps): react_jsx_runtime.JSX.Element;
377
412
  declare namespace CopilotSidebar {
378
413
  var displayName: string;
379
414
  }
@@ -384,20 +419,79 @@ type CopilotPopupProps = Omit<CopilotChatProps, "chatView"> & {
384
419
  width?: CopilotPopupViewProps["width"];
385
420
  height?: CopilotPopupViewProps["height"];
386
421
  clickOutsideToClose?: CopilotPopupViewProps["clickOutsideToClose"];
422
+ showThreadListButton?: boolean;
423
+ showNewThreadButton?: boolean;
387
424
  };
388
- declare function CopilotPopup({ header, defaultOpen, width, height, clickOutsideToClose, ...chatProps }: CopilotPopupProps): react_jsx_runtime.JSX.Element;
425
+ declare function CopilotPopup({ header, defaultOpen, width, height, clickOutsideToClose, showThreadListButton, showNewThreadButton, ...chatProps }: CopilotPopupProps): react_jsx_runtime.JSX.Element;
389
426
  declare namespace CopilotPopup {
390
427
  var displayName: string;
391
428
  }
392
429
 
430
+ interface CopilotThreadListProps {
431
+ /**
432
+ * Number of threads to load initially
433
+ */
434
+ limit?: number;
435
+ /**
436
+ * Callback when a thread is selected
437
+ */
438
+ onThreadSelect?: (threadId: string) => void;
439
+ /**
440
+ * Custom className for the container
441
+ */
442
+ className?: string;
443
+ /**
444
+ * Slot for customizing thread items
445
+ */
446
+ threadItem?: SlotValue<typeof ThreadListItem>;
447
+ /**
448
+ * Slot for customizing the new thread button
449
+ */
450
+ newThreadButton?: SlotValue<typeof NewThreadButton>;
451
+ /**
452
+ * Slot for customizing the container
453
+ */
454
+ container?: SlotValue<typeof Container>;
455
+ /**
456
+ * Interval in milliseconds for auto-refreshing threads when a thread is running or unnamed.
457
+ * @default 2000
458
+ */
459
+ refreshInterval?: number;
460
+ /**
461
+ * Disable automatic polling/refresh of threads.
462
+ * Use this when you have external invalidation mechanisms (e.g., React Query, SWR).
463
+ * @default false
464
+ */
465
+ disableAutoRefresh?: boolean;
466
+ }
467
+ declare const Container: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
468
+ declare const NewThreadButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
469
+ interface ThreadListItemProps {
470
+ thread: ThreadMetadata;
471
+ isActive?: boolean;
472
+ onClick?: () => void;
473
+ onDelete?: () => void;
474
+ }
475
+ declare const ThreadListItem: React__default.FC<ThreadListItemProps>;
476
+ declare function CopilotThreadList(props: CopilotThreadListProps): react_jsx_runtime.JSX.Element;
477
+ declare namespace CopilotThreadList {
478
+ var displayName: string;
479
+ var ThreadItem: React__default.FC<ThreadListItemProps>;
480
+ var NewThreadButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
481
+ var Container: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
482
+ }
483
+
393
484
  declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
394
485
 
395
- declare const CopilotKitInspectorBase: _lit_labs_react.ReactWebComponent<WebInspectorElement, {}>;
486
+ type WebInspectorElementInstance = HTMLElement & {
487
+ core: CopilotKitCore | null;
488
+ };
489
+ declare const CopilotKitInspectorBase: _lit_labs_react.ReactWebComponent<HTMLElement, {}>;
396
490
  type CopilotKitInspectorBaseProps = React$1.ComponentProps<typeof CopilotKitInspectorBase>;
397
491
  interface CopilotKitInspectorProps extends Omit<CopilotKitInspectorBaseProps, "core"> {
398
492
  core?: CopilotKitCore | null;
399
493
  }
400
- declare const CopilotKitInspector: React$1.ForwardRefExoticComponent<Omit<CopilotKitInspectorProps, "ref"> & React$1.RefAttributes<WebInspectorElement>>;
494
+ declare const CopilotKitInspector: React$1.ForwardRefExoticComponent<Omit<CopilotKitInspectorProps, "ref"> & React$1.RefAttributes<WebInspectorElementInstance>>;
401
495
 
402
496
  interface UseRenderToolCallProps {
403
497
  toolCall: ToolCall;
@@ -527,6 +621,62 @@ interface UseConfigureSuggestionsOptions {
527
621
  }
528
622
  declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, options?: UseConfigureSuggestionsOptions): void;
529
623
 
624
+ interface UseThreadsOptions {
625
+ limit?: number;
626
+ autoFetch?: boolean;
627
+ }
628
+ interface UseThreadsResult {
629
+ threads: ThreadMetadata[];
630
+ total: number;
631
+ isLoading: boolean;
632
+ error: Error | null;
633
+ fetchThreads: (offset?: number) => Promise<void>;
634
+ getThreadMetadata: (threadId: string) => Promise<ThreadMetadata | null>;
635
+ refresh: () => Promise<void>;
636
+ addOptimisticThread: (threadId: string) => void;
637
+ deleteThread: (threadId: string) => Promise<void>;
638
+ currentThreadId?: string;
639
+ }
640
+ /**
641
+ * Hook for managing and retrieving threads from the CopilotKit runtime.
642
+ *
643
+ * @example
644
+ * ```tsx
645
+ * const { threads, isLoading, fetchThreads } = useThreads({ limit: 20 });
646
+ *
647
+ * // Manually fetch threads
648
+ * await fetchThreads();
649
+ *
650
+ * // Paginate
651
+ * await fetchThreads(20); // offset = 20
652
+ * ```
653
+ */
654
+ declare function useThreads(options?: UseThreadsOptions): UseThreadsResult;
655
+
656
+ /**
657
+ * Hook to programmatically switch threads.
658
+ *
659
+ * This is a simple wrapper around the configuration context's setThreadId.
660
+ * The actual disconnect/connect logic is handled by CopilotChat.
661
+ *
662
+ * @example
663
+ * ```tsx
664
+ * function MyComponent() {
665
+ * const { switchThread, currentThreadId } = useThreadSwitch();
666
+ *
667
+ * return (
668
+ * <button onClick={() => switchThread('new-thread-id')}>
669
+ * Switch Thread
670
+ * </button>
671
+ * );
672
+ * }
673
+ * ```
674
+ */
675
+ declare function useThreadSwitch(): {
676
+ switchThread: (threadId: string) => void;
677
+ currentThreadId: string | undefined;
678
+ };
679
+
530
680
  /**
531
681
  * Helper to define a type-safe tool call renderer entry.
532
682
  * - Accepts a single object whose keys match ReactToolCallRenderer's fields: { name, args, render, agentId? }.
@@ -585,12 +735,39 @@ declare class CopilotKitCoreReact extends CopilotKitCore {
585
735
 
586
736
  interface CopilotKitContextValue {
587
737
  copilotkit: CopilotKitCoreReact;
738
+ /**
739
+ * Set the resource ID(s) dynamically.
740
+ * Use this to update resource scoping when the user switches context (e.g., workspace switcher).
741
+ *
742
+ * @example
743
+ * ```tsx
744
+ * const { setResourceId } = useCopilotKit();
745
+ * setResourceId(newWorkspaceId);
746
+ * ```
747
+ */
748
+ setResourceId: (resourceId: string | string[] | undefined) => void;
588
749
  }
589
750
  interface CopilotKitProviderProps {
590
751
  children: ReactNode;
591
752
  runtimeUrl?: string;
592
753
  headers?: Record<string, string>;
593
754
  properties?: Record<string, unknown>;
755
+ /**
756
+ * Resource ID(s) for thread access control.
757
+ *
758
+ * This value is sent to the server as a hint for thread scoping.
759
+ * The server's `resolveThreadsScope` validates and enforces access control.
760
+ *
761
+ * @example
762
+ * ```tsx
763
+ * // Single resource
764
+ * <CopilotKitProvider resourceId={userId}>
765
+ *
766
+ * // Multiple resources (thread accessible by any of these)
767
+ * <CopilotKitProvider resourceId={[userId, workspaceId]}>
768
+ * ```
769
+ */
770
+ resourceId?: string | string[];
594
771
  agents__unsafe_dev_only?: Record<string, AbstractAgent>;
595
772
  renderToolCalls?: ReactToolCallRenderer<any>[];
596
773
  renderCustomMessages?: ReactCustomMessageRenderer[];
@@ -601,4 +778,4 @@ interface CopilotKitProviderProps {
601
778
  declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
602
779
  declare const useCopilotKit: () => CopilotKitContextValue;
603
780
 
604
- export { AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorBaseProps, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderCustomMessages, useRenderToolCall, useSuggestions };
781
+ export { AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorBaseProps, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, CopilotThreadList, type CopilotThreadListProps, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, type UseThreadsOptions, type UseThreadsResult, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderCustomMessages, useRenderToolCall, useSuggestions, useThreadSwitch, useThreads };