fix(desktop): clone pty session on reconnect

This commit is contained in:
Adam 2025-12-05 10:30:44 -06:00
commit cfbaf81ef8
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
4 changed files with 36 additions and 30 deletions

View file

@ -84,6 +84,10 @@ export default function Page() {
}
if (event.ctrlKey && event.key.toLowerCase() === "`") {
event.preventDefault()
if (event.shiftKey) {
session.terminal.new()
return
}
layout.terminal.toggle()
return
}
@ -663,7 +667,11 @@ export default function Page() {
<For each={session.terminal.all()}>
{(terminal) => (
<Tabs.Content value={terminal.id}>
<Terminal pty={terminal} onCleanup={session.terminal.update} />
<Terminal
pty={terminal}
onCleanup={session.terminal.update}
onConnectError={() => session.terminal.clone(terminal.id)}
/>
</Tabs.Content>
)}
</For>