Name Description Size Coverage
AIWindow.sys.mjs @import {SmartbarInput} from "chrome://browser/content/urlbar/SmartbarInput.mjs" 19386 -
AIWindowAccountAuth.sys.mjs 2635 -
AIWindowMenu.sys.mjs Adds the AI Window menuitems to the app menu 4126 -
AIWindowTabStatesManager.sys.mjs @typedef {{ input: string, mode: string, pageUrl: URL, conversationId: string, }} TabState 8764 -
AIWindowUI.sys.mjs @param {Window} win @returns {{ chromeDoc: Document, box: Element, splitter: Element } | null} 6207 -
ChatConstants.sys.mjs The current SQLite database schema version 769 -
ChatConversation.sys.mjs A conversation containing messages. 14856 -
ChatEnums.sys.mjs @typedef ConversationStatus @property {number} ACTIVE - An active conversation @property {number} ARCHIVE - An archived conversation @property {number} DELETED - A deleted conversation 1206 -
ChatMessage.sys.mjs A message in a conversation. 7638 -
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 1895 -
ChatSql.sys.mjs 9444 -
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 ? 26501 -
ChatUtils.sys.mjs Creates a 12 characters GUID with 72 bits of entropy. @returns {string} A base64url encoded GUID. 4831 -
TokenStreamParser.mjs Creates a new token stream parser state object. @returns {{ inToken: boolean, tokenBuffer: string, tokenCandidate: boolean, pendingOpen: boolean }} Parser state with token tracking. 5664 -