From d0f1708017fd8a4c887c3e0e2f6540441017a087 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 13 Mar 2026 13:04:09 -0700 Subject: [PATCH] Replace void with fireAndForget in proxy main.tsx Co-Authored-By: Claude Opus 4.6 --- apps/yaak-proxy/main.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/yaak-proxy/main.tsx b/apps/yaak-proxy/main.tsx index 1e197fb0..fbe95d7f 100644 --- a/apps/yaak-proxy/main.tsx +++ b/apps/yaak-proxy/main.tsx @@ -7,21 +7,24 @@ import { ProxyLayout } from "./components/ProxyLayout"; import { listen, rpc } from "./lib/rpc"; import { initHotkeys } from "./lib/hotkeys"; import { applyChange, dataAtom, replaceAll } from "./lib/store"; +import { fireAndForget } from "./lib/fireAndForget"; import "./main.css"; const queryClient = new QueryClient(); const jotaiStore = createStore(); // Load initial models from the database -void rpc("list_models", {}).then((res) => { - jotaiStore.set(dataAtom, (prev) => replaceAll(prev, "http_exchange", res.httpExchanges)); -}); +fireAndForget( + rpc("list_models", {}).then((res) => { + jotaiStore.set(dataAtom, (prev) => replaceAll(prev, "http_exchange", res.httpExchanges)); + }), +); // Register hotkeys from action metadata -void initHotkeys(); +fireAndForget(initHotkeys()); // Subscribe to model change events from the backend -void listen("model_write", (payload) => { +listen("model_write", (payload) => { jotaiStore.set(dataAtom, (prev) => applyChange(prev, "http_exchange", payload.model, payload.change), );