Prep for addon signing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CreateMLCEngine } from "@mlc-ai/web-llm";
|
||||
import { CreateMLCEngine } from "@mlc-ai/web-llm"
|
||||
|
||||
var engine = null
|
||||
var resume = ""
|
||||
@@ -12,7 +12,7 @@ const loadProgress = (progress) => {
|
||||
const loadResources = async () => {
|
||||
let modelName = (await browser.storage.local.get("model")).model || "Llama-3.2-1B-Instruct-q4f32_1-MLC"
|
||||
console.log(`Loading model: ${modelName}`)
|
||||
engine = await CreateMLCEngine(modelName, { initProgressCallback: loadProgress });
|
||||
engine = await CreateMLCEngine(modelName, { initProgressCallback: loadProgress })
|
||||
console.log("Model loaded")
|
||||
resume = (await browser.storage.local.get("resume")).resume || "No resume, halt and ask for resume."
|
||||
resourcesLoaded = true
|
||||
@@ -44,7 +44,7 @@ browser.contextMenus.create({
|
||||
browser.contextMenus.onClicked.addListener((info, tab) => {
|
||||
if (info.menuItemId === "nms-cmenu" && info.selectionText) {
|
||||
// Handle context menu click with selected text
|
||||
console.log("Context menu clicked with selection:", info.selectionText);
|
||||
console.log("Context menu clicked with selection:", info.selectionText)
|
||||
runMatch(info.selectionText)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user