From 761863ae355b3ca1e606ea5eb2106772fa763c19 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Tue, 6 Jan 2026 21:38:08 -0600
Subject: chore(app): rework storage approach

---
 packages/app/src/context/terminal.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/app/src/context/terminal.tsx')

diff --git a/packages/app/src/context/terminal.tsx b/packages/app/src/context/terminal.tsx
index e9a07077c..6188772f0 100644
--- a/packages/app/src/context/terminal.tsx
+++ b/packages/app/src/context/terminal.tsx
@@ -3,7 +3,7 @@ import { createSimpleContext } from "@opencode-ai/ui/context"
 import { batch, createMemo } from "solid-js"
 import { useParams } from "@solidjs/router"
 import { useSDK } from "./sdk"
-import { persisted } from "@/utils/persist"
+import { Persist, persisted } from "@/utils/persist"
 
 export type LocalPTY = {
   id: string
@@ -19,10 +19,10 @@ export const { use: useTerminal, provider: TerminalProvider } = createSimpleCont
   init: () => {
     const sdk = useSDK()
     const params = useParams()
-    const name = createMemo(() => `${params.dir}/terminal${params.id ? "/" + params.id : ""}.v1`)
+    const legacy = createMemo(() => `${params.dir}/terminal${params.id ? "/" + params.id : ""}.v1`)
 
     const [store, setStore, _, ready] = persisted(
-      name(),
+      Persist.scoped(params.dir, params.id, "terminal", [legacy()]),
       createStore<{
         active?: string
         all: LocalPTY[]
-- 
cgit v1.2.3

