mirror of
https://github.com/stablyai/orca.git
synced 2026-09-30 00:03:15 +00:00
10 lines
443 B
TypeScript
10 lines
443 B
TypeScript
import type { SshConnectionState } from '../../shared/ssh-types'
|
|
|
|
export function getPublicSshError(status: SshConnectionState['status']): string {
|
|
return status === 'auth-failed' ? 'SSH authentication failed' : 'SSH connection unavailable'
|
|
}
|
|
|
|
export function getPublicSshState(state: SshConnectionState | null): SshConnectionState | null {
|
|
return state ? { ...state, error: state.error ? getPublicSshError(state.status) : null } : null
|
|
}
|