import { type Message, type UserMessage, MessageStatus } from '../../../ag-ui/types'; import { RenderMode } from '../../../common'; import { type MessageGroup } from '../../../composables'; import { MessageToolsStatus } from '../../../types/tool'; import { type MessageToolsProps } from '../../message-tools/message-tools.vue'; import type { OnInterruptResume } from '../../../ag-ui/types/interrupt'; import type { IToolBtn, TagSchema } from '../../../types'; import type { UserQuestionAnsweredCardSlots } from '../interrupt-message/user-question/user-question-answered-card.vue'; export type MessageContainerEmits = { (e: 'stopStreaming'): void; }; export type MessageContainerProps = { enableSelection?: boolean; messageGroups: MessageGroup[]; messages: Message[]; messageStatus?: MessageStatus; messageToolsStatus?: MessageToolsStatus; messageToolsTippyOptions?: MessageToolsProps['tippyOptions']; onAgentAction?: AgentActionCallback; onAgentFeedback?: AgentFeedbackCallback; onInterruptResume?: OnInterruptResume; onUserAction?: UserActionCallback; renderMode?: RenderMode; } & { onUserInputConfirm?: (message: Message, content: UserMessage['content'], docSchema: TagSchema) => Promise; onUserShortcutConfirm?: (message: Message, formModel: Record) => Promise; }; /** * Agent 工具操作回调类型 * @param tool - 工具按钮信息 * @param messages - 当前消息组的消息列表(用于 cite 等需要消息内容的操作) */ type AgentActionCallback = (tool: IToolBtn, messages: Message[]) => Promise; /** * Agent 反馈回调类型 * @param tool - 工具按钮信息(like/unlike) * @param messages - 当前消息组的消息列表 * @param reasonList - 选择的反馈原因列表 * @param otherReason - 其他原因(自定义输入) */ type AgentFeedbackCallback = (tool: IToolBtn, messages: Message[], reasonList: string[], otherReason: string) => void; /** * User 工具操作回调类型 * @param tool - 工具按钮信息 * @param message - 当前用户消息(用于 delete 等需要消息信息的操作) */ type UserActionCallback = (tool: IToolBtn, message: Message) => Promise; type __VLS_Props = MessageContainerProps; type __VLS_Slots = { answeredQuestion: UserQuestionAnsweredCardSlots['answer']; default: (props: { message: Message; messageToolsStatus?: MessageToolsStatus; onInterruptResume?: OnInterruptResume; }) => unknown; group: (props: { group: MessageGroup; }) => unknown; }; type __VLS_ModelProps = { 'selectedUserMessages'?: Message[]; }; type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps; declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "update:selectedUserMessages": (value: Message[] | undefined) => any; } & { stopStreaming: () => any; }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{ onStopStreaming?: (() => any) | undefined; "onUpdate:selectedUserMessages"?: ((value: Message[] | undefined) => any) | undefined; }>, { enableSelection: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>; declare const __VLS_export: __VLS_WithSlots; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots = T & { new (): { $slots: S; }; };