Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/intents/node/testIntent/testInfoStorage.ts
13405 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 { createServiceIdentifier } from '../../../../util/common/services';
7
import { URI } from '../../../../util/vs/base/common/uri';
8
import { Range } from '../../../../vscodeTypes';
9
10
11
export const ITestGenInfoStorage = createServiceIdentifier<ITestGenInfoStorage>('ITestGenInfoStorage');
12
13
export interface ITestGenInfo {
14
uri: URI;
15
target: Range;
16
identifier: string | undefined;
17
}
18
19
/**
20
* Global storage for test generation information that allows data flow between
21
* test gen entry points such as (context menu item and code action) and an inline chat that
22
* are created from those entry points.
23
*/
24
export interface ITestGenInfoStorage {
25
readonly _serviceBrand: undefined;
26
27
sourceFileToTest: ITestGenInfo | undefined;
28
}
29
30
export class TestGenInfoStorage implements ITestGenInfoStorage {
31
declare _serviceBrand: undefined;
32
33
sourceFileToTest = undefined;
34
}
35
36