2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { URI } from '../../../base/common/uri.js';
7
>
import { IAgentCreateChatOptions, IAgentCreateSessionConfig, IAgentHostInspectInfo, IAgentHostManagedSettingsDiagnostics, IAgentHostManagementService, IAgentHostNetworkDiagnosticsInfo, IAgentHostNetworkFetchResult, IAgentHostSocketInfo, IAgentService, IConnectionTrackerService } from '../common/agentService.js';
8
>
9
>
export class AgentHostManagementService implements IAgentHostManagementService {
10
>
declare readonly _serviceBrand: undefined;
11
>
12
>
constructor(
13
private readonly _agentService: IAgentService,
14
private readonly _connectionTrackerService: IConnectionTrackerService,
15
) { }
17
>
createSessionWithExtensions(config: IAgentCreateSessionConfig): Promise<URI> {
18
return this._agentService.createSession(config);
19
}
21
>
createChatWithExtensions(session: URI, chat: URI, options: IAgentCreateChatOptions): Promise<void> {
22
return this._agentService.createChat(session, chat, options);
23
}
25
>
shutdown(): Promise<void> {
26
return this._agentService.shutdown();
27
}
29
>
getNetworkDiagnosticsInfo(): Promise<IAgentHostNetworkDiagnosticsInfo> {
30
return this._agentService.getNetworkDiagnosticsInfo();
31
}
33
>
getManagedSettingsDiagnostics(): Promise<readonly IAgentHostManagedSettingsDiagnostics[]> {
34
return this._agentService.getManagedSettingsDiagnostics();
35
}
37
>
diagnosticsFetch(url: string): Promise<IAgentHostNetworkFetchResult> {
38
return this._agentService.diagnosticsFetch(url);
39
}
41
>
startWebSocketServer(): Promise<IAgentHostSocketInfo> {
42
return this._connectionTrackerService.startWebSocketServer();
43
}
45
>
getInspectInfo(tryEnable: boolean): Promise<IAgentHostInspectInfo | undefined> {
46
return this._connectionTrackerService.getInspectInfo(tryEnable);
47
}