import { createContext, useContext, type MutableRefObject } from "react"; import type { ChatComposerHandle } from "./components/chat/ChatComposer"; export type ComposerHandleRef = MutableRefObject; export const ComposerHandleContext = createContext(null); export function useComposerHandleContext(): ComposerHandleRef | null { return useContext(ComposerHandleContext); }