From d74ae097af008fd6456762e6638c03be99684a82 Mon Sep 17 00:00:00 2001 From: SysVis AI Date: Sun, 28 Dec 2025 20:00:37 +0700 Subject: [PATCH] fix: smart default for ollama url on https --- src/store/settingsStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/settingsStore.ts b/src/store/settingsStore.ts index ecdfb89..008f4b5 100644 --- a/src/store/settingsStore.ts +++ b/src/store/settingsStore.ts @@ -55,7 +55,9 @@ const initialSettings = { aiMode: getInitialAiMode(), onlineProvider: 'openai' as OnlineProvider, apiKey: '', - ollamaUrl: 'http://localhost:11434', + ollamaUrl: typeof window !== 'undefined' && window.location.protocol === 'https:' + ? window.location.origin + : 'http://localhost:11434', modelName: 'llama3.2-vision', theme: getInitialTheme(), };