diff options
| author | Adam <[email protected]> | 2026-03-04 07:03:44 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-03-04 07:04:03 -0600 |
| commit | d7569a5625e4a2287195c27a84330af1d9d2c3df (patch) | |
| tree | d275f7b4ba7b0df3dbd6b5039c17f05b8aa9be1c /packages/app/src/pages/session | |
| parent | 0541d756a60ea8dad1bf74e07627231f3c5532b9 (diff) | |
| download | opencode-d7569a5625e4a2287195c27a84330af1d9d2c3df.tar.gz opencode-d7569a5625e4a2287195c27a84330af1d9d2c3df.zip | |
fix(app): terminal tab close
Diffstat (limited to 'packages/app/src/pages/session')
| -rw-r--r-- | packages/app/src/pages/session/terminal-panel.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/app/src/pages/session/terminal-panel.tsx b/packages/app/src/pages/session/terminal-panel.tsx index 49bed9490..cc4c17ee2 100644 --- a/packages/app/src/pages/session/terminal-panel.tsx +++ b/packages/app/src/pages/session/terminal-panel.tsx @@ -102,7 +102,7 @@ export function TerminalPanel() { const all = createMemo(() => terminal.all()) const ids = createMemo(() => all().map((pty) => pty.id)) - const byId = createMemo(() => new Map(all().map((pty) => [pty.id, pty]))) + const byId = createMemo(() => new Map(all().map((pty) => [pty.id, { ...pty }]))) const handleTerminalDragStart = (event: unknown) => { const id = getDraggableId(event) @@ -189,7 +189,13 @@ export function TerminalPanel() { > <Tabs.List class="h-10"> <SortableProvider ids={ids()}> - <For each={all()}>{(pty) => <SortableTerminalTab terminal={pty} onClose={close} />}</For> + <For each={ids()}> + {(id) => ( + <Show when={byId().get(id)}> + {(pty) => <SortableTerminalTab terminal={pty()} onClose={close} />} + </Show> + )} + </For> </SortableProvider> <div class="h-full flex items-center justify-center"> <TooltipKeybind |
