diff --git a/tui.tsx b/tui.tsx index 9b13813..4f8f805 100644 --- a/tui.tsx +++ b/tui.tsx @@ -42,6 +42,7 @@ type TrackerState = { generatePrevNd: number generateStartAt: number prevNdBySlot: Record + failure: string | null } function estimateStreamTokens(delta: string) { @@ -200,6 +201,7 @@ function SessionPromptRight(props: { }) const text = createMemo(() => { + if (props.tracker.failure) return props.tracker.failure const pp = prefillRate() const tps = liveTps() if (props.tracker.isPrefilling && pp) { @@ -230,6 +232,7 @@ const tui: TuiPlugin = async (api) => { generatePrevNd: 0, generateStartAt: 0, prevNdBySlot: {}, + failure: null, } const [version, setVersion] = createSignal(0) const [clock, setClock] = createSignal(Date.now()) @@ -294,6 +297,13 @@ const tui: TuiPlugin = async (api) => { } } + if (!model) { + tracker.failure = "no model found" + bump() + return + } + tracker.failure = null + let anyPrefilling = false let anyGenerating = false let genEnded = false