This commit introduces a new feature that displays generation information for each message in the chat. The generation info is displayed in a popover and includes details about the model used, the prompt, and other relevant information. This helps users understand how their messages were generated and troubleshoot any issues that may arise. The generation info is retrieved from the LLM response and is stored in the database alongside other message details. This commit also includes translations for the generation info label in all supported languages.
93 lines
2.0 KiB
TypeScript
93 lines
2.0 KiB
TypeScript
import { defineConfig } from "wxt"
|
|
import react from "@vitejs/plugin-react"
|
|
import topLevelAwait from "vite-plugin-top-level-await"
|
|
|
|
const chromeMV3Permissions = [
|
|
"storage",
|
|
"sidePanel",
|
|
"activeTab",
|
|
"scripting",
|
|
"declarativeNetRequest",
|
|
"action",
|
|
"unlimitedStorage",
|
|
"contextMenus",
|
|
"tts",
|
|
"notifications"
|
|
]
|
|
|
|
const firefoxMV2Permissions = [
|
|
"storage",
|
|
"activeTab",
|
|
"scripting",
|
|
"unlimitedStorage",
|
|
"contextMenus",
|
|
"webRequest",
|
|
"webRequestBlocking",
|
|
"notifications",
|
|
"http://*/*",
|
|
"https://*/*",
|
|
"file://*/*"
|
|
]
|
|
|
|
// See https://wxt.dev/api/config.html
|
|
export default defineConfig({
|
|
vite: () => ({
|
|
plugins: [
|
|
react(),
|
|
topLevelAwait({
|
|
promiseExportName: "__tla",
|
|
promiseImportName: (i) => `__tla_${i}`
|
|
}) as any
|
|
],
|
|
build: {
|
|
rollupOptions: {
|
|
external: ["langchain", "@langchain/community"]
|
|
}
|
|
}
|
|
}),
|
|
entrypointsDir: "entries",
|
|
srcDir: "src",
|
|
outDir: "build",
|
|
|
|
manifest: {
|
|
version: "1.3.4",
|
|
name:
|
|
process.env.TARGET === "firefox"
|
|
? "Page Assist - A Web UI for Local AI Models"
|
|
: "__MSG_extName__",
|
|
description: "__MSG_extDescription__",
|
|
default_locale: "en",
|
|
action: {},
|
|
author: "n4ze3m",
|
|
browser_specific_settings:
|
|
process.env.TARGET === "firefox"
|
|
? {
|
|
gecko: {
|
|
id: "page-assist@nazeem"
|
|
}
|
|
}
|
|
: undefined,
|
|
host_permissions:
|
|
process.env.TARGET !== "firefox"
|
|
? ["http://*/*", "https://*/*", "file://*/*"]
|
|
: undefined,
|
|
commands: {
|
|
_execute_action: {
|
|
description: "Open the Web UI",
|
|
suggested_key: {
|
|
default: "Ctrl+Shift+L"
|
|
}
|
|
},
|
|
execute_side_panel: {
|
|
description: "Open the side panel",
|
|
suggested_key: {
|
|
default: "Ctrl+Shift+P"
|
|
}
|
|
}
|
|
},
|
|
permissions:
|
|
process.env.TARGET === "firefox"
|
|
? firefoxMV2Permissions
|
|
: chromeMV3Permissions
|
|
}
|
|
}) as any |