37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
import { CopilotChatLabels } from "../../providers/CopilotChatConfigurationProvider.mjs";
|
|
import { SlotValue } from "../../lib/slots.mjs";
|
|
import { CopilotChatView, CopilotChatViewProps } from "./CopilotChatView.mjs";
|
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
import { CopilotKitCoreErrorCode } from "@copilotkitnext/core";
|
|
|
|
//#region src/components/chat/CopilotChat.d.ts
|
|
type CopilotChatProps = Omit<CopilotChatViewProps, "messages" | "isRunning" | "suggestions" | "suggestionLoadingIndexes" | "onSelectSuggestion"> & {
|
|
agentId?: string;
|
|
threadId?: string;
|
|
labels?: Partial<CopilotChatLabels>;
|
|
chatView?: SlotValue<typeof CopilotChatView>;
|
|
/**
|
|
* Error handler scoped to this chat's agent. Fires in addition to the
|
|
* provider-level onError (does not suppress it). Receives only errors
|
|
* whose context.agentId matches this chat's agent.
|
|
*/
|
|
onError?: (event: {
|
|
error: Error;
|
|
code: CopilotKitCoreErrorCode;
|
|
context: Record<string, any>;
|
|
}) => void | Promise<void>;
|
|
};
|
|
declare function CopilotChat({
|
|
agentId,
|
|
threadId,
|
|
labels,
|
|
chatView,
|
|
onError,
|
|
...props
|
|
}: CopilotChatProps): react_jsx_runtime0.JSX.Element;
|
|
declare namespace CopilotChat {
|
|
const View: typeof CopilotChatView;
|
|
}
|
|
//#endregion
|
|
export { CopilotChat, CopilotChatProps };
|
|
//# sourceMappingURL=CopilotChat.d.mts.map
|