import { createContext, useContext, type ReactNode } from "react"; import type { ComposerControlPresentation } from "@/composer/agent-controls/layout"; interface ComposerControlLayoutValue { glyphSize: number; presentation: ComposerControlPresentation; } const DEFAULT_LAYOUT: ComposerControlLayoutValue = { glyphSize: 16, presentation: { showCarets: true, showThinkingLabel: true, showModeLabel: true, aggregateFeatures: false, }, }; const ComposerControlLayoutContext = createContext(DEFAULT_LAYOUT); export function ComposerControlLayoutProvider({ value, children, }: { value: ComposerControlLayoutValue; children: ReactNode; }) { return ( {children} ); } export function useComposerControlLayout(): ComposerControlLayoutValue { return useContext(ComposerControlLayoutContext); }