Co-authored-by: Hugo Blom <[email protected]> Co-authored-by: eggfriedrice <[email protected]> Co-authored-by: Jono Kemball <[email protected]> Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
11 lines
429 B
TypeScript
11 lines
429 B
TypeScript
import { createContext, useContext, type MutableRefObject } from "react";
|
|
import type { ChatComposerHandle } from "./components/chat/ChatComposer";
|
|
|
|
export type ComposerHandleRef = MutableRefObject<ChatComposerHandle | null>;
|
|
|
|
export const ComposerHandleContext = createContext<ComposerHandleRef | null>(null);
|
|
|
|
export function useComposerHandleContext(): ComposerHandleRef | null {
|
|
return useContext(ComposerHandleContext);
|
|
}
|