Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts
3290 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
// version: 2
7
8
declare module 'vscode' {
9
/**
10
* An AITextSearchProvider provides additional AI text search results in the workspace.
11
*/
12
export interface AITextSearchProvider {
13
/**
14
* The name of the AI searcher. Will be displayed as `{name} Results` in the Search View.
15
*/
16
readonly name?: string;
17
18
/**
19
*
20
* Provide results that match the given text pattern.
21
* @param query The parameter for this query.
22
* @param options A set of options to consider while searching.
23
* @param progress A progress callback that must be invoked for all results.
24
* @param token A cancellation token.
25
*/
26
provideAITextSearchResults(query: string, options: TextSearchProviderOptions, progress: Progress<TextSearchResult2>, token: CancellationToken): ProviderResult<TextSearchComplete2>;
27
}
28
29
export namespace workspace {
30
/**
31
* Register an AI text search provider.
32
*
33
* Only one provider can be registered per scheme.
34
*
35
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
36
* @param provider The provider.
37
* @return A {@link Disposable} that unregisters this provider when being disposed.
38
*/
39
export function registerAITextSearchProvider(scheme: string, provider: AITextSearchProvider): Disposable;
40
}
41
}
42
43