feat: add advanced context actions and optional translation

This commit is contained in:
golem
2026-10-05 15:38:16 -06:00
parent 33c4dad00f
commit 5308932bf1
34 changed files with 1579 additions and 159 deletions
+5 -10
View File
@@ -1,18 +1,13 @@
// Single source of truth for the settings shape and their defaults.
// Defaults reproduce the extension's pre-1.1 behaviour exactly: an empty model
// and both toggles off mean the only URL parameter sent is `q`.
// Defaults reproduce the extension's pre-1.1 behaviour exactly: both URL toggles off mean the only URL parameter sent is `q`.
export const OPEN_IN_VALUES = ["new-tab", "background-tab", "new-window"];
// An unbounded model string can, on its own, exceed MAX_URL_CHARS in
// lib/build-url.js — fitToBudget() only ever trims `q`, so a long enough
// model silently pushes the whole URL over budget and drops the query
// entirely with no signal to the user. 200 is generous for any real model
// slug while keeping the URL budget meaningful.
export const MAX_MODEL_CHARS = 200;
export const DEFAULT_SETTINGS = {
model: "",
contextMenuMode: "simple",
showTranslate: false,
translationMode: "ask",
translationLanguage: "",
temporaryChat: false,
webSearch: false,
openIn: "new-tab",