Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix(threads): scope llamacpp router error banner to llamacpp threads

Akarshand89a8657795e
diff --git a/web-app/src/routes/threads/$threadId.tsx b/web-app/src/routes/threads/$threadId.tsx
index 5836f1f1b..76d2c0352 100644
--- a/web-app/src/routes/threads/$threadId.tsx
+++ b/web-app/src/routes/threads/$threadId.tsx
@@ -156,11 +156,18 @@ function ThreadDetail() {
const [processingEmbeddings, setProcessingEmbeddings] = useState(false)
// Refs so onFinish (captured in closure) always calls the latest callbacks
- const oomError = useAppState((s) => s.oomError)
+ const oomErrorRaw = useAppState((s) => s.oomError)
const setOomError = useAppState((s) => s.setOomError)
- const backendError = useAppState((s) => s.backendError)
+ const backendErrorRaw = useAppState((s) => s.backendError)
const setBackendError = useAppState((s) => s.setBackendError)
+ // These signals come from the llamacpp router via global Tauri events.
+ // Mask them when the active provider isn't llamacpp so a router crash
+ // doesn't decorate chats running against MLX / OpenAI / Anthropic / etc.
+ const isLlamacppActive = selectedProvider === 'llamacpp'
+ const oomError = isLlamacppActive ? oomErrorRaw : undefined
+ const backendError = isLlamacppActive ? backendErrorRaw : undefined
+
const handleContextSizeIncreaseRef = useRef<(() => void) | null>(null)
const setContinueFromContentRef = useRef<((content: string) => void) | null>(
null