From df56661f4f70478957ae06b2f9dc8d3fe49b2493 Mon Sep 17 00:00:00 2001 From: altair823 Date: Sat, 25 Apr 2026 16:20:57 +0900 Subject: [PATCH] feat(diag): log resolved Ollama endpoint + surface health reason in banner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the OllamaBanner appears, it was generic enough that the user couldn't tell whether the env var was missing, the LAN host was unreachable, the model was uninstalled, or DNS was failing. Log the resolved endpoint at startup with a `fromEnv` flag so we can confirm INKLING_OLLAMA_ENDPOINT was actually read, and render the underlying health-check reason as a small subtitle under the banner copy. The user-facing primary message still avoids the forbidden tone words ("실패"/"끊김"/"연속 실패"); the diagnostic line is technical and only appears when status.reason is set. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/main/index.ts | 7 +++++-- src/renderer/inbox/components/OllamaBanner.tsx | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 2f1851d..ee042f7 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -34,9 +34,12 @@ app.whenReady().then(async () => { const continuity = new ContinuityService(db); const intent = new IntentService(repo); - const provider = new LocalOllamaProvider({ - endpoint: process.env.INKLING_OLLAMA_ENDPOINT + const resolvedEndpoint = process.env.INKLING_OLLAMA_ENDPOINT ?? 'http://localhost:11434'; + logger.info('ai.endpoint', { + endpoint: resolvedEndpoint, + fromEnv: process.env.INKLING_OLLAMA_ENDPOINT !== undefined }); + const provider = new LocalOllamaProvider({ endpoint: resolvedEndpoint }); const health = new HealthChecker(provider); void health.runOnce().then((h) => logger.info('ai.health', { ...h } as Record)); diff --git a/src/renderer/inbox/components/OllamaBanner.tsx b/src/renderer/inbox/components/OllamaBanner.tsx index 066f9cc..ff2c87f 100644 --- a/src/renderer/inbox/components/OllamaBanner.tsx +++ b/src/renderer/inbox/components/OllamaBanner.tsx @@ -9,8 +9,13 @@ export function OllamaBanner(): React.ReactElement | null { ? '`ollama pull gemma4:e4b` 실행 후 앱을 재시작해주세요.' : 'Inkling 정리가 잠시 멈췄습니다. Ollama를 실행해주세요.'; return ( -
+
⚠ {message} + {status.reason ? ( + + 진단: {status.reason} + + ) : null}
); }