mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 00:12:11 +00:00
fix(desktop): clone pty session on reconnect
This commit is contained in:
parent
87a791fdb9
commit
cfbaf81ef8
4 changed files with 44 additions and 38 deletions
|
|
@ -26,7 +26,7 @@ export const { use: useSession, provider: SessionProvider } = createSimpleContex
|
|||
const params = useParams()
|
||||
const sync = useSync()
|
||||
const name = createMemo(
|
||||
() => `______${base64Encode(sync.data.project.worktree)}/session${params.id ? "/" + params.id : ""}`,
|
||||
() => `${base64Encode(sync.data.project.worktree)}/session${params.id ? "/" + params.id : ""}.v1`,
|
||||
)
|
||||
|
||||
const [store, setStore] = makePersisted(
|
||||
|
|
@ -232,6 +232,9 @@ export const { use: useSession, provider: SessionProvider } = createSimpleContex
|
|||
...pty,
|
||||
...clone.data,
|
||||
})
|
||||
if (store.terminals.active === pty.id) {
|
||||
setStore("terminals", "active", clone.data.id)
|
||||
}
|
||||
},
|
||||
open(id: string) {
|
||||
setStore("terminals", "active", id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue