@copilotkitnext/react 0.0.22 → 0.0.23

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
@@ -262,16 +262,16 @@ type CopilotChatMessageViewProps = Omit<WithSlots<{
262
262
  }, {
263
263
  isRunning?: boolean;
264
264
  messages?: Message[];
265
- } & React.HTMLAttributes<HTMLDivElement>>, "children"> & {
265
+ } & React__default.HTMLAttributes<HTMLDivElement>>, "children"> & {
266
266
  children?: (props: {
267
267
  isRunning: boolean;
268
268
  messages: Message[];
269
- messageElements: React.ReactElement[];
270
- }) => React.ReactElement;
269
+ messageElements: React__default.ReactElement[];
270
+ }) => React__default.ReactElement;
271
271
  };
272
272
  declare function CopilotChatMessageView({ messages, assistantMessage, userMessage, cursor, isRunning, children, className, ...props }: CopilotChatMessageViewProps): react_jsx_runtime.JSX.Element;
273
273
  declare namespace CopilotChatMessageView {
274
- var Cursor: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
274
+ var Cursor: ({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
275
275
  }
276
276
 
277
277
  type CopilotChatViewProps = WithSlots<{
@@ -298,7 +298,7 @@ declare function CopilotChatView({ messageView, input, scrollView, scrollToBotto
298
298
  declare namespace CopilotChatView {
299
299
  const ScrollView: React__default.FC<React__default.HTMLAttributes<HTMLDivElement> & {
300
300
  autoScroll?: boolean;
301
- scrollToBottomButton?: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
301
+ scrollToBottomButton?: SlotValue<React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>>;
302
302
  inputContainerHeight?: number;
303
303
  isResizing?: boolean;
304
304
  }>;
@@ -466,7 +466,7 @@ type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknow
466
466
  render?: ReactToolCallRenderer<T>["render"];
467
467
  };
468
468
 
469
- declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>): void;
469
+ declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>, deps?: ReadonlyArray<unknown>): void;
470
470
 
471
471
  type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
472
472
  render: React__default.ComponentType<{
@@ -493,7 +493,7 @@ type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unkn
493
493
  }>;
494
494
  };
495
495
 
496
- declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>): void;
496
+ declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
497
497
 
498
498
  declare enum UseAgentUpdate {
499
499
  OnMessagesChanged = "OnMessagesChanged",
@@ -526,10 +526,7 @@ type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig, "suggestions">
526
526
  suggestions: StaticSuggestionInput[];
527
527
  };
528
528
  type SuggestionsConfigInput = DynamicSuggestionsConfig | StaticSuggestionsConfigInput;
529
- interface UseConfigureSuggestionsOptions {
530
- deps?: ReadonlyArray<unknown>;
531
- }
532
- declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, options?: UseConfigureSuggestionsOptions): void;
529
+ declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, deps?: ReadonlyArray<unknown>): void;
533
530
 
534
531
  interface ReactActivityMessageRenderer<TActivityContent> {
535
532
  /**
package/dist/index.d.ts CHANGED
@@ -262,16 +262,16 @@ type CopilotChatMessageViewProps = Omit<WithSlots<{
262
262
  }, {
263
263
  isRunning?: boolean;
264
264
  messages?: Message[];
265
- } & React.HTMLAttributes<HTMLDivElement>>, "children"> & {
265
+ } & React__default.HTMLAttributes<HTMLDivElement>>, "children"> & {
266
266
  children?: (props: {
267
267
  isRunning: boolean;
268
268
  messages: Message[];
269
- messageElements: React.ReactElement[];
270
- }) => React.ReactElement;
269
+ messageElements: React__default.ReactElement[];
270
+ }) => React__default.ReactElement;
271
271
  };
272
272
  declare function CopilotChatMessageView({ messages, assistantMessage, userMessage, cursor, isRunning, children, className, ...props }: CopilotChatMessageViewProps): react_jsx_runtime.JSX.Element;
273
273
  declare namespace CopilotChatMessageView {
274
- var Cursor: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
274
+ var Cursor: ({ className, ...props }: React__default.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
275
275
  }
276
276
 
277
277
  type CopilotChatViewProps = WithSlots<{
@@ -298,7 +298,7 @@ declare function CopilotChatView({ messageView, input, scrollView, scrollToBotto
298
298
  declare namespace CopilotChatView {
299
299
  const ScrollView: React__default.FC<React__default.HTMLAttributes<HTMLDivElement> & {
300
300
  autoScroll?: boolean;
301
- scrollToBottomButton?: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
301
+ scrollToBottomButton?: SlotValue<React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>>;
302
302
  inputContainerHeight?: number;
303
303
  isResizing?: boolean;
304
304
  }>;
@@ -466,7 +466,7 @@ type ReactFrontendTool<T extends Record<string, unknown> = Record<string, unknow
466
466
  render?: ReactToolCallRenderer<T>["render"];
467
467
  };
468
468
 
469
- declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>): void;
469
+ declare function useFrontendTool<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactFrontendTool<T>, deps?: ReadonlyArray<unknown>): void;
470
470
 
471
471
  type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>> = Omit<FrontendTool<T>, "handler"> & {
472
472
  render: React__default.ComponentType<{
@@ -493,7 +493,7 @@ type ReactHumanInTheLoop<T extends Record<string, unknown> = Record<string, unkn
493
493
  }>;
494
494
  };
495
495
 
496
- declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>): void;
496
+ declare function useHumanInTheLoop<T extends Record<string, unknown> = Record<string, unknown>>(tool: ReactHumanInTheLoop<T>, deps?: ReadonlyArray<unknown>): void;
497
497
 
498
498
  declare enum UseAgentUpdate {
499
499
  OnMessagesChanged = "OnMessagesChanged",
@@ -526,10 +526,7 @@ type StaticSuggestionsConfigInput = Omit<StaticSuggestionsConfig, "suggestions">
526
526
  suggestions: StaticSuggestionInput[];
527
527
  };
528
528
  type SuggestionsConfigInput = DynamicSuggestionsConfig | StaticSuggestionsConfigInput;
529
- interface UseConfigureSuggestionsOptions {
530
- deps?: ReadonlyArray<unknown>;
531
- }
532
- declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, options?: UseConfigureSuggestionsOptions): void;
529
+ declare function useConfigureSuggestions(config: SuggestionsConfigInput | null | undefined, deps?: ReadonlyArray<unknown>): void;
533
530
 
534
531
  interface ReactActivityMessageRenderer<TActivityContent> {
535
532
  /**