Preparing search index...

    Function useSafeCopilot

    • Safe wrapper for useCopilot hook that handles cases where CopilotProvider is not available

      The try-catch pattern around useCopilot() is intentional for graceful degradation when CopilotProvider is not available. React Compiler treats this as a conditional hook call, but it's a valid error boundary pattern for optional context providers.

      Returns CopilotContextType | null

      Copilot hook data or null if provider is not available