Files
orca/src/main/ipc/ssh-browse.ts
T
OrcaWinandm4air e6af89741f feat(ssh): a paired client can manage the server's own SSH hosts (ssh.target-management.v1) (#27329)
* feat(ssh): manage a paired server's own SSH targets over RPC (ssh.target-management.v1)

* fix(ssh): keep a browsed remote path untrimmed

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
2026-10-10 18:25:54 -07:00

16 lines
572 B
TypeScript

import { ipcMain } from 'electron'
import type { SshConnectionManager } from '../ssh/ssh-connection-manager'
import { browseSshDirectory, type RemoteBrowseResult } from '../ssh/ssh-remote-directory-browse'
export function registerSshBrowseHandler(
getConnectionManager: () => SshConnectionManager | null
): void {
ipcMain.removeHandler('ssh:browseDir')
ipcMain.handle(
'ssh:browseDir',
(_event, args: { targetId: string; dirPath: string }): Promise<RemoteBrowseResult> =>
browseSshDirectory(getConnectionManager(), args.targetId, args.dirPath)
)
}