| AgentUI.sys.mjs |
@typedef {object} AgentUpdateData
@property {string} messageId - Id of the chat message carrying the agent card
@property {string} toolCallId - Correlation id stamped on the card's toolUIData
@property {string} updateType - One of AGENT_UPDATE_TYPES
@property {object} updateData - Payload from the card's action event
@typedef {object} AgentHandlerContext
@property {object} message - The chat message the card is attached to
@property {object} updateData - The card action payload
@property {object} conversation - The active ChatConversation
@property {ChromeWindow} window - The browser window
@typedef {object} AgentCommandContext
@property {string} [text] - The user's prompt text accompanying the command
@property {string} [contextPageUrl] - Current page URL to seed the agent with
@property {object} conversation - The active ChatConversation
@property {ChromeWindow} [window] - The browser window
@property {boolean} [isFullPage] - True when the smart window is in full page mode
|
24628 |
- |
| AITabConstants.sys.mjs |
The current SQLite database schema version
|
538 |
- |
| AITabMigrations.sys.mjs |
|
238 |
- |
| AITabSql.sys.mjs |
|
3271 |
- |
| AITabStore.sys.mjs |
Simple interface to store and retrieve AITab UI specific data
@augments {SQLiteStoreBase}
|
8157 |
- |
| AIWindow.sys.mjs |
@import {SmartbarInput} from "chrome://browser/content/urlbar/SmartbarInput.mjs"
|
50999 |
- |
| AIWindowAccountAuth.sys.mjs |
Describes why Smart Window access was denied, which is what makes the
sign-in flow necessary. Recorded as the reason key on signin_flow_started.
@param {boolean} signedIn Whether the user is signed in to their account
@returns {string} One of signed_out, no_consent, both, or none
|
4517 |
- |
| AIWindowConstants.sys.mjs |
The current SQLite database schema version
|
790 |
- |
| AIWindowMenu.sys.mjs |
Adds the AI Window menuitems to the app menu
|
3580 |
- |
| AIWindowTabStatesManager.sys.mjs |
At which count the empty close prompt should be shown.
If this value needs to be updated it should also be updated in
the trigger string in FeatureCalloutMessages.sys.mjs
|
31681 |
- |
| AIWindowTelemetry.sys.mjs |
AIWindow telemetry calls
|
1225 |
- |
| AIWindowUI.sys.mjs |
@typedef {import("../components/ai-window/ai-window.mjs").SmartbarInputState} SmartbarInputState
|
24410 |
- |
| AutoTabGrouping.sys.mjs |
Total length of the given tabs' titles. The titles are the only text the
on-device model is given, and the telemetry events report how much of it
there was rather than the text itself.
@param {MozTabbrowserTab[]} tabs
@returns {number}
|
40538 |
- |
| AutoTabGroupingSuggestions.sys.mjs |
The suggestion engine for the Smart Window "Organize Tabs" feature: the only
code that talks to the on-device clustering model. Given a window it picks
candidate tabs, clusters and labels them, and turns each cluster into the
display data the panel shows: a name, a color, and one row per tab. Kept
free of any DOM so the pure parts stay unit-testable and every model call is
guarded against throwing.
|
14359 |
- |
| ChatConversation.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/SearchBrowsingHistory.sys.mjs").HistoryRow} HistoryRow |
42992 |
- |
| ChatEnums.sys.mjs |
@typedef ConversationStatus
@property {number} ACTIVE - An active conversation
@property {number} ARCHIVE - An archived conversation
@property {number} DELETED - A deleted conversation
|
1350 |
- |
| ChatMarkdownParser.mjs |
Markdown parser for Smart Window chat messages.
|
2792 |
- |
| ChatMessage.sys.mjs |
@typedef {import("./ChatConversation.sys.mjs").PooledHistoryResult} PooledHistoryResult |
12095 |
- |
| ChatMigrations.sys.mjs |
Please refer to sql.mjs for details on creating new migrations.
- List each change here and what it's for.
@param {OpenedConnection} conn - The SQLite connection to use for the migration
@param {number} version - The version number of the current schema
|
6493 |
- |
| ChatSql.sys.mjs |
|
19933 |
- |
| ChatStore.sys.mjs |
Simple interface to store and retrieve chat conversations and messages.
@todo Bug 2005409
Move this documentation to Firefox source docs
See: https://docs.google.com/document/d/1VlwmGbMhPIe-tmeKWinHuPh50VC9QrWEeQQ5V-UvEso/edit?tab=t.klqqibndv3zk
@example
let { ChatStore, ChatConversation, ChatMessage, MESSAGE_ROLE } =
ChromeUtils.importESModule("resource:///modules/aiwindow/ui/modules/ChatStore.sys.mjs");
const chatStore = ChatStore;
const conversation = new ChatConversation({
title: "title",
description: "description",
pageUrl: new URL("https://mozilla.com/"),
pageMeta: { one: 1, two: 2 },
});
const msg1 = new ChatMessage({
ordinal: 0,
role: MESSAGE_ROLE.USER,
modelId: "test",
params: { one: "one" },
usage: { two: "two", content: "some content" },
});
const msg2 = new ChatMessage({
ordinal: 1,
role: MESSAGE_ROLE.ASSISTANT,
modelId: "test",
params: { one: "one" },
usage: { two: "two", content: "some content 2" },
});
conversation.messages = [msg1, msg2];
await chatStore.updateConversation(conversation);
// Or findConversationsByDate, findConversationsByURL.
const foundConversation =
await chatStore.findConversationById(conversation.id);
@typedef {object} ChatStore
@property {*} x ?
|
49835 |
- |
| ChatUtils.sys.mjs |
@typedef {import("./ChatConversation.sys.mjs").PooledHistoryResult} PooledHistoryResult |
12878 |
- |
| ClientErrorTelemetry.mjs |
Shared vocabulary and helpers for the smart_window.client_error event.
The event is recorded in the parent process by
SmartWindowTelemetry.recordClientError(), but the Smart Window UI that
reports failures runs in two documents: the chrome document, which can call
Glean directly, and the about:aichatcontent document, which lives in a
content process and has to relay through AIChatContentChild/Parent. Keeping
the key sets, the field extraction and the message normalization here means
both sides describe a failure the same way, whichever route it takes.
|
8152 |
- |
| ConversationMigrations.sys.mjs |
|
380 |
- |
| ConversationSql.sys.mjs |
|
4134 |
- |
| ConversationStore.sys.mjs |
The current SQLite database schema version
|
7597 |
- |
| FeedbackModal.sys.mjs |
@param {MozBrowser} browser
@param {string} type - "thumbs-up" or "thumbs-down".
@param {object} metadata - Chat session data to include in telemetry.
|
2738 |
- |
| MonitorAttention.sys.mjs |
Which monitors have matched their condition since the user last opened the
panel, and which of those are still recent enough to be worth saying. This is
one half of what puts the dot on the monitor toolbar button; announcing the
feature as new is the other, and lives with the button itself.
This owns the pref and nothing else. It has no notion of a window, so
repainting the button after a change is the caller's job.
@typedef {{id: string, at: number}} MonitorMatch
A monitor id and the epoch milliseconds at which it matched.
|
3834 |
- |
| MonitorUIUtils.sys.mjs |
Shared utilities for monitor UI operations
|
6040 |
- |
| ResumeActivityDismissals.sys.mjs |
Marks a resume-activity memory as dismissed for the rest of the session.
@param {string} memoryId
|
899 |
- |
| SmartFormFillAutocomplete.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/ui/actors/SmartFormFillParent.sys.mjs").SmartFormFillParent} SmartFormFillParent |
7888 |
- |
| SmartFormFillConstants.mjs |
@typedef {object} FormReviewField
@property {string} id The stable ID of the detected form field.
@property {string} label The label detected for the form field.
@property {string} placeholder The form field’s placeholder text.
@property {string} name The form field’s name attribute.
@property {string} value The generated or user-edited field value.
|
2928 |
- |
| SmartFormFillController.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/Tools.sys.mjs").TabInfo} TabInfo |
28812 |
- |
| SmartFormFillDocument.sys.mjs |
@typedef {{
action: string,
autocomplete: string,
ownerDocument: Document,
rootElement: HTMLElement,
elements: Array<HTMLElement>,
}} FormLike
|
28981 |
- |
| SmartFormFillReviewSession.sys.mjs |
@typedef {import("chrome://browser/content/aiwindow/modules/SmartFormFillConstants.mjs").FormReviewAction} FormReviewAction |
6363 |
- |
| SmartFormFillTelemetry.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/SmartFormFillModel.sys.mjs").ClassificationResponse} ClassificationResponse |
13325 |
- |
| SmartFormFillUtils.sys.mjs |
Utility methods for finding nearby text around form controls.
|
4451 |
- |
| SmartWindowTelemetry.sys.mjs |
This singleton is for telemetry events that benefit from shared state management.
Simple events to be handled with inline Glean calls |
7045 |
- |
| SQLiteStoreBase.sys.mjs |
Base class for SQLite-backed store modules. Handles connection lifecycle,
schema initialization, migrations, corruption recovery, and database pruning.
Subclasses must override the configuration getters to provide store-specific
values (database filename, schema version, SQL entity statements, etc.).
@example
class MyStore extends SQLiteStoreBase {
get logPrefix() { return "MyStore"; }
get logLevelPref() { return "browser.mystore.loglevel"; }
get shutdownBlockerName() { return "MyStore: Shutdown"; }
get CURRENT_SCHEMA_VERSION() { return 1; }
get databaseFileName() { return "my-store.sqlite"; }
get prefBranch() { return "browser.mystore"; }
get createEntityStatements() { return [TABLE_SQL, INDEX_SQL]; }
get migrations() { return []; }
}
|
14575 |
- |
| TabManagementService.sys.mjs |
Service for managing browser tabs from AI Window UI components.
This service closes tabs using gBrowser.removeTab(), allowing Firefox's
native SessionStore machinery to keep the actual closed-tab restore state.
The service only stores lightweight operation metadata so the AI Window can
target a specific close operation when the user clicks "Undo".
|
25161 |
- |
| ToolActionLog.sys.mjs |
A localized label shown on an action log entry
@typedef {object} ActionLogLabel
@property {string} l10nId - Fluent message id for the label text
@property {object} [l10nArgs] - optional Fluent variables (e.g. counts)
|
6417 |
- |
| ToolUI.sys.mjs |
Tab action result status.
@typedef {"success" | "partial_success" | "error"} TabActionCompletion
|
39145 |
- |
| ToolUITelemetry.sys.mjs |
ToolUI telemetry calls
|
5257 |
- |
| UrlTokenizer.sys.mjs |
Tokenizes URLs to send to an LLM
|
4290 |
- |