Firefox "Ask AI" feature configuration
Did you know that Firefox and Zen (like Arc, but Firefox-based) have an experimental AI query feature?
When enabled, this feature adds an icon next to selected text (optional) and a context menu item - "Ask AI."
By default, it includes a preset list of query types:
Interestingly, no API token is required - the chat dialog opens in a sidebar, and since it technically operates as another tab, authentication occurs automatically using your existing browser cookies from previous logins. You only need to select a provider.
You can also select localhost as a provider by setting browser.ml.chat.hideLocalhost to false in about:config
How to add custom prompts
- In about:config, create a new parameter with key
browser.ml.chat.prompts.x(replace 'x' with any string, avoid numbers as they're reserved for default prompts) - Set type as
String - Enter JSON in the following format:
{
"label": "Propmpt name",
"value": "Prompt value"
}The page title and selected text will be automatically added as a prefix to the prompt, but are also available as variables: %tabTitle% and %selection|12000% where 12000 represents the character limit