Fix initialization and remove Services dependency

This commit is contained in:
Jordan Wages 2025-06-25 01:51:31 -05:00
commit a7670547fd
3 changed files with 47 additions and 18 deletions

View file

@ -147,7 +147,7 @@ document.addEventListener('DOMContentLoaded', async () => {
})).filter(r => r.criterion);
await browser.storage.local.set({ endpoint, templateName, customTemplate: customTemplateText, customSystemPrompt, aiParams: aiParamsSave, debugLogging, aiRules: rules });
try {
AiClassifier.setConfig({ endpoint, templateName, customTemplate: customTemplateText, customSystemPrompt, aiParams: aiParamsSave, debugLogging });
await AiClassifier.setConfig({ endpoint, templateName, customTemplate: customTemplateText, customSystemPrompt, aiParams: aiParamsSave, debugLogging });
logger.setDebug(debugLogging);
} catch (e) {
logger.aiLog('[options] failed to apply config', {level: 'error'}, e);