Files
t3code/apps/web/src/composerHandleContext.ts
T
934037cb66 feat(web): add extensible command palette (#1103)
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]>
2026-04-11 11:02:06 -07:00

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);
}