Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/agentHost/common/agent.ts
13395 views
1
/*---------------------------------------------------------------------------------------------
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 { Event } from '../../../base/common/event.js';
7
import { DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';
8
import { IChannelClient } from '../../../base/parts/ipc/common/ipc.js';
9
10
// Agent host process starter and connection abstractions.
11
// Used by the main process to spawn and connect to the agent host utility process.
12
13
export interface IAgentHostConnection {
14
readonly client: IChannelClient;
15
readonly store: DisposableStore;
16
readonly onDidProcessExit: Event<{ code: number; signal: string }>;
17
}
18
19
export interface IAgentHostStarter extends IDisposable {
20
readonly onRequestConnection?: Event<void>;
21
readonly onWillShutdown?: Event<void>;
22
23
/**
24
* Creates the agent host utility process and connects to it.
25
*/
26
start(): Promise<IAgentHostConnection>;
27
}
28
29