@duckduckgo/content-scope-scripts
    Preparing search index...

    Interface SubmitChatAction

    interface SubmitChatAction {
        aiTermsAccepted?: boolean;
        chat: string;
        files?: NativePromptFile[];
        images?: { data: string; format: "jpeg" | "png" }[];
        launcherPromoVisible?: boolean;
        mode?: "chat" | "voice-mode" | "image-generation";
        modelId?: string;
        pageContext?: PageContext[];
        reasoningEffort?: string;
        suggestedPromptId?: string;
        target: OpenTarget;
        textPasted?: { content: string }[];
        toolChoice?: ToolId[];
    }
    Index
    aiTermsAccepted?: boolean

    True when the user explicitly accepted Duck.ai's Privacy Policy and Terms of Service with this submission. Native passes it to Duck.ai with the prompt. Omitted otherwise.

    chat: string

    The chat message to submit to Duck.ai

    Files (PDFs in v1) attached via the paperclip menu. Each entry mirrors Duck.ai's NativePromptFile shape so native forwards them through unchanged. Omitted when no files are attached.

    images?: { data: string; format: "jpeg" | "png" }[]

    Images to attach to the chat. Optional - maximum 3 images. Images are resized to 512px max dimension; encoded output is capped at 10MB per image. WebP images are converted to PNG.

    Type Declaration

    • data: string

      Base64-encoded image data (without data URL prefix)

    • format: "jpeg" | "png"

      Image format after processing. Only 'jpeg' or 'png' are sent. JPEG is preserved for .jpg/.jpeg files, all others (including WebP) are converted to PNG.

    launcherPromoVisible?: boolean

    True when the launcherPromo drawer was on screen as the prompt was sent, so native can treat the prompt as passing over it. Omitted otherwise.

    mode?: "chat" | "voice-mode" | "image-generation"

    Duck.ai mode. If omitted, defaults to 'chat'. Use 'voice-mode' for 1-click voice-chat handoff (no chat content needed — Duck.ai routes to the voice flow on mode alone).

    modelId?: string

    The selected AI model identifier. Optional - if not provided, the backend will use the default model.

    pageContext?: PageContext[]

    Page contexts attached from open tabs via the attach-tabs picker. Each entry is the same PageContext shape returned by omnibar_getTabContent and is guaranteed by NTP to carry a tabId so native can attribute attachments back to their source tab. Omitted when no tabs are attached so existing native handlers continue to work unchanged.

    reasoningEffort?: string
    suggestedPromptId?: string

    Fixed catalog ID of the suggested-prompt chip the prompt came from (e.g. 'jobapplication', 'createcomic'), so native can attribute the submission. Omitted for typed prompts.

    target: OpenTarget
    textPasted?: { content: string }[]

    Long text pastes attached as pasted-text parts (see enablePastedText), in attach order. Each entry mirrors Duck.ai's NativePromptTextPasted shape so native forwards them through unchanged. Omitted when there are none.

    Type Declaration

    • content: string

      The pasted text, verbatim.

    toolChoice?: ToolId[]

    Tools to enable for this chat session.