DuckChat
DuckChat interface provides a set of methods for interacting and controlling DuckChat.
Functions
Returns the Duck Chat URL to be used
Returns whether the chat suggestions feature is available (feature flag is enabled). Does not consider user preference — use for visibility checks.
Determines whether a given Uri is a DuckChat URL. There are two Duck Chat URLs Legacy: https://duckduckgo.com/?q=DuckDuckGo+AI+Chat&ia=chat&duckai=5 After Migration: https://duck.ai/chat?q=DuckDuckGo+AI+Chat&duckai=5&atb=v520-1ru&ko=-1&t=ddg_android&migration=native-import https://app.asana.com/1/137249556945/task/1210497696306780
Observes the value for the automatic context attachment for Contextual Mode
Observes whether the user has enabled chat suggestions.
Observes the cosmetic value for the input screen user setting. Returns null if the cosmetic value has not been set before.
Observes whether Duck.ai input screen with a mode switch is enabled or disabled.
Observes whether the native input field user setting is enabled.
Opens the DuckChat WebView with optional pre-filled String query.
Auto-prompts the DuckChat WebView with the provided String query.
Opens Duck Chat with a prefilled String query.
Set user preference for whether chat suggestions are shown in the input screen.
Cosmetically sets the input screen user setting.
Set user setting to determine whether dedicated Duck.ai input screen with a mode switch should be used.
Displays the new address bar option choice screen.
Returns true if Duck Chat was ever opened before.