Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/chat/test/browser/mockChatWidget.ts
3296 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 { URI } from '../../../../../base/common/uri.js';
8
import { IChatWidget, IChatWidgetService } from '../../browser/chat.js';
9
import { ChatAgentLocation } from '../../common/constants.js';
10
11
export class MockChatWidgetService implements IChatWidgetService {
12
readonly onDidAddWidget: Event<IChatWidget> = Event.None;
13
14
readonly _serviceBrand: undefined;
15
16
/**
17
* Returns the most recently focused widget if any.
18
*/
19
readonly lastFocusedWidget: IChatWidget | undefined;
20
21
getWidgetByInputUri(uri: URI): IChatWidget | undefined {
22
return undefined;
23
}
24
25
getWidgetBySessionId(sessionId: string): IChatWidget | undefined {
26
return undefined;
27
}
28
29
getWidgetsByLocations(location: ChatAgentLocation): ReadonlyArray<IChatWidget> {
30
return [];
31
}
32
33
getAllWidgets(): ReadonlyArray<IChatWidget> {
34
throw new Error('Method not implemented.');
35
}
36
}
37
38