From 54ad3e37c6e9d2242f932c192119dd6de64966cf Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 5 May 2026 10:51:56 +0200 Subject: feat: check OLLAMA_HOST reachability before starting translation Non-blocking QThread check hits /api/tags on the resolved ollama host before launching TranslationWorker. Shows QMessageBox.warning() if unreachable; proceeds silently if reachable. Adds ollama_host field to Config with env-var fallback to http://localhost:11434. Co-Authored-By: Claude Sonnet 4.6 --- ui/main_window.py | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/main_window.py') diff --git a/ui/main_window.py b/ui/main_window.py index 8aa2762..83a2eed 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -105,6 +105,7 @@ class MainWindow(QMainWindow): self.config.transart_script, self.config.typora_bin, self.config.typora_args, + ollama_host=self.config.ollama_host, parent=self, ) self._translation_view.push_master.connect(lambda: self._do_git_push("master")) -- cgit v1.2.3