import { atom } from 'nanostores'; import type { UPageMessageMetadata } from '~/types/message'; export type SendChatMessageParams = { messageContent: string; files: File[]; metadata?: UPageMessageMetadata; }; export type SendChatMessageFunction = (params: SendChatMessageParams) => Promise; export const sendChatMessageStore = atom(null); export function setSendChatMessage(fn: SendChatMessageFunction) { sendChatMessageStore.set(fn); }