feat: add terminal broadcast, context menu, and shell close

Complete multi-pane broadcast, standard terminal right-click actions, batch host selection with progress, and native ssh_close_shell so closing a pane tears down the remote shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Logan.LiandCursor committed 2026-08-05 19:53:39 +08:00
1 parent 494ef6b9d0
commit 9ce71795b8
38 files changed
+1437 -186

No files matched your search

+11 -1
View File
@@ -1,5 +1,8 @@
import { describe, expect, it } from 'vitest'
import { resolveTerminalInputTargets } from '../../src/utils/terminalPanes'
import {
resolveTerminalInputTargets,
shouldBroadcastTerminalInput,
} from '../../src/utils/terminalPanes'
const panes = [
{ id: 'left', shellId: 'shell-1' },
@@ -23,4 +26,11 @@ describe('terminal pane input routing', () => {
expect(resolveTerminalInputTargets(panes, 'starting', false)).toEqual([])
expect(resolveTerminalInputTargets(panes, 'missing', false)).toEqual([])
})
it('never broadcasts input originating from a local terminal', () => {
expect(shouldBroadcastTerminalInput(true, true, 'local')).toBe(false)
expect(shouldBroadcastTerminalInput(true, true, 'ssh-connection')).toBe(false)
expect(shouldBroadcastTerminalInput(true, false, 'ssh-connection')).toBe(true)
expect(shouldBroadcastTerminalInput(true, false, null)).toBe(false)
})
})