@copilotkitnext/react 0.0.13 → 0.0.15
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 +47 -20
- package/dist/index.d.ts +47 -20
- package/dist/index.js +906 -308
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +935 -330
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -10
- package/vitest.config.mjs +5 -0
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ 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
4
|
import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage } from '@ag-ui/core';
|
|
5
|
+
import { Streamdown } from 'streamdown';
|
|
5
6
|
import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber } from '@copilotkitnext/core';
|
|
6
7
|
import { z } from 'zod';
|
|
7
8
|
import * as _lit_labs_react from '@lit-labs/react';
|
|
@@ -78,21 +79,19 @@ type ToolsMenuItem = {
|
|
|
78
79
|
action?: never;
|
|
79
80
|
items: (ToolsMenuItem | "-")[];
|
|
80
81
|
});
|
|
81
|
-
type
|
|
82
|
+
type CopilotChatInputSlots = {
|
|
82
83
|
textArea: typeof CopilotChatInput.TextArea;
|
|
83
84
|
sendButton: typeof CopilotChatInput.SendButton;
|
|
84
85
|
startTranscribeButton: typeof CopilotChatInput.StartTranscribeButton;
|
|
85
86
|
cancelTranscribeButton: typeof CopilotChatInput.CancelTranscribeButton;
|
|
86
87
|
finishTranscribeButton: typeof CopilotChatInput.FinishTranscribeButton;
|
|
87
|
-
|
|
88
|
-
toolsButton: typeof CopilotChatInput.ToolsButton;
|
|
89
|
-
toolbar: typeof CopilotChatInput.Toolbar;
|
|
88
|
+
addMenuButton: typeof CopilotChatInput.AddMenuButton;
|
|
90
89
|
audioRecorder: typeof CopilotChatAudioRecorder;
|
|
91
|
-
}
|
|
90
|
+
};
|
|
91
|
+
type CopilotChatInputRestProps = {
|
|
92
92
|
mode?: CopilotChatInputMode;
|
|
93
93
|
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
94
94
|
autoFocus?: boolean;
|
|
95
|
-
additionalToolbarItems?: React__default.ReactNode;
|
|
96
95
|
onSubmitMessage?: (value: string) => void;
|
|
97
96
|
onStartTranscribe?: () => void;
|
|
98
97
|
onCancelTranscribe?: () => void;
|
|
@@ -100,8 +99,15 @@ type CopilotChatInputProps = WithSlots<{
|
|
|
100
99
|
onAddFile?: () => void;
|
|
101
100
|
value?: string;
|
|
102
101
|
onChange?: (value: string) => void;
|
|
103
|
-
} & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"
|
|
104
|
-
|
|
102
|
+
} & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
103
|
+
type CopilotChatInputBaseProps = WithSlots<CopilotChatInputSlots, CopilotChatInputRestProps>;
|
|
104
|
+
type CopilotChatInputChildrenArgs = CopilotChatInputBaseProps extends {
|
|
105
|
+
children?: infer C;
|
|
106
|
+
} ? C extends (props: infer P) => React__default.ReactNode ? P : never : never;
|
|
107
|
+
type CopilotChatInputProps = Omit<CopilotChatInputBaseProps, "children"> & {
|
|
108
|
+
children?: (props: CopilotChatInputChildrenArgs) => React__default.ReactNode;
|
|
109
|
+
};
|
|
110
|
+
declare function CopilotChatInput({ mode, onSubmitMessage, onStartTranscribe, onCancelTranscribe, onFinishTranscribe, onAddFile, onChange, value, toolsMenu, autoFocus, textArea, sendButton, startTranscribeButton, cancelTranscribeButton, finishTranscribeButton, addMenuButton, audioRecorder, children, className, ...props }: CopilotChatInputProps): react_jsx_runtime.JSX.Element;
|
|
105
111
|
declare namespace CopilotChatInput {
|
|
106
112
|
const SendButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
107
113
|
const ToolbarButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -112,14 +118,11 @@ declare namespace CopilotChatInput {
|
|
|
112
118
|
const StartTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
113
119
|
const CancelTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
114
120
|
const FinishTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
115
|
-
const
|
|
116
|
-
const ToolsButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
121
|
+
const AddMenuButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
117
122
|
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
123
|
+
onAddFile?: () => void;
|
|
118
124
|
}>;
|
|
119
|
-
|
|
120
|
-
interface TextAreaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
121
|
-
maxRows?: number;
|
|
122
|
-
}
|
|
125
|
+
type TextAreaProps = React__default.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
123
126
|
const TextArea: React__default.ForwardRefExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
124
127
|
const AudioRecorder: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<any>>;
|
|
125
128
|
}
|
|
@@ -152,7 +155,7 @@ type CopilotChatAssistantMessageProps = WithSlots<{
|
|
|
152
155
|
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
153
156
|
declare function CopilotChatAssistantMessage({ message, messages, isRunning, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible, markdownRenderer, toolbar, copyButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, toolCallsView, children, className, ...props }: CopilotChatAssistantMessageProps): react_jsx_runtime.JSX.Element;
|
|
154
157
|
declare namespace CopilotChatAssistantMessage {
|
|
155
|
-
const MarkdownRenderer: React.FC<React.
|
|
158
|
+
const MarkdownRenderer: React.FC<Omit<React.ComponentProps<typeof Streamdown>, "children"> & {
|
|
156
159
|
content: string;
|
|
157
160
|
}>;
|
|
158
161
|
const Toolbar: React.FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -299,6 +302,7 @@ declare namespace CopilotChatView {
|
|
|
299
302
|
const Feather: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
|
|
300
303
|
const InputContainer: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & {
|
|
301
304
|
children: React__default.ReactNode;
|
|
305
|
+
keyboardHeight?: number;
|
|
302
306
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
303
307
|
const Disclaimer: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
|
|
304
308
|
}
|
|
@@ -351,6 +355,17 @@ declare namespace CopilotSidebarView {
|
|
|
351
355
|
var displayName: string;
|
|
352
356
|
}
|
|
353
357
|
|
|
358
|
+
type CopilotPopupViewProps = CopilotChatViewProps & {
|
|
359
|
+
header?: SlotValue<typeof CopilotModalHeader>;
|
|
360
|
+
width?: number | string;
|
|
361
|
+
height?: number | string;
|
|
362
|
+
clickOutsideToClose?: boolean;
|
|
363
|
+
};
|
|
364
|
+
declare function CopilotPopupView({ header, width, height, clickOutsideToClose, className, ...restProps }: CopilotPopupViewProps): react_jsx_runtime.JSX.Element;
|
|
365
|
+
declare namespace CopilotPopupView {
|
|
366
|
+
var displayName: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
354
369
|
type CopilotSidebarProps = Omit<CopilotChatProps, "chatView"> & {
|
|
355
370
|
header?: CopilotSidebarViewProps["header"];
|
|
356
371
|
defaultOpen?: boolean;
|
|
@@ -361,14 +376,26 @@ declare namespace CopilotSidebar {
|
|
|
361
376
|
var displayName: string;
|
|
362
377
|
}
|
|
363
378
|
|
|
379
|
+
type CopilotPopupProps = Omit<CopilotChatProps, "chatView"> & {
|
|
380
|
+
header?: CopilotPopupViewProps["header"];
|
|
381
|
+
defaultOpen?: boolean;
|
|
382
|
+
width?: CopilotPopupViewProps["width"];
|
|
383
|
+
height?: CopilotPopupViewProps["height"];
|
|
384
|
+
clickOutsideToClose?: CopilotPopupViewProps["clickOutsideToClose"];
|
|
385
|
+
};
|
|
386
|
+
declare function CopilotPopup({ header, defaultOpen, width, height, clickOutsideToClose, ...chatProps }: CopilotPopupProps): react_jsx_runtime.JSX.Element;
|
|
387
|
+
declare namespace CopilotPopup {
|
|
388
|
+
var displayName: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
364
391
|
declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
|
|
365
392
|
|
|
366
|
-
declare const
|
|
367
|
-
type
|
|
368
|
-
interface
|
|
393
|
+
declare const CopilotKitInspectorBase: _lit_labs_react.ReactWebComponent<WebInspectorElement, {}>;
|
|
394
|
+
type CopilotKitInspectorBaseProps = React$1.ComponentProps<typeof CopilotKitInspectorBase>;
|
|
395
|
+
interface CopilotKitInspectorProps extends Omit<CopilotKitInspectorBaseProps, "core"> {
|
|
369
396
|
core?: CopilotKitCore | null;
|
|
370
397
|
}
|
|
371
|
-
declare const
|
|
398
|
+
declare const CopilotKitInspector: React$1.ForwardRefExoticComponent<Omit<CopilotKitInspectorProps, "ref"> & React$1.RefAttributes<WebInspectorElement>>;
|
|
372
399
|
|
|
373
400
|
interface UseRenderToolCallProps {
|
|
374
401
|
toolCall: ToolCall;
|
|
@@ -572,4 +599,4 @@ interface CopilotKitProviderProps {
|
|
|
572
599
|
declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
|
|
573
600
|
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
574
601
|
|
|
575
|
-
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, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem,
|
|
602
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ 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
4
|
import { AssistantMessage, Message, UserMessage, ToolCall, ToolMessage } from '@ag-ui/core';
|
|
5
|
+
import { Streamdown } from 'streamdown';
|
|
5
6
|
import { Suggestion, CopilotKitCore, ToolCallStatus, FrontendTool, DynamicSuggestionsConfig, StaticSuggestionsConfig, CopilotKitCoreConfig, CopilotKitCoreSubscriber } from '@copilotkitnext/core';
|
|
6
7
|
import { z } from 'zod';
|
|
7
8
|
import * as _lit_labs_react from '@lit-labs/react';
|
|
@@ -78,21 +79,19 @@ type ToolsMenuItem = {
|
|
|
78
79
|
action?: never;
|
|
79
80
|
items: (ToolsMenuItem | "-")[];
|
|
80
81
|
});
|
|
81
|
-
type
|
|
82
|
+
type CopilotChatInputSlots = {
|
|
82
83
|
textArea: typeof CopilotChatInput.TextArea;
|
|
83
84
|
sendButton: typeof CopilotChatInput.SendButton;
|
|
84
85
|
startTranscribeButton: typeof CopilotChatInput.StartTranscribeButton;
|
|
85
86
|
cancelTranscribeButton: typeof CopilotChatInput.CancelTranscribeButton;
|
|
86
87
|
finishTranscribeButton: typeof CopilotChatInput.FinishTranscribeButton;
|
|
87
|
-
|
|
88
|
-
toolsButton: typeof CopilotChatInput.ToolsButton;
|
|
89
|
-
toolbar: typeof CopilotChatInput.Toolbar;
|
|
88
|
+
addMenuButton: typeof CopilotChatInput.AddMenuButton;
|
|
90
89
|
audioRecorder: typeof CopilotChatAudioRecorder;
|
|
91
|
-
}
|
|
90
|
+
};
|
|
91
|
+
type CopilotChatInputRestProps = {
|
|
92
92
|
mode?: CopilotChatInputMode;
|
|
93
93
|
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
94
94
|
autoFocus?: boolean;
|
|
95
|
-
additionalToolbarItems?: React__default.ReactNode;
|
|
96
95
|
onSubmitMessage?: (value: string) => void;
|
|
97
96
|
onStartTranscribe?: () => void;
|
|
98
97
|
onCancelTranscribe?: () => void;
|
|
@@ -100,8 +99,15 @@ type CopilotChatInputProps = WithSlots<{
|
|
|
100
99
|
onAddFile?: () => void;
|
|
101
100
|
value?: string;
|
|
102
101
|
onChange?: (value: string) => void;
|
|
103
|
-
} & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"
|
|
104
|
-
|
|
102
|
+
} & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
103
|
+
type CopilotChatInputBaseProps = WithSlots<CopilotChatInputSlots, CopilotChatInputRestProps>;
|
|
104
|
+
type CopilotChatInputChildrenArgs = CopilotChatInputBaseProps extends {
|
|
105
|
+
children?: infer C;
|
|
106
|
+
} ? C extends (props: infer P) => React__default.ReactNode ? P : never : never;
|
|
107
|
+
type CopilotChatInputProps = Omit<CopilotChatInputBaseProps, "children"> & {
|
|
108
|
+
children?: (props: CopilotChatInputChildrenArgs) => React__default.ReactNode;
|
|
109
|
+
};
|
|
110
|
+
declare function CopilotChatInput({ mode, onSubmitMessage, onStartTranscribe, onCancelTranscribe, onFinishTranscribe, onAddFile, onChange, value, toolsMenu, autoFocus, textArea, sendButton, startTranscribeButton, cancelTranscribeButton, finishTranscribeButton, addMenuButton, audioRecorder, children, className, ...props }: CopilotChatInputProps): react_jsx_runtime.JSX.Element;
|
|
105
111
|
declare namespace CopilotChatInput {
|
|
106
112
|
const SendButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
107
113
|
const ToolbarButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -112,14 +118,11 @@ declare namespace CopilotChatInput {
|
|
|
112
118
|
const StartTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
113
119
|
const CancelTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
114
120
|
const FinishTranscribeButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
115
|
-
const
|
|
116
|
-
const ToolsButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
121
|
+
const AddMenuButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
117
122
|
toolsMenu?: (ToolsMenuItem | "-")[];
|
|
123
|
+
onAddFile?: () => void;
|
|
118
124
|
}>;
|
|
119
|
-
|
|
120
|
-
interface TextAreaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
121
|
-
maxRows?: number;
|
|
122
|
-
}
|
|
125
|
+
type TextAreaProps = React__default.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
123
126
|
const TextArea: React__default.ForwardRefExoticComponent<TextAreaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
124
127
|
const AudioRecorder: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<any>>;
|
|
125
128
|
}
|
|
@@ -152,7 +155,7 @@ type CopilotChatAssistantMessageProps = WithSlots<{
|
|
|
152
155
|
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
153
156
|
declare function CopilotChatAssistantMessage({ message, messages, isRunning, onThumbsUp, onThumbsDown, onReadAloud, onRegenerate, additionalToolbarItems, toolbarVisible, markdownRenderer, toolbar, copyButton, thumbsUpButton, thumbsDownButton, readAloudButton, regenerateButton, toolCallsView, children, className, ...props }: CopilotChatAssistantMessageProps): react_jsx_runtime.JSX.Element;
|
|
154
157
|
declare namespace CopilotChatAssistantMessage {
|
|
155
|
-
const MarkdownRenderer: React.FC<React.
|
|
158
|
+
const MarkdownRenderer: React.FC<Omit<React.ComponentProps<typeof Streamdown>, "children"> & {
|
|
156
159
|
content: string;
|
|
157
160
|
}>;
|
|
158
161
|
const Toolbar: React.FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -299,6 +302,7 @@ declare namespace CopilotChatView {
|
|
|
299
302
|
const Feather: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
|
|
300
303
|
const InputContainer: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & {
|
|
301
304
|
children: React__default.ReactNode;
|
|
305
|
+
keyboardHeight?: number;
|
|
302
306
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
303
307
|
const Disclaimer: React__default.FC<React__default.HTMLAttributes<HTMLDivElement>>;
|
|
304
308
|
}
|
|
@@ -351,6 +355,17 @@ declare namespace CopilotSidebarView {
|
|
|
351
355
|
var displayName: string;
|
|
352
356
|
}
|
|
353
357
|
|
|
358
|
+
type CopilotPopupViewProps = CopilotChatViewProps & {
|
|
359
|
+
header?: SlotValue<typeof CopilotModalHeader>;
|
|
360
|
+
width?: number | string;
|
|
361
|
+
height?: number | string;
|
|
362
|
+
clickOutsideToClose?: boolean;
|
|
363
|
+
};
|
|
364
|
+
declare function CopilotPopupView({ header, width, height, clickOutsideToClose, className, ...restProps }: CopilotPopupViewProps): react_jsx_runtime.JSX.Element;
|
|
365
|
+
declare namespace CopilotPopupView {
|
|
366
|
+
var displayName: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
354
369
|
type CopilotSidebarProps = Omit<CopilotChatProps, "chatView"> & {
|
|
355
370
|
header?: CopilotSidebarViewProps["header"];
|
|
356
371
|
defaultOpen?: boolean;
|
|
@@ -361,14 +376,26 @@ declare namespace CopilotSidebar {
|
|
|
361
376
|
var displayName: string;
|
|
362
377
|
}
|
|
363
378
|
|
|
379
|
+
type CopilotPopupProps = Omit<CopilotChatProps, "chatView"> & {
|
|
380
|
+
header?: CopilotPopupViewProps["header"];
|
|
381
|
+
defaultOpen?: boolean;
|
|
382
|
+
width?: CopilotPopupViewProps["width"];
|
|
383
|
+
height?: CopilotPopupViewProps["height"];
|
|
384
|
+
clickOutsideToClose?: CopilotPopupViewProps["clickOutsideToClose"];
|
|
385
|
+
};
|
|
386
|
+
declare function CopilotPopup({ header, defaultOpen, width, height, clickOutsideToClose, ...chatProps }: CopilotPopupProps): react_jsx_runtime.JSX.Element;
|
|
387
|
+
declare namespace CopilotPopup {
|
|
388
|
+
var displayName: string;
|
|
389
|
+
}
|
|
390
|
+
|
|
364
391
|
declare const WildcardToolCallRender: ReactToolCallRenderer<any>;
|
|
365
392
|
|
|
366
|
-
declare const
|
|
367
|
-
type
|
|
368
|
-
interface
|
|
393
|
+
declare const CopilotKitInspectorBase: _lit_labs_react.ReactWebComponent<WebInspectorElement, {}>;
|
|
394
|
+
type CopilotKitInspectorBaseProps = React$1.ComponentProps<typeof CopilotKitInspectorBase>;
|
|
395
|
+
interface CopilotKitInspectorProps extends Omit<CopilotKitInspectorBaseProps, "core"> {
|
|
369
396
|
core?: CopilotKitCore | null;
|
|
370
397
|
}
|
|
371
|
-
declare const
|
|
398
|
+
declare const CopilotKitInspector: React$1.ForwardRefExoticComponent<Omit<CopilotKitInspectorProps, "ref"> & React$1.RefAttributes<WebInspectorElement>>;
|
|
372
399
|
|
|
373
400
|
interface UseRenderToolCallProps {
|
|
374
401
|
toolCall: ToolCall;
|
|
@@ -572,4 +599,4 @@ interface CopilotKitProviderProps {
|
|
|
572
599
|
declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
|
|
573
600
|
declare const useCopilotKit: () => CopilotKitContextValue;
|
|
574
601
|
|
|
575
|
-
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, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem,
|
|
602
|
+
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 };
|