From 4246cdb069502c96ab11e260eb36a07a0370b710 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Sun, 14 Dec 2025 19:33:40 -0600
Subject: wip(desktop): progress

---
 packages/desktop/src/context/local.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'packages/desktop/src/context/local.tsx')

diff --git a/packages/desktop/src/context/local.tsx b/packages/desktop/src/context/local.tsx
index f841da1cc..0970178ea 100644
--- a/packages/desktop/src/context/local.tsx
+++ b/packages/desktop/src/context/local.tsx
@@ -239,7 +239,9 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
       function updateVisibility(model: ModelKey, visibility: "show" | "hide") {
         const index = store.user.findIndex((x) => x.modelID === model.modelID && x.providerID === model.providerID)
         if (index >= 0) {
-          setStore("user", index, { visibility: visibility })
+          setStore("user", index, { visibility })
+        } else {
+          setStore("user", (prev) => [...prev, { ...model, visibility }])
         }
       }
 
@@ -264,6 +266,9 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
         hide(model: ModelKey) {
           updateVisibility(model, "hide")
         },
+        setVisibility(model: ModelKey, visible: boolean) {
+          updateVisibility(model, visible ? "show" : "hide")
+        },
       }
     })()
 
-- 
cgit v1.2.3

