Path: blob/main/src/vs/platform/agentHost/browser/nullSshRemoteAgentHostService.ts
13394 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Event } from '../../../base/common/event.js';6import { URI } from '../../../base/common/uri.js';7import type { ISSHRemoteAgentHostService, ISSHAgentHostConnection, ISSHAgentHostConfig, ISSHConnectProgress, ISSHResolvedConfig } from '../common/sshRemoteAgentHost.js';89/**10* Null implementation of {@link ISSHRemoteAgentHostService} for browser contexts11* where SSH is not available.12*/13export class NullSSHRemoteAgentHostService implements ISSHRemoteAgentHostService {14declare readonly _serviceBrand: undefined;15readonly onDidChangeConnections = Event.None;16readonly onDidReportConnectProgress: Event<ISSHConnectProgress> = Event.None;17readonly connections: readonly ISSHAgentHostConnection[] = [];1819async connect(_config: ISSHAgentHostConfig): Promise<ISSHAgentHostConnection> {20throw new Error('SSH connections are not supported in the browser.');21}2223async disconnect(_host: string): Promise<void> { }2425async listSSHConfigHosts(): Promise<string[]> {26return [];27}2829async ensureUserSSHConfig(): Promise<URI> {30throw new Error('SSH is not supported in the browser.');31}3233async listSSHConfigFiles(): Promise<URI[]> {34return [];35}3637async resolveSSHConfig(_host: string): Promise<ISSHResolvedConfig> {38throw new Error('SSH is not supported in the browser.');39}4041async reconnect(_sshConfigHost: string, _name: string): Promise<ISSHAgentHostConnection> {42throw new Error('SSH connections are not supported in the browser.');43}44}454647