/** * React hooks for the AgentKit. * * These hooks allow advanced usage such as manual element registration, * custom commands, and bridge status monitoring. */ import { useContext, useEffect, useRef } from 'react'; import type { ElementInfo, ElementHandlers } from './types'; import { AgentKitContext } from './AgentKitProvider'; import type { AgentKitContextValue } from './AgentKitProvider'; import { ElementRegistry } from './ElementRegistry'; /** * Access the AgentKit context. * * @example * ```tsx * function MyScreen() { * const { isRunning, elementCount, rescan } = useAgentKit(); * * return ( * * Bridge running: {isRunning ? 'Yes' : 'No'} * Elements: {elementCount} *