diff options
| author | Adam <[email protected]> | 2026-01-16 13:13:27 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-16 13:55:59 -0600 |
| commit | 086603494691fa832239d79bf844880f87f1299c (patch) | |
| tree | b9ddb2d20659af633d02b4b1fa09e1f8c207f50a /packages/app/src/context | |
| parent | 2ccaa10e7961657322beff670b5522f404278c33 (diff) | |
| download | opencode-086603494691fa832239d79bf844880f87f1299c.tar.gz opencode-086603494691fa832239d79bf844880f87f1299c.zip | |
feat(app): edit project and session titles
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/global-sync.tsx | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx index 82452ed48..2df58eff2 100644 --- a/packages/app/src/context/global-sync.tsx +++ b/packages/app/src/context/global-sync.tsx @@ -110,6 +110,7 @@ function createGlobalSync() { }) const children: Record<string, [Store<State>, SetStoreFunction<State>]> = {} + function child(directory: string) { if (!directory) console.error("No directory provided") if (!children[directory]) { @@ -122,29 +123,33 @@ function createGlobalSync() { if (!cache) throw new Error("Failed to create persisted cache") vcsCache.set(directory, { store: cache[0], setStore: cache[1], ready: cache[3] }) - children[directory] = createStore<State>({ - project: "", - provider: { all: [], connected: [], default: {} }, - config: {}, - path: { state: "", config: "", worktree: "", directory: "", home: "" }, - status: "loading" as const, - agent: [], - command: [], - session: [], - sessionTotal: 0, - session_status: {}, - session_diff: {}, - todo: {}, - permission: {}, - question: {}, - mcp: {}, - lsp: [], - vcs: cache[0].value, - limit: 5, - message: {}, - part: {}, - }) - bootstrapInstance(directory) + const init = () => { + children[directory] = createStore<State>({ + project: "", + provider: { all: [], connected: [], default: {} }, + config: {}, + path: { state: "", config: "", worktree: "", directory: "", home: "" }, + status: "loading" as const, + agent: [], + command: [], + session: [], + sessionTotal: 0, + session_status: {}, + session_diff: {}, + todo: {}, + permission: {}, + question: {}, + mcp: {}, + lsp: [], + vcs: cache[0].value, + limit: 5, + message: {}, + part: {}, + }) + bootstrapInstance(directory) + } + + runWithOwner(owner, init) } const childStore = children[directory] if (!childStore) throw new Error("Failed to create store") |
