Embedded analytics SDK API
    Preparing search index...

    Type Alias UseMetabotResult

    type UseMetabotResult = {
        cancelRequest: () => void;
        CurrentChart: React_2.ComponentType<MetabotChartProps> | null;
        errorMessages: MetabotErrorMessage[];
        isProcessing: boolean;
        messages: MetabotMessage[];
        resetConversation: () => void;
        retryMessage: (messageId: string) => Promise<void>;
        submitMessage: (message: string) => Promise<void>;
    }
    Index

    Properties

    cancelRequest: () => void

    Cancel the current in-flight request.

    A pre-wired component bound to the latest navigate_to path. null until the agent sends a chart — lets consumers detect presence and render a placeholder or swap panel content only when set.

    {CurrentChart ? <CurrentChart /> : <Placeholder />}
    
    errorMessages: MetabotErrorMessage[]

    Errors are conversation-level, not attached to individual messages.

    isProcessing: boolean

    true from the moment a message is submitted until the response completes — including success, error, or cancellation.

    messages: MetabotMessage[]

    All messages in the conversation. Chart messages include a Chart property.

    resetConversation: () => void

    Clear all messages and start fresh.

    retryMessage: (messageId: string) => Promise<void>

    Rewinds the conversation to the user message preceding messageId and re-submits that prompt. The agent message at messageId and anything after it is dropped.

    submitMessage: (message: string) => Promise<void>

    Submit a new message to the conversation.