feat: add settings defaults and validation with unit tests

This commit is contained in:
golem
2026-08-01 21:59:47 -06:00
parent b59648d900
commit c49f6415af
4 changed files with 142 additions and 2 deletions
+13
View File
@@ -0,0 +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`.
export const OPEN_IN_VALUES = ["new-tab", "background-tab", "new-window"];
export const DEFAULT_SETTINGS = {
model: "",
temporaryChat: false,
webSearch: false,
openIn: "new-tab",
promptTemplate: "{query}",
};