chore(app): rework storage approach
This commit is contained in:
parent
dadc08ddc7
commit
761863ae35
13 changed files with 479 additions and 93 deletions
|
|
@ -3,7 +3,7 @@ import { createSimpleContext } from "@opencode-ai/ui/context"
|
|||
import { batch, createEffect, createMemo, createSignal, onCleanup } from "solid-js"
|
||||
import { createStore } from "solid-js/store"
|
||||
import { usePlatform } from "@/context/platform"
|
||||
import { persisted } from "@/utils/persist"
|
||||
import { Persist, persisted } from "@/utils/persist"
|
||||
|
||||
type StoredProject = { worktree: string; expanded: boolean }
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ export const { use: useServer, provider: ServerProvider } = createSimpleContext(
|
|||
const platform = usePlatform()
|
||||
|
||||
const [store, setStore, _, ready] = persisted(
|
||||
"server.v3",
|
||||
Persist.global("server", ["server.v3"]),
|
||||
createStore({
|
||||
list: [] as string[],
|
||||
projects: {} as Record<string, StoredProject[]>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue