Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
31 lines
962 B
TypeScript
31 lines
962 B
TypeScript
import { getActiveMultiplexer } from '../ssh/ssh-target-registry'
|
|
|
|
export type RemoteWindowsTerminalCapabilities = {
|
|
wslAvailable: boolean
|
|
wslDistros: string[]
|
|
pwshAvailable: boolean
|
|
gitBashAvailable: boolean
|
|
hostPlatform: NodeJS.Platform | null
|
|
}
|
|
|
|
const EMPTY_REMOTE_WINDOWS_TERMINAL_CAPABILITIES: RemoteWindowsTerminalCapabilities = {
|
|
wslAvailable: false,
|
|
wslDistros: [],
|
|
pwshAvailable: false,
|
|
gitBashAvailable: false,
|
|
hostPlatform: null
|
|
}
|
|
|
|
export async function detectRemoteWindowsTerminalCapabilities(args: {
|
|
connectionId: string
|
|
}): Promise<RemoteWindowsTerminalCapabilities> {
|
|
const mux = getActiveMultiplexer(args.connectionId)
|
|
if (!mux || mux.isDisposed()) {
|
|
return EMPTY_REMOTE_WINDOWS_TERMINAL_CAPABILITIES
|
|
}
|
|
const result = (await mux.request('preflight.detectWindowsTerminalCapabilities', {})) as
|
|
| RemoteWindowsTerminalCapabilities
|
|
| undefined
|
|
return result ?? EMPTY_REMOTE_WINDOWS_TERMINAL_CAPABILITIES
|
|
}
|