rdesign/frontend/node_modules/@copilotkitnext/react/dist/components/chat/CopilotChatView.d.mts

88 lines
3.1 KiB
TypeScript

import { SlotValue, WithSlots } from "../../lib/slots.mjs";
import { CopilotChatInput, CopilotChatInputMode } from "./CopilotChatInput.mjs";
import { CopilotChatSuggestionView } from "./CopilotChatSuggestionView.mjs";
import { CopilotChatMessageView } from "./CopilotChatMessageView.mjs";
import React from "react";
import * as react_jsx_runtime0 from "react/jsx-runtime";
import { Suggestion } from "@copilotkitnext/core";
import { Message } from "@ag-ui/core";
//#region src/components/chat/CopilotChatView.d.ts
type WelcomeScreenProps = WithSlots<{
welcomeMessage: React.FC<React.HTMLAttributes<HTMLDivElement>>;
}, {
input: React.ReactElement;
suggestionView: React.ReactElement;
} & React.HTMLAttributes<HTMLDivElement>>;
type CopilotChatViewProps = WithSlots<{
messageView: typeof CopilotChatMessageView;
scrollView: typeof CopilotChatView.ScrollView;
input: typeof CopilotChatInput;
suggestionView: typeof CopilotChatSuggestionView;
}, {
messages?: Message[];
autoScroll?: boolean;
isRunning?: boolean;
suggestions?: Suggestion[];
suggestionLoadingIndexes?: ReadonlyArray<number>;
onSelectSuggestion?: (suggestion: Suggestion, index: number) => void;
welcomeScreen?: SlotValue<React.FC<WelcomeScreenProps>> | boolean;
onSubmitMessage?: (value: string) => void;
onStop?: () => void;
inputMode?: CopilotChatInputMode;
inputValue?: string;
onInputChange?: (value: string) => void;
onStartTranscribe?: () => void;
onCancelTranscribe?: () => void;
onFinishTranscribe?: () => void;
onFinishTranscribeWithAudio?: (audioBlob: Blob) => Promise<void>;
/**
* @deprecated Use the `input` slot's `disclaimer` prop instead:
* ```tsx
* <CopilotChat input={{ disclaimer: MyDisclaimer }} />
* ```
*/
disclaimer?: SlotValue<React.FC<React.HTMLAttributes<HTMLDivElement>>>;
} & React.HTMLAttributes<HTMLDivElement>>;
declare function CopilotChatView({
messageView,
input,
scrollView,
suggestionView,
welcomeScreen,
messages,
autoScroll,
isRunning,
suggestions,
suggestionLoadingIndexes,
onSelectSuggestion,
onSubmitMessage,
onStop,
inputMode,
inputValue,
onInputChange,
onStartTranscribe,
onCancelTranscribe,
onFinishTranscribe,
onFinishTranscribeWithAudio,
disclaimer,
children,
className,
...props
}: CopilotChatViewProps): react_jsx_runtime0.JSX.Element;
declare namespace CopilotChatView {
const ScrollView: React.FC<React.HTMLAttributes<HTMLDivElement> & {
autoScroll?: boolean;
scrollToBottomButton?: SlotValue<React.FC<React.ButtonHTMLAttributes<HTMLButtonElement>>>;
feather?: SlotValue<React.FC<React.HTMLAttributes<HTMLDivElement>>>;
inputContainerHeight?: number;
isResizing?: boolean;
}>;
const ScrollToBottomButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement>>;
const Feather: React.FC<React.HTMLAttributes<HTMLDivElement>>;
const WelcomeMessage: React.FC<React.HTMLAttributes<HTMLDivElement>>;
const WelcomeScreen: React.FC<WelcomeScreenProps>;
}
//#endregion
export { CopilotChatView, CopilotChatViewProps, WelcomeScreenProps };
//# sourceMappingURL=CopilotChatView.d.mts.map