| A2UI.sys.mjs |
A generated surface before hydration.
@typedef {import("../../models/aitab/AITab.sys.mjs").A2UISurface} A2UISurface
|
15002 |
- |
| AgentPageDetector.sys.mjs |
Client-side, network-free classification of URLs into the page categories
Smart Window feature callout is gated on:
- "product-detail": a retailer product page (Amazon, Walmart, Best Buy and
Sephora in US and some UK).
- "shopping-home": the home page of a US, Canada, and UK retailer.
- "news-home": the home page of a US, Canada, and UK news site.
|
9439 |
- |
| 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
|
36472 |
- |
| AITabConstants.sys.mjs |
The current SQLite database schema version
|
538 |
- |
| AITabHeadingFont.sys.mjs |
Downloads the heading font from Remote Settings. about:smartpage has a null
origin, so it cannot load the CDN file itself: font loads are CORS checked.
The download is shared by every page and cached on disk by Remote Settings.
If the font record is missing or the download fails, or a sync may have
published a new font, the next call tries the download again.
@returns {Promise<?ArrayBuffer>} Null when the record is not available.
|
1800 |
- |
| AITabMigrations.sys.mjs |
v2: idx_aitab_pages_slug_version became UNIQUE, so a slug can no longer be
claimed by more than one conversation. Databases created under v1 carry
the non-unique index and have to have it rebuilt.
The store had no production writer while v1 was current, so no v1 database
can hold rows that would violate the new constraint.
@param {object} connection - The open database connection.
@param {number} version - Schema version the database is migrating from.
|
3341 |
- |
| AITabPageTypes.sys.mjs |
The feature that owns a stored page. Stored as an integer in
aitab_pages.page_type, so a value must never be reused or renumbered once it
has shipped.
|
2667 |
- |
| AITabSql.sys.mjs |
|
6198 |
- |
| AITabStore.sys.mjs |
Represents a row from the aitab_pages table in the
ai-tab-pages-store.sqlite database.
@typedef {object} AITabRow
@property {string} uuid - Identifier for this version.
@property {string} convId - Conversation that owns the page.
@property {string|null} toolConvId - Conversation used to generate the page.
@property {string} slug - URL identifier shared across versions.
@property {number} version - Sequential version number.
@property {number} pageType - One of AITAB_PAGE_TYPES.
@property {string} title - Page title.
@property {number} createdAt - Creation time in microseconds since the Unix epoch.
@property {number} updatedAt - Update time in microseconds since the Unix epoch.
@property {object|null} context - Inputs used to generate the page.
@property {*} components - Component data decoded from stored JSON.
@property {object|null} localState - Saved component state, such as checkboxes.
|
14126 |
- |
| AIWindow.sys.mjs |
@import {SmartbarInput} from "chrome://browser/content/urlbar/SmartbarInput.mjs"
|
39316 |
- |
| AIWindowConstants.sys.mjs |
The current SQLite database schema version
|
669 |
- |
| AIWindowMenu.sys.mjs |
Adds the AI Window menuitems to the app menu
|
3973 |
- |
| 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
|
31690 |
- |
| AIWindowTelemetry.sys.mjs |
AIWindow telemetry calls
|
1225 |
- |
| AIWindowToolbarButtons.sys.mjs |
The Smart Window's toolbar buttons: the ask button in the toolbox markup, and
the window switcher, "Organize Tabs" and monitor CustomizableUI buttons.
|
16317 |
- |
| AIWindowUI.sys.mjs |
@param {string} url
@returns {Promise<?AITabPageTypeDescriptor>} The type of the stored Smart
Page at url, or null when url is not a stored Smart Page.
|
26604 |
- |
| 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}
|
40556 |
- |
| 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.
|
17549 |
- |
| ChatConversation.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/SearchBrowsingHistory.sys.mjs").HistoryRow} HistoryRow |
47562 |
- |
| ChatEnums.sys.mjs |
@typedef ConversationStatus
@property {number} ACTIVE - An active conversation
@property {number} ARCHIVE - An archived conversation
@property {number} DELETED - A deleted conversation
|
1350 |
- |
| 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
|
6857 |
- |
| ChatSql.sys.mjs |
|
20328 |
- |
| 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 ?
|
38341 |
- |
| ChatUtils.sys.mjs |
@typedef {import("./ChatConversation.sys.mjs").PooledHistoryResult} PooledHistoryResult |
12928 |
- |
| ConversationMigrations.sys.mjs |
|
380 |
- |
| ConversationSql.sys.mjs |
|
4134 |
- |
| ConversationStore.sys.mjs |
The current SQLite database schema version
|
7368 |
- |
| DigestActivity.sys.mjs |
A digest created this session is highlighted for
DIGEST_HIGHLIGHT_DURATION_MS, until its pill is first clicked in any
window, or until the browser restarts.
@param {{id: string, created_at: number}} digest
@returns {number} Epoch milliseconds when the highlight ends, or 0 for no
highlight.
|
1669 |
- |
| FeedbackModal.sys.mjs |
@param {MozBrowser} browser
@param {string} type - "thumbs-up" or "thumbs-down".
@param {object} metadata - Chat session data to include in telemetry.
|
2790 |
- |
| MonitorAttention.sys.mjs |
Why a monitor is asking for attention. Entries written before the dot
covered failures carry no kind and read as matches.
|
5453 |
- |
| MonitorPanel.sys.mjs |
The Smart Window "Tasks" panel, anchored to its toolbar button. The panel is
created on demand and removed when it closes.
Monitors live in MonitorAgent and change from its own timers as well as from
other surfaces, so this module owns the data: it pushes monitors into the
agent-monitor-panel element and refreshes them while the panel is open. The
element only renders and reports what the user did.
|
15540 |
- |
| MonitorUIUtils.sys.mjs |
Titles of the pages open in non-private windows.
@returns {Map<string, string>} Map of url -> page title
|
18720 |
- |
| ResumeActivity.sys.mjs |
Marks a resume pill as dismissed for this session.
Remove with the pill fallback in Bug 2077652.
@param {string} memoryId
|
1502 |
- |
| SmartActionsToolbar.sys.mjs |
Toolbar of actions for the http(s) page shown in a Smart Window.
|
14570 |
- |
| SmartFormFillAutocomplete.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/ui/actors/SmartFormFillParent.sys.mjs").SmartFormFillParent} SmartFormFillParent |
8215 |
- |
| SmartFormFillController.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/Tools.sys.mjs").TabInfo} TabInfo |
29568 |
- |
| SmartFormFillDocument.sys.mjs |
@typedef {{
action: string,
autocomplete: string,
ownerDocument: Document,
rootElement: HTMLElement,
elements: Array<HTMLElement>,
}} FormLike
|
32789 |
- |
| SmartFormFillReviewSession.sys.mjs |
@typedef {import("chrome://browser/content/aiwindow/modules/SmartFormFillConstants.mjs").FormReviewAction} FormReviewAction |
6363 |
- |
| SmartFormFillSources.sys.mjs |
The tabs Smart Form Fill draws values from: the dialog where the user picks
them, and the page text extracted from them.
|
8109 |
- |
| SmartFormFillTelemetry.sys.mjs |
@typedef {import("moz-src:///browser/components/aiwindow/models/SmartFormFillModel.sys.mjs").ClassificationResponse} ClassificationResponse |
28995 |
- |
| 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 |
9058 |
- |
| 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 []; }
}
|
14837 |
- |
| TabManagementService.sys.mjs |
@import { TabGroupColor } from "chrome://browser/content/tabbrowser/tabgroup.mjs"
|
30396 |
- |
| 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)
|
7550 |
- |
| ToolTabActions.sys.mjs |
@import { TabSelectionData } from "moz-src:///browser/components/aiwindow/ui/modules/ToolUI.sys.mjs"
|
14581 |
- |
| ToolUI.sys.mjs |
@import { ChatConversation } from "moz-src:///browser/components/aiwindow/ui/modules/ChatConversation.sys.mjs"
@import { ChatMessage } from "moz-src:///browser/components/aiwindow/ui/modules/ChatMessage.sys.mjs"
|
31933 |
- |
| ToolUITelemetry.sys.mjs |
@import { HandlerContext, TabActionCompletion, TabSelectionData } from "moz-src:///browser/components/aiwindow/ui/modules/ToolUI.sys.mjs"
|
13426 |
- |
| ToUSpotlight.sys.mjs |
Shows the Smart Window Terms of Use Spotlight modal.
@param {Browser} browser
@returns {Promise<boolean>} Whether the user accepted
|
5703 |
- |
| UrlTokenizer.sys.mjs |
Matches a URL token in model text, e.g. "§url_token: GITHUB_COM_1§". The
first capture group is the bare token.
|
8907 |
- |