import type { VNode } from 'vue'; import type { AppConfig } from '@nuxt/schema'; import type { UIDataTypes, UIMessage, UITools, FileUIPart } from 'ai'; import theme from '#build/b24ui/chat-message'; import type { AvatarProps, ButtonProps, IconComponent } from '../types'; import type { ComponentConfig } from '../types/tv'; type ChatMessage = ComponentConfig; /** * @memo: content: deprecated. Use `parts` instead. */ export interface ChatMessageProps extends UIMessage { /** * The element or component this component should render as. * @defaultValue 'article' */ as?: any; /** * @IconComponent */ icon?: IconComponent; avatar?: AvatarProps & { [key: string]: any; }; /** * @defaultValue 'message' */ variant?: ChatMessage['variants']['variant']; /** * @defaultValue 'auto' */ color?: ChatMessage['variants']['color']; /** * @defaultValue 'left' */ side?: ChatMessage['variants']['side']; /** * Display a list of actions under the message. * The `label` will be used in a tooltip. * `{ size: 'sm', color: 'air-secondary-no-accent' }`{lang="ts-type"} */ actions?: (Omit & { onClick?: (e: MouseEvent, message: UIMessage) => void; })[]; /** * Render the message in a compact style. * This is done automatically when used inside a `UChatPalette`{lang="ts-type"}. * @defaultValue false */ compact?: boolean; class?: any; b24ui?: ChatMessage['slots']; } export interface ChatMessageSlots { header?(props: UIMessage): VNode[]; leading?(props: UIMessage & { avatar: ChatMessageProps['avatar']; b24ui: ChatMessage['b24ui']; }): VNode[]; files?(props: Omit, 'parts'> & { parts: FileUIPart[]; }): VNode[]; content?(props: UIMessage & { content?: string; }): VNode[]; actions?(props: UIMessage & { actions: ChatMessageProps['actions']; }): VNode[]; } declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: (__VLS_props: NonNullable>["props"], __VLS_ctx?: __VLS_PrettifyLocal>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable>["expose"], __VLS_setup?: Promise<{ props: import("vue").PublicProps & __VLS_PrettifyLocal> & (typeof globalThis extends { __VLS_PROPS_FALLBACK: infer P; } ? P : {}); expose: (exposed: {}) => void; attrs: any; slots: ChatMessageSlots; emit: {}; }>) => import("vue").VNode & { __ctx?: Awaited; }; type __VLS_PrettifyLocal = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};