The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(bridge): only invoke start_media_bridge inside Tauri (browser dev uses external bridge)
purple62f2d547d5e4
diff --git a/src/api/bridge-client.ts b/src/api/bridge-client.tsindex df122dae..6c146de5 100644--- a/src/api/bridge-client.ts+++ b/src/api/bridge-client.ts@@ -8,16 +8,19 @@* MLX image/video API wrappers use — the desktop analogue of the web app's* `backendCall` (which POSTs to the same `/cmd/*` on a paired bridge URL).*/-import { localFetch, backendCall } from './backend'+import { localFetch, backendCall, isTauri } from './backend'const BRIDGE_BASE = 'http://127.0.0.1:47711'// Memoized "ensure the sidecar is up" promise. `start_media_bridge` is// idempotent (no-op if already healthy), so we only pay the spawn+health-wait// once per session; a failure clears the memo so the next call retries.+// In a plain browser (Vite dev, no Tauri invoke) we assume the bridge runs+// externally — mirroring the web app, where it's a separately-launched daemon.let _bridgeReady: Promise<void> | null = nullexport function ensureMediaBridge(): Promise<void> {+ if (!isTauri()) return Promise.resolve()if (!_bridgeReady) {_bridgeReady = backendCall('start_media_bridge').then(() => undefined)