| AIWindow.sys.mjs |
AI Window Service
|
8473 |
| AIWindowAccountAuth.sys.mjs |
|
2904 |
| AIWindowMenu.sys.mjs |
Adds the AI Window menuitems to the app menu
|
3847 |
| AIWindowUI.sys.mjs |
@param {Window} win
@returns {{ chromeDoc: Document, box: Element, splitter: Element } | null}
|
3529 |
| ChatConstants.sys.mjs |
The current SQLite database schema version
|
766 |
| ChatConversation.sys.mjs |
A conversation containing messages.
|
9232 |
| 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.
|
7530 |
| 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
|
816 |
| ChatSql.sys.mjs |
|
8824 |
| 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 = new 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 ?
|
23676 |
| ChatUtils.sys.mjs |
Creates a 12 characters GUID with 72 bits of entropy.
@returns {string} A base64url encoded GUID.
|
4702 |