AskSQL API Reference (core v0.10.0)
    Preparing search index...

    Interface AskSqlChatProps

    interface AskSqlChatProps {
        answerSchemaQuestions?: boolean;
        connectionId?: string;
        initialQuestion?: string;
        maxRows?: number;
        nonce?: string;
        onInitialQuestionConsumed?: () => void;
        placeholder?: string;
        requireApproval?: boolean;
        showConnectionPicker?: boolean;
        sqlDisplayPlacement?: "before" | "after";
        styleRoot?: Document | ShadowRoot;
        suggestions?: readonly string[];
        theme?: "light" | "dark" | "auto";
        transport: Transport;
    }

    Hierarchy (View Summary)

    Index
    answerSchemaQuestions?: boolean

    Answer questions that aren't a data query in plain language from the schema. Off by default.

    connectionId?: string
    initialQuestion?: string

    Asked automatically whenever this changes to a new non-empty value, such as a question seeded by a browser extension's "ask about selection". The same value twice in a row asks once; the transcript is preserved either way.

    maxRows?: number

    Row cap sent with every query, so it applies to a sidecar as well as an in-page engine.

    nonce?: string

    CSP nonce for the injected stylesheet (strict-CSP pages).

    onInitialQuestionConsumed?: () => void

    Called when initialQuestion is actually asked, so the host can clear its state (enabling the same text to seed again later).

    placeholder?: string
    requireApproval?: boolean

    Gate every query behind a Run button. Off by default (results auto-run).

    showConnectionPicker?: boolean

    Show a connection picker when the sidecar exposes more than one.

    sqlDisplayPlacement?: "before" | "after"

    Where the SQL block renders relative to results (default 'before'). Forced to 'before' when requireApproval is on - a query can't be approved unseen.

    styleRoot?: Document | ShadowRoot

    Where to inject the stylesheet. Pass the shadow root when rendering into one; defaults to the document.

    suggestions?: readonly string[]
    theme?: "light" | "dark" | "auto"
    transport: Transport