Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/sessions/browser/chatDashboardService.ts
13389 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 { DisposableStore } from '../../base/common/lifecycle.js';
7
import { InstantiationType, registerSingleton } from '../../platform/instantiation/common/extensions.js';
8
import { createDecorator } from '../../platform/instantiation/common/instantiation.js';
9
10
export const IChatDashboardService = createDecorator<IChatDashboardService>('chatDashboardService');
11
12
export interface IChatDashboardService {
13
readonly _serviceBrand: undefined;
14
15
/**
16
* Creates a chat status dashboard element embedded in a container div.
17
* Returns `undefined` if the dashboard is not available.
18
*/
19
createDashboardElement(store: DisposableStore): HTMLElement | undefined;
20
}
21
22
class NullChatDashboardService implements IChatDashboardService {
23
readonly _serviceBrand: undefined;
24
createDashboardElement(): HTMLElement | undefined { return undefined; }
25
}
26
27
registerSingleton(IChatDashboardService, NullChatDashboardService, InstantiationType.Delayed);
28
29