feat(health): OllamaBanner v0.2 copy
Task 29 of the slice plan. Subscribes to ollamaStatus from the inbox store and renders one of two messages: 'ollama pull gemma4:e4b 실행 후 앱을 재시작해주세요.' when the model isn't installed (status.reason includes 'not installed'), or 'Inkling 정리가 잠시 멈췄습니다. Ollama를 실행해주세요.' for any other unhealthy state. Capture continues regardless. HealthChecker.ts itself was pulled forward in Task 21 so its import would resolve from inboxApi.ts at compile time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,2 +1,16 @@
|
||||
import React from 'react';
|
||||
export function OllamaBanner() { return null; }
|
||||
import { useInbox } from '../store.js';
|
||||
|
||||
export function OllamaBanner(): React.ReactElement | null {
|
||||
const status = useInbox((s) => s.ollamaStatus);
|
||||
if (status.ok) return null;
|
||||
const isMissing = status.reason?.includes('not installed');
|
||||
const message = isMissing
|
||||
? '`ollama pull gemma4:e4b` 실행 후 앱을 재시작해주세요.'
|
||||
: 'Inkling 정리가 잠시 멈췄습니다. Ollama를 실행해주세요.';
|
||||
return (
|
||||
<div className="banner warn">
|
||||
<span>⚠ {message}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user