@codingame/monaco-vscode-rollup-vsix-plugin 7.1.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rollup-vsix-plugin.js +38 -16
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +3 -18
- package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +119 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +61 -3
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +26 -0
- package/vscode-dts/vscode.proposed.commentReveal.d.ts +21 -8
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +0 -2
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemChangesMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.fileComments.d.ts +1 -1
- package/vscode-dts/vscode.proposed.fileSearchProviderNew.d.ts +100 -0
- package/vscode-dts/vscode.proposed.findFiles2New.d.ts +80 -0
- package/vscode-dts/vscode.proposed.findTextInFilesNew.d.ts +143 -0
- package/vscode-dts/vscode.proposed.lmTools.d.ts +5 -0
- package/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts +29 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +2 -0
- package/vscode-dts/vscode.proposed.testMessageStackTrace.d.ts +38 -0
- package/vscode-dts/vscode.proposed.testRelatedCode.d.ts +36 -0
- package/vscode-dts/vscode.proposed.textSearchCompleteNew.d.ts +46 -0
- package/vscode-dts/vscode.proposed.textSearchProviderNew.d.ts +234 -0
package/package.json
CHANGED
package/rollup-vsix-plugin.js
CHANGED
|
@@ -831,7 +831,8 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
831
831
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
832
832
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
833
833
|
*--------------------------------------------------------------------------------------------*/
|
|
834
|
-
|
|
834
|
+
// VSCODE_GLOBALS: NLS
|
|
835
|
+
const isPseudo = globalThis._VSCODE_NLS_LANGUAGE === 'pseudo' || (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0);
|
|
835
836
|
function _format(message, args) {
|
|
836
837
|
let result;
|
|
837
838
|
if (args.length === 0) {
|
|
@@ -857,29 +858,50 @@ function _format(message, args) {
|
|
|
857
858
|
}
|
|
858
859
|
return result;
|
|
859
860
|
}
|
|
860
|
-
let translations = {};
|
|
861
861
|
/**
|
|
862
862
|
* @skipMangle
|
|
863
863
|
*/
|
|
864
|
-
function
|
|
865
|
-
|
|
866
|
-
|
|
864
|
+
function localize(data /* | number when built */, message /* | null when built */, ...args) {
|
|
865
|
+
if (typeof data === 'number') {
|
|
866
|
+
return _format(lookupMessage(data, message), args);
|
|
867
|
+
}
|
|
867
868
|
return _format(message, args);
|
|
868
869
|
}
|
|
870
|
+
/**
|
|
871
|
+
* Only used when built: Looks up the message in the global NLS table.
|
|
872
|
+
* This table is being made available as a global through bootstrapping
|
|
873
|
+
* depending on the target context.
|
|
874
|
+
*/
|
|
875
|
+
function lookupMessage(index, fallback) {
|
|
876
|
+
// VSCODE_GLOBALS: NLS
|
|
877
|
+
const message = globalThis._VSCODE_NLS_MESSAGES?.[index];
|
|
878
|
+
if (typeof message !== 'string') {
|
|
879
|
+
if (typeof fallback === 'string') {
|
|
880
|
+
return fallback;
|
|
881
|
+
}
|
|
882
|
+
throw new Error(`!!! NLS MISSING: ${index} !!!`);
|
|
883
|
+
}
|
|
884
|
+
return message;
|
|
885
|
+
}
|
|
869
886
|
|
|
870
|
-
|
|
871
|
-
|
|
887
|
+
/*---------------------------------------------------------------------------------------------
|
|
888
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
889
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
890
|
+
*--------------------------------------------------------------------------------------------*/
|
|
891
|
+
/**
|
|
892
|
+
* Extracted from json.ts to keep json nls free.
|
|
893
|
+
*/
|
|
872
894
|
function getParseErrorMessage(errorCode) {
|
|
873
895
|
switch (errorCode) {
|
|
874
|
-
case ParseErrorCode.InvalidSymbol: return
|
|
875
|
-
case ParseErrorCode.InvalidNumberFormat: return
|
|
876
|
-
case ParseErrorCode.PropertyNameExpected: return
|
|
877
|
-
case ParseErrorCode.ValueExpected: return
|
|
878
|
-
case ParseErrorCode.ColonExpected: return
|
|
879
|
-
case ParseErrorCode.CommaExpected: return
|
|
880
|
-
case ParseErrorCode.CloseBraceExpected: return
|
|
881
|
-
case ParseErrorCode.CloseBracketExpected: return
|
|
882
|
-
case ParseErrorCode.EndOfFileExpected: return
|
|
896
|
+
case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol');
|
|
897
|
+
case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format');
|
|
898
|
+
case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected');
|
|
899
|
+
case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected');
|
|
900
|
+
case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected');
|
|
901
|
+
case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected');
|
|
902
|
+
case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected');
|
|
903
|
+
case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected');
|
|
904
|
+
case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected');
|
|
883
905
|
default:
|
|
884
906
|
return '';
|
|
885
907
|
}
|
|
@@ -34,22 +34,6 @@ interface ICommand {
|
|
|
34
34
|
readonly dark?: string;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
interface IConfiguration {
|
|
38
|
-
/**
|
|
39
|
-
* A title for the current category of settings. This label will be rendered in the Settings editor as a subheading. If the title is the same as the extension display name, then the category will be grouped under the main extension heading.
|
|
40
|
-
*/
|
|
41
|
-
readonly title?: string;
|
|
42
|
-
/**
|
|
43
|
-
* When specified, gives the order of this category of settings relative to other categories.
|
|
44
|
-
*/
|
|
45
|
-
readonly order?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Description of the configuration properties.
|
|
48
|
-
*/
|
|
49
|
-
readonly properties: {
|
|
50
|
-
[key: string]: IJSONSchema;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
37
|
interface IDebugger {
|
|
54
38
|
/**
|
|
55
39
|
* Unique identifier for this debug adapter.
|
|
@@ -1272,7 +1256,7 @@ interface IExtensionContributions {
|
|
|
1272
1256
|
/**
|
|
1273
1257
|
* Contributes configuration settings.
|
|
1274
1258
|
*/
|
|
1275
|
-
readonly configuration?:
|
|
1259
|
+
readonly configuration?: any;
|
|
1276
1260
|
/**
|
|
1277
1261
|
* Contributes debug adapters.
|
|
1278
1262
|
*/
|
|
@@ -1497,6 +1481,7 @@ interface IRelaxedExtensionManifest {
|
|
|
1497
1481
|
bugs?: {
|
|
1498
1482
|
url: string;
|
|
1499
1483
|
};
|
|
1484
|
+
originalEnabledApiProposals?: readonly string[];
|
|
1500
1485
|
enabledApiProposals?: readonly string[];
|
|
1501
1486
|
api?: string;
|
|
1502
1487
|
scripts?: {
|
|
@@ -1506,4 +1491,4 @@ interface IRelaxedExtensionManifest {
|
|
|
1506
1491
|
}
|
|
1507
1492
|
type IExtensionManifest = Readonly<IRelaxedExtensionManifest>;
|
|
1508
1493
|
|
|
1509
|
-
export type { ExtensionUntrustedWorkspaceSupport, ExtensionVirtualWorkspaceSupport, IAuthenticationContribution, IBackgroundMonitor, IBreakpoint, ICheckedProblemPattern, ICodeActionContribution, ICodeActionContributionAction, IColor, IColorTheme, ICommand,
|
|
1494
|
+
export type { ExtensionUntrustedWorkspaceSupport, ExtensionVirtualWorkspaceSupport, IAuthenticationContribution, IBackgroundMonitor, IBreakpoint, ICheckedProblemPattern, ICodeActionContribution, ICodeActionContributionAction, IColor, IColorTheme, ICommand, IDebugVisualizationContribution, IDebugger, IDocumentation, IDocumentationRefactoring, IExtensionCapabilities, IExtensionContributions, IExtensionManifest, IGrammar, IHtmlLanguageParticipant, IIcon, IIconTheme, IInteractiveSession, IJSONValidation, IKeyBinding, ILanguage, ILocalizationContribution, IMenu, INamedMultiLineCheckedProblemPattern, INamedProblemMatcher, INamedProblemPattern, INotebookEntry, INotebookRendererContribution, IProblemPattern, IProductTheme, IRelaxedExtensionManifest, IRemoteHelp, ISearchFileLocationArgs, ISemanticTokenModifiers, ISemanticTokenScopes, ISemanticTokenTypes, ISnippet, IStartEntry, IStatusBarItem, ISubMenu, ITaskDefinitions, ITerminal, ITerminalQuickFix, ITranslation, ITypescriptServerPlugin, IView, IViewContainer, IViewsWelcome, IWalkthrough, IWalkthroughStep, IWatchingPattern, LimitedWorkspaceSupportType, MultiLineCheckedProblemPattern, NamedProblemPatterns, NotebookPreload };
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
/**
|
|
8
|
+
* Options that apply to AI text search.
|
|
9
|
+
*/
|
|
10
|
+
export interface AITextSearchOptionsNew {
|
|
11
|
+
|
|
12
|
+
folderOptions: {
|
|
13
|
+
/**
|
|
14
|
+
* The root folder to search within.
|
|
15
|
+
*/
|
|
16
|
+
folder: Uri;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Files that match an `includes` glob pattern should be included in the search.
|
|
20
|
+
*/
|
|
21
|
+
includes: string[];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Files that match an `excludes` glob pattern should be excluded from the search.
|
|
25
|
+
*/
|
|
26
|
+
excludes: GlobPattern[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether symlinks should be followed while searching.
|
|
30
|
+
* For more info, see the setting description for `search.followSymlinks`.
|
|
31
|
+
*/
|
|
32
|
+
followSymlinks: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Which file locations we should look for ignore (.gitignore or .ignore) files to respect.
|
|
36
|
+
*/
|
|
37
|
+
useIgnoreFiles: {
|
|
38
|
+
/**
|
|
39
|
+
* Use ignore files at the current workspace root.
|
|
40
|
+
*/
|
|
41
|
+
local: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Use ignore files at the parent directory. If set, {@link TextSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
44
|
+
*/
|
|
45
|
+
parent: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Use global ignore files. If set, {@link TextSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
48
|
+
*/
|
|
49
|
+
global: boolean;
|
|
50
|
+
};
|
|
51
|
+
}[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The maximum number of results to be returned.
|
|
55
|
+
*/
|
|
56
|
+
maxResults: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Options to specify the size of the result text preview.
|
|
60
|
+
*/
|
|
61
|
+
previewOptions: {
|
|
62
|
+
/**
|
|
63
|
+
* The maximum number of lines in the preview.
|
|
64
|
+
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
65
|
+
*/
|
|
66
|
+
matchLines: number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The maximum number of characters included per line.
|
|
70
|
+
*/
|
|
71
|
+
charsPerLine: number;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Exclude files larger than `maxFileSize` in bytes.
|
|
76
|
+
*/
|
|
77
|
+
maxFileSize: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Interpret files using this encoding.
|
|
81
|
+
* See the vscode setting `"files.encoding"`
|
|
82
|
+
*/
|
|
83
|
+
encoding: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Number of lines of context to include before and after each match.
|
|
87
|
+
*/
|
|
88
|
+
surroundingContext: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* An AITextSearchProvider provides additional AI text search results in the workspace.
|
|
93
|
+
*/
|
|
94
|
+
export interface AITextSearchProviderNew {
|
|
95
|
+
/**
|
|
96
|
+
* WARNING: VERY EXPERIMENTAL.
|
|
97
|
+
*
|
|
98
|
+
* Provide results that match the given text pattern.
|
|
99
|
+
* @param query The parameter for this query.
|
|
100
|
+
* @param options A set of options to consider while searching.
|
|
101
|
+
* @param progress A progress callback that must be invoked for all results.
|
|
102
|
+
* @param token A cancellation token.
|
|
103
|
+
*/
|
|
104
|
+
provideAITextSearchResults(query: string, options: AITextSearchOptionsNew, progress: Progress<TextSearchResultNew>, token: CancellationToken): ProviderResult<TextSearchCompleteNew>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export namespace workspace {
|
|
108
|
+
/**
|
|
109
|
+
* Register an AI text search provider.
|
|
110
|
+
*
|
|
111
|
+
* Only one provider can be registered per scheme.
|
|
112
|
+
*
|
|
113
|
+
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
114
|
+
* @param provider The provider.
|
|
115
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
116
|
+
*/
|
|
117
|
+
export function registerAITextSearchProviderNew(scheme: string, provider: AITextSearchProviderNew): Disposable;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -59,10 +59,18 @@ declare module 'vscode' {
|
|
|
59
59
|
title: string;
|
|
60
60
|
message: string;
|
|
61
61
|
data: any;
|
|
62
|
-
|
|
62
|
+
buttons?: string[];
|
|
63
|
+
constructor(title: string, message: string, data: any, buttons?: string[]);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
export
|
|
66
|
+
export class ChatResponseCodeCitationPart {
|
|
67
|
+
value: Uri;
|
|
68
|
+
license: string;
|
|
69
|
+
snippet: string;
|
|
70
|
+
constructor(value: Uri, license: string, snippet: string);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseDetectedParticipantPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2;
|
|
66
74
|
|
|
67
75
|
export class ChatResponseWarningPart {
|
|
68
76
|
value: MarkdownString;
|
|
@@ -75,6 +83,44 @@ declare module 'vscode' {
|
|
|
75
83
|
constructor(value: string, task?: (progress: Progress<ChatResponseWarningPart | ChatResponseReferencePart>) => Thenable<string | void>);
|
|
76
84
|
}
|
|
77
85
|
|
|
86
|
+
export class ChatResponseReferencePart2 {
|
|
87
|
+
/**
|
|
88
|
+
* The reference target.
|
|
89
|
+
*/
|
|
90
|
+
value: Uri | Location | { variableName: string; value?: Uri | Location };
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The icon for the reference.
|
|
94
|
+
*/
|
|
95
|
+
iconPath?: Uri | ThemeIcon | {
|
|
96
|
+
/**
|
|
97
|
+
* The icon path for the light theme.
|
|
98
|
+
*/
|
|
99
|
+
light: Uri;
|
|
100
|
+
/**
|
|
101
|
+
* The icon path for the dark theme.
|
|
102
|
+
*/
|
|
103
|
+
dark: Uri;
|
|
104
|
+
};
|
|
105
|
+
options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } };
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Create a new ChatResponseReferencePart.
|
|
109
|
+
* @param value A uri or location
|
|
110
|
+
* @param iconPath Icon for the reference shown in UI
|
|
111
|
+
*/
|
|
112
|
+
constructor(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | {
|
|
113
|
+
/**
|
|
114
|
+
* The icon path for the light theme.
|
|
115
|
+
*/
|
|
116
|
+
light: Uri;
|
|
117
|
+
/**
|
|
118
|
+
* The icon path for the dark theme.
|
|
119
|
+
*/
|
|
120
|
+
dark: Uri;
|
|
121
|
+
}, options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } });
|
|
122
|
+
}
|
|
123
|
+
|
|
78
124
|
export interface ChatResponseStream {
|
|
79
125
|
|
|
80
126
|
/**
|
|
@@ -102,7 +148,7 @@ declare module 'vscode' {
|
|
|
102
148
|
* TODO@API should this be MarkdownString?
|
|
103
149
|
* TODO@API should actually be a more generic function that takes an array of buttons
|
|
104
150
|
*/
|
|
105
|
-
confirmation(title: string, message: string, data: any): void;
|
|
151
|
+
confirmation(title: string, message: string, data: any, buttons?: string[]): void;
|
|
106
152
|
|
|
107
153
|
/**
|
|
108
154
|
* Push a warning to this stream. Short-hand for
|
|
@@ -115,9 +161,19 @@ declare module 'vscode' {
|
|
|
115
161
|
|
|
116
162
|
reference(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | { light: Uri; dark: Uri }): void;
|
|
117
163
|
|
|
164
|
+
reference2(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | { light: Uri; dark: Uri }, options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } }): void;
|
|
165
|
+
|
|
166
|
+
codeCitation(value: Uri, license: string, snippet: string): void;
|
|
167
|
+
|
|
118
168
|
push(part: ExtendedChatResponsePart): void;
|
|
119
169
|
}
|
|
120
170
|
|
|
171
|
+
export enum ChatResponseReferencePartStatusKind {
|
|
172
|
+
Complete = 1,
|
|
173
|
+
Partial = 2,
|
|
174
|
+
Omitted = 3
|
|
175
|
+
}
|
|
176
|
+
|
|
121
177
|
/**
|
|
122
178
|
* Does this piggy-back on the existing ChatRequest, or is it a different type of request entirely?
|
|
123
179
|
* Does it show up in history?
|
|
@@ -132,6 +188,8 @@ declare module 'vscode' {
|
|
|
132
188
|
* The `data` for any confirmations that were rejected
|
|
133
189
|
*/
|
|
134
190
|
rejectedConfirmationData?: any[];
|
|
191
|
+
|
|
192
|
+
requestedTools?: string[];
|
|
135
193
|
}
|
|
136
194
|
|
|
137
195
|
// TODO@API fit this into the stream
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
|
+
// version: 2
|
|
7
|
+
|
|
6
8
|
declare module 'vscode' {
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -27,6 +29,22 @@ declare module 'vscode' {
|
|
|
27
29
|
Editor = 4
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
export class ChatRequestEditorData {
|
|
33
|
+
//TODO@API should be the editor
|
|
34
|
+
document: TextDocument;
|
|
35
|
+
selection: Selection;
|
|
36
|
+
wholeRange: Range;
|
|
37
|
+
|
|
38
|
+
constructor(document: TextDocument, selection: Selection, wholeRange: Range);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class ChatRequestNotebookData {
|
|
42
|
+
//TODO@API should be the editor
|
|
43
|
+
readonly cell: TextDocument;
|
|
44
|
+
|
|
45
|
+
constructor(cell: TextDocument);
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
export interface ChatRequest {
|
|
31
49
|
/**
|
|
32
50
|
* The attempt number of the request. The first request has attempt number 0.
|
|
@@ -40,8 +58,16 @@ declare module 'vscode' {
|
|
|
40
58
|
|
|
41
59
|
/**
|
|
42
60
|
* The location at which the chat is happening. This will always be one of the supported values
|
|
61
|
+
*
|
|
62
|
+
* @deprecated
|
|
43
63
|
*/
|
|
44
64
|
readonly location: ChatLocation;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Information that is specific to the location at which chat is happening, e.g within a document, notebook,
|
|
68
|
+
* or terminal. Will be `undefined` for the chat panel.
|
|
69
|
+
*/
|
|
70
|
+
readonly location2: ChatRequestEditorData | ChatRequestNotebookData | undefined;
|
|
45
71
|
}
|
|
46
72
|
|
|
47
73
|
export interface ChatParticipant {
|
|
@@ -7,26 +7,39 @@ declare module 'vscode' {
|
|
|
7
7
|
|
|
8
8
|
// @alexr00 https://github.com/microsoft/vscode/issues/167253
|
|
9
9
|
|
|
10
|
+
export enum CommentThreadFocus {
|
|
11
|
+
/**
|
|
12
|
+
* Focus the comment editor if the thread supports replying.
|
|
13
|
+
*/
|
|
14
|
+
Reply = 1,
|
|
15
|
+
/**
|
|
16
|
+
* Focus the revealed comment.
|
|
17
|
+
*/
|
|
18
|
+
Comment = 2
|
|
19
|
+
}
|
|
20
|
+
|
|
10
21
|
/**
|
|
11
22
|
* Options to reveal a comment thread in an editor.
|
|
12
23
|
*/
|
|
13
24
|
export interface CommentThreadRevealOptions {
|
|
25
|
+
|
|
14
26
|
/**
|
|
15
|
-
*
|
|
27
|
+
* Where to move the focus to when revealing the comment thread.
|
|
28
|
+
* If undefined, the focus will not be changed.
|
|
16
29
|
*/
|
|
17
|
-
|
|
30
|
+
focus?: CommentThreadFocus;
|
|
31
|
+
}
|
|
18
32
|
|
|
33
|
+
export interface CommentThread2 {
|
|
19
34
|
/**
|
|
20
|
-
*
|
|
35
|
+
* Reveal the comment thread in an editor. If no comment is provided, the first comment in the thread will be revealed.
|
|
21
36
|
*/
|
|
22
|
-
|
|
23
|
-
}
|
|
37
|
+
reveal(comment?: Comment, options?: CommentThreadRevealOptions): Thenable<void>;
|
|
24
38
|
|
|
25
|
-
export interface CommentThread {
|
|
26
39
|
/**
|
|
27
|
-
*
|
|
40
|
+
* Collapse the comment thread in an editor.
|
|
28
41
|
*/
|
|
29
|
-
|
|
42
|
+
hide(): Thenable<void>;
|
|
30
43
|
}
|
|
31
44
|
|
|
32
45
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
// empty placeholder declaration for the `scm/historyItemChanges/title`-menu contribution point
|
|
7
|
+
// https://github.com/microsoft/vscode/issues/201997
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/73524
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Options that apply to file search.
|
|
12
|
+
*/
|
|
13
|
+
export interface FileSearchProviderOptionsNew {
|
|
14
|
+
folderOptions: {
|
|
15
|
+
/**
|
|
16
|
+
* The root folder to search within.
|
|
17
|
+
*/
|
|
18
|
+
folder: Uri;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Files that match an `includes` glob pattern should be included in the search.
|
|
22
|
+
*/
|
|
23
|
+
includes: string[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Files that match an `excludes` glob pattern should be excluded from the search.
|
|
27
|
+
*/
|
|
28
|
+
excludes: GlobPattern[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Whether symlinks should be followed while searching.
|
|
32
|
+
* For more info, see the setting description for `search.followSymlinks`.
|
|
33
|
+
*/
|
|
34
|
+
followSymlinks: boolean;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Which file locations we should look for ignore (.gitignore or .ignore) files to respect.
|
|
38
|
+
*/
|
|
39
|
+
useIgnoreFiles: {
|
|
40
|
+
/**
|
|
41
|
+
* Use ignore files at the current workspace root.
|
|
42
|
+
*/
|
|
43
|
+
local: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Use ignore files at the parent directory. If set, {@link FileSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
46
|
+
*/
|
|
47
|
+
parent: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Use global ignore files. If set, {@link FileSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
50
|
+
*/
|
|
51
|
+
global: boolean;
|
|
52
|
+
};
|
|
53
|
+
}[];
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* An object with a lifespan that matches the session's lifespan. If the provider chooses to, this object can be used as the key for a cache,
|
|
57
|
+
* and searches with the same session object can search the same cache. When the token is cancelled, the session is complete and the cache can be cleared.
|
|
58
|
+
*/
|
|
59
|
+
session: unknown;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The maximum number of results to be returned.
|
|
63
|
+
*/
|
|
64
|
+
maxResults: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
|
|
69
|
+
*
|
|
70
|
+
* A FileSearchProvider is the more powerful of two ways to implement file search in the editor. Use a FileSearchProvider if you wish to search within a folder for
|
|
71
|
+
* all files that match the user's query.
|
|
72
|
+
*
|
|
73
|
+
* The FileSearchProvider will be invoked on every keypress in quickopen.
|
|
74
|
+
*/
|
|
75
|
+
export interface FileSearchProviderNew {
|
|
76
|
+
/**
|
|
77
|
+
* WARNING: VERY EXPERIMENTAL.
|
|
78
|
+
*
|
|
79
|
+
* Provide the set of files that match a certain file path pattern.
|
|
80
|
+
* @param pattern The search pattern to match against file paths.
|
|
81
|
+
* @param options A set of options to consider while searching files.
|
|
82
|
+
* @param token A cancellation token.
|
|
83
|
+
*/
|
|
84
|
+
provideFileSearchResults(pattern: string, options: FileSearchProviderOptionsNew, token: CancellationToken): ProviderResult<Uri[]>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export namespace workspace {
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* Register a search provider.
|
|
91
|
+
*
|
|
92
|
+
* Only one provider can be registered per scheme.
|
|
93
|
+
*
|
|
94
|
+
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
95
|
+
* @param provider The provider.
|
|
96
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
97
|
+
*/
|
|
98
|
+
export function registerFileSearchProviderNew(scheme: string, provider: FileSearchProviderNew): Disposable;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
export interface FindFiles2OptionsNew {
|
|
9
|
+
/**
|
|
10
|
+
* A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
|
|
11
|
+
* will be matched against the file paths of resulting matches relative to their workspace.
|
|
12
|
+
*/
|
|
13
|
+
exclude?: GlobPattern[];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Which settings to follow when searching for files. Defaults to {@link ExcludeSettingOptions.searchAndFilesExclude}.
|
|
17
|
+
*/
|
|
18
|
+
useExcludeSettings?: ExcludeSettingOptions;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The maximum number of results to search for
|
|
22
|
+
*/
|
|
23
|
+
maxResults?: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Which file locations we should look for ignore (.gitignore or .ignore) files to respect.
|
|
27
|
+
*
|
|
28
|
+
* When any of these fields are `undefined`, we will:
|
|
29
|
+
* - assume the value if possible (e.g. if only one is valid)
|
|
30
|
+
* or
|
|
31
|
+
* - follow settings using the value for the corresponding `search.use*IgnoreFiles` settting.
|
|
32
|
+
*
|
|
33
|
+
* Will log an error if an invalid combination is set.
|
|
34
|
+
*/
|
|
35
|
+
useIgnoreFiles?: {
|
|
36
|
+
/**
|
|
37
|
+
* Use ignore files at the current workspace root.
|
|
38
|
+
* May default to `search.useIgnoreFiles` setting if not set.
|
|
39
|
+
*/
|
|
40
|
+
local?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Use ignore files at the parent directory. When set to `true`, {@link FindFiles2OptionsNew.useIgnoreFiles.local} must also be `true`.
|
|
43
|
+
* May default to `search.useParentIgnoreFiles` setting if not set.
|
|
44
|
+
*/
|
|
45
|
+
parent?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Use global ignore files. When set to `true`, {@link FindFiles2OptionsNew.useIgnoreFiles.local} must also be `true`.
|
|
48
|
+
* May default to `search.useGlobalIgnoreFiles` setting if not set.
|
|
49
|
+
*/
|
|
50
|
+
global?: boolean;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Whether symlinks should be followed while searching.
|
|
55
|
+
* Defaults to the value for `search.followSymlinks` in settings.
|
|
56
|
+
* For more info, see the setting description for `search.followSymlinks`.
|
|
57
|
+
*/
|
|
58
|
+
followSymlinks?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export namespace workspace {
|
|
62
|
+
/**
|
|
63
|
+
* WARNING: VERY EXPERIMENTAL.
|
|
64
|
+
*
|
|
65
|
+
* Find files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* findFiles(['**/*.js'], {exclude: ['**/out/**'], useIgnoreFiles: true, maxResults: 10})
|
|
69
|
+
*
|
|
70
|
+
* @param filePattern A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
|
|
71
|
+
* will be matched against the file paths of resulting matches relative to their workspace. Use a {@link RelativePattern relative pattern}
|
|
72
|
+
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
73
|
+
* @param options A set of {@link FindFiles2Options FindFiles2Options} that defines where and how to search (e.g. exclude settings).
|
|
74
|
+
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
75
|
+
* @returns A thenable that resolves to an array of resource identifiers. Will return no results if no
|
|
76
|
+
* {@link workspace.workspaceFolders workspace folders} are opened.
|
|
77
|
+
*/
|
|
78
|
+
export function findFiles2New(filePattern: GlobPattern[], options?: FindFiles2OptionsNew, token?: CancellationToken): Thenable<Uri[]>;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/59924
|
|
9
|
+
|
|
10
|
+
export interface FindTextInFilesOptionsNew {
|
|
11
|
+
/**
|
|
12
|
+
* A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
|
|
13
|
+
* will be matched against the file paths of files relative to their workspace. Use a {@link RelativePattern relative pattern}
|
|
14
|
+
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
15
|
+
*/
|
|
16
|
+
include?: GlobPattern[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
|
|
20
|
+
* will be matched against the file paths of resulting matches relative to their workspace.
|
|
21
|
+
*/
|
|
22
|
+
exclude?: GlobPattern[];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Which settings to follow when searching for files. Defaults to {@link ExcludeSettingOptions.searchAndFilesExclude}.
|
|
26
|
+
*/
|
|
27
|
+
useExcludeSettings?: ExcludeSettingOptions;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The maximum number of results to search for
|
|
31
|
+
*/
|
|
32
|
+
maxResults?: number;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Which file locations we should look for ignore (.gitignore or .ignore) files to respect.
|
|
37
|
+
*
|
|
38
|
+
* When any of these fields are `undefined`, we will:
|
|
39
|
+
* - assume the value if possible (e.g. if only one is valid)
|
|
40
|
+
* or
|
|
41
|
+
* - follow settings using the value for the corresponding `search.use*IgnoreFiles` settting.
|
|
42
|
+
*
|
|
43
|
+
* Will log an error if an invalid combination is set.
|
|
44
|
+
*/
|
|
45
|
+
useIgnoreFiles?: {
|
|
46
|
+
/**
|
|
47
|
+
* Use ignore files at the current workspace root.
|
|
48
|
+
* May default to `search.useIgnoreFiles` setting if not set.
|
|
49
|
+
*/
|
|
50
|
+
local?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Use ignore files at the parent directory. When set to `true`, {@link FindTextInFilesOptionsNew.useIgnoreFiles.local} must be `true`.
|
|
53
|
+
* May default to `search.useParentIgnoreFiles` setting if not set.
|
|
54
|
+
*/
|
|
55
|
+
parent?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Use global ignore files. When set to `true`, {@link FindTextInFilesOptionsNew.useIgnoreFiles.local} must also be `true`.
|
|
58
|
+
* May default to `search.useGlobalIgnoreFiles` setting if not set.
|
|
59
|
+
*/
|
|
60
|
+
global?: boolean;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Whether symlinks should be followed while searching.
|
|
65
|
+
* Defaults to the value for `search.followSymlinks` in settings.
|
|
66
|
+
* For more info, see the setting description for `search.followSymlinks`.
|
|
67
|
+
*/
|
|
68
|
+
followSymlinks?: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Interpret files using this encoding.
|
|
72
|
+
* See the vscode setting `"files.encoding"`
|
|
73
|
+
*/
|
|
74
|
+
encoding?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Options to specify the size of the result text preview.
|
|
78
|
+
*/
|
|
79
|
+
previewOptions?: {
|
|
80
|
+
/**
|
|
81
|
+
* The maximum number of lines in the preview.
|
|
82
|
+
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
83
|
+
*/
|
|
84
|
+
matchLines?: number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The maximum number of characters included per line.
|
|
88
|
+
*/
|
|
89
|
+
charsPerLine?: number;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Number of lines of context to include before and after each match.
|
|
94
|
+
*/
|
|
95
|
+
surroundingContext?: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface FindTextInFilesResponse {
|
|
99
|
+
/**
|
|
100
|
+
* The results of the text search, in batches. To get completion information, wait on the `complete` property.
|
|
101
|
+
*/
|
|
102
|
+
results: AsyncIterable<TextSearchResultNew>;
|
|
103
|
+
/**
|
|
104
|
+
* The text search completion information. This resolves on completion.
|
|
105
|
+
*/
|
|
106
|
+
complete: Thenable<TextSearchCompleteNew>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
* Options for following search.exclude and files.exclude settings.
|
|
111
|
+
*/
|
|
112
|
+
export enum ExcludeSettingOptions {
|
|
113
|
+
/*
|
|
114
|
+
* Don't use any exclude settings.
|
|
115
|
+
*/
|
|
116
|
+
none = 1,
|
|
117
|
+
/*
|
|
118
|
+
* Use:
|
|
119
|
+
* - files.exclude setting
|
|
120
|
+
*/
|
|
121
|
+
filesExclude = 2,
|
|
122
|
+
/*
|
|
123
|
+
* Use:
|
|
124
|
+
* - files.exclude setting
|
|
125
|
+
* - search.exclude setting
|
|
126
|
+
*/
|
|
127
|
+
searchAndFilesExclude = 3
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export namespace workspace {
|
|
131
|
+
/**
|
|
132
|
+
* WARNING: VERY EXPERIMENTAL.
|
|
133
|
+
*
|
|
134
|
+
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
135
|
+
* @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
|
|
136
|
+
* @param options An optional set of query options. Include and exclude patterns, maxResults, etc.
|
|
137
|
+
* @param callback A callback, called for each result
|
|
138
|
+
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
139
|
+
* @return A thenable that resolves when the search is complete.
|
|
140
|
+
*/
|
|
141
|
+
export function findTextInFilesNew(query: TextSearchQueryNew, options?: FindTextInFilesOptionsNew, token?: CancellationToken): FindTextInFilesResponse;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -23,6 +23,11 @@ declare module 'vscode' {
|
|
|
23
23
|
export interface LanguageModelChatRequestOptions {
|
|
24
24
|
// TODO@API this will a heterogeneous array of different types of tools
|
|
25
25
|
tools?: LanguageModelChatFunction[];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Force a specific tool to be used.
|
|
29
|
+
*/
|
|
30
|
+
toolChoice?: string;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
// LM -> USER: function that should be used
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/175662
|
|
9
|
+
|
|
10
|
+
export enum QuickInputButtonLocation {
|
|
11
|
+
/**
|
|
12
|
+
* In the title bar.
|
|
13
|
+
*/
|
|
14
|
+
Title = 1,
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* To the right of the input box.
|
|
18
|
+
*/
|
|
19
|
+
Inline = 2
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface QuickInputButton {
|
|
23
|
+
/**
|
|
24
|
+
* Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.
|
|
25
|
+
* @note This property is ignored if the button was added to a QuickPickItem.
|
|
26
|
+
*/
|
|
27
|
+
location?: QuickInputButtonLocation;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -30,6 +30,7 @@ declare module 'vscode' {
|
|
|
30
30
|
provideHistoryItemChanges(historyItemId: string, historyItemParentId: string | undefined, token: CancellationToken): ProviderResult<SourceControlHistoryItemChange[]>;
|
|
31
31
|
|
|
32
32
|
resolveHistoryItemGroupCommonAncestor(historyItemGroupId1: string, historyItemGroupId2: string | undefined, token: CancellationToken): ProviderResult<{ id: string; ahead: number; behind: number }>;
|
|
33
|
+
resolveHistoryItemGroupCommonAncestor2(historyItemGroupIds: string[], token: CancellationToken): ProviderResult<string>;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export interface SourceControlHistoryOptions {
|
|
@@ -41,6 +42,7 @@ declare module 'vscode' {
|
|
|
41
42
|
export interface SourceControlHistoryItemGroup {
|
|
42
43
|
readonly id: string;
|
|
43
44
|
readonly name: string;
|
|
45
|
+
readonly revision?: string;
|
|
44
46
|
readonly base?: Omit<Omit<SourceControlHistoryItemGroup, 'base'>, 'remote'>;
|
|
45
47
|
readonly remote?: Omit<Omit<SourceControlHistoryItemGroup, 'base'>, 'remote'>;
|
|
46
48
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
export class TestMessage2 extends TestMessage {
|
|
8
|
+
/**
|
|
9
|
+
* The stack trace associated with the message or failure.
|
|
10
|
+
*/
|
|
11
|
+
stackTrace?: TestMessageStackFrame[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class TestMessageStackFrame {
|
|
15
|
+
/**
|
|
16
|
+
* The location of this stack frame. This should be provided as a URI if the
|
|
17
|
+
* location of the call frame can be accessed by the editor.
|
|
18
|
+
*/
|
|
19
|
+
file?: Uri;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Position of the stack frame within the file.
|
|
23
|
+
*/
|
|
24
|
+
position?: Position;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The name of the stack frame, typically a method or function name.
|
|
28
|
+
*/
|
|
29
|
+
label: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param label The name of the stack frame
|
|
33
|
+
* @param file The file URI of the stack frame
|
|
34
|
+
* @param position The position of the stack frame within the file
|
|
35
|
+
*/
|
|
36
|
+
constructor(label: string, file?: Uri, position?: Position);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
export interface TestController {
|
|
8
|
+
/**
|
|
9
|
+
* A provider used for associating code location with tests.
|
|
10
|
+
*/
|
|
11
|
+
relatedCodeProvider?: TestRelatedCodeProvider;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TestRelatedCodeProvider {
|
|
15
|
+
/**
|
|
16
|
+
* Returns the tests related to the given code location. This may be called
|
|
17
|
+
* by the user either explicitly via a "go to test" action, or implicitly
|
|
18
|
+
* when running tests at a cursor position.
|
|
19
|
+
*
|
|
20
|
+
* @param document The document in which the code location is located.
|
|
21
|
+
* @param position The position in the document.
|
|
22
|
+
* @param token A cancellation token.
|
|
23
|
+
* @returns A list of tests related to the position in the code.
|
|
24
|
+
*/
|
|
25
|
+
provideRelatedTests?(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<TestItem[]>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns the code related to the given test case.
|
|
29
|
+
*
|
|
30
|
+
* @param test The test for which to provide related code.
|
|
31
|
+
* @param token A cancellation token.
|
|
32
|
+
* @returns A list of locations related to the test.
|
|
33
|
+
*/
|
|
34
|
+
provideRelatedCode?(test: TestItem, token: CancellationToken): ProviderResult<Location[]>;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
export interface TextSearchCompleteNew {
|
|
8
|
+
/**
|
|
9
|
+
* Additional information regarding the state of the completed search.
|
|
10
|
+
*
|
|
11
|
+
* Messages with "Information" style support links in markdown syntax:
|
|
12
|
+
* - Click to [run a command](command:workbench.action.OpenQuickPick)
|
|
13
|
+
* - Click to [open a website](https://aka.ms)
|
|
14
|
+
*
|
|
15
|
+
* Commands may optionally return { triggerSearch: true } to signal to the editor that the original search should run be again.
|
|
16
|
+
*/
|
|
17
|
+
message?: TextSearchCompleteMessageNew[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A message regarding a completed search.
|
|
22
|
+
*/
|
|
23
|
+
export interface TextSearchCompleteMessageNew {
|
|
24
|
+
/**
|
|
25
|
+
* Markdown text of the message.
|
|
26
|
+
*/
|
|
27
|
+
text: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the source of the message is trusted, command links are disabled for untrusted message sources.
|
|
30
|
+
* Messaged are untrusted by default.
|
|
31
|
+
*/
|
|
32
|
+
trusted?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The message type, this affects how the message will be rendered.
|
|
35
|
+
*/
|
|
36
|
+
type: TextSearchCompleteMessageTypeNew;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Represents the severity of a TextSearchComplete message.
|
|
41
|
+
*/
|
|
42
|
+
export enum TextSearchCompleteMessageTypeNew {
|
|
43
|
+
Information = 1,
|
|
44
|
+
Warning = 2,
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
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
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/59921
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parameters of a query for text search.
|
|
12
|
+
*/
|
|
13
|
+
export interface TextSearchQueryNew {
|
|
14
|
+
/**
|
|
15
|
+
* The text pattern to search for.
|
|
16
|
+
*/
|
|
17
|
+
pattern: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Whether or not `pattern` should match multiple lines of text.
|
|
21
|
+
*/
|
|
22
|
+
isMultiline?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Whether or not `pattern` should be interpreted as a regular expression.
|
|
26
|
+
*/
|
|
27
|
+
isRegExp?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Whether or not the search should be case-sensitive.
|
|
31
|
+
*/
|
|
32
|
+
isCaseSensitive?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Whether or not to search for whole word matches only.
|
|
36
|
+
*/
|
|
37
|
+
isWordMatch?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Options that apply to text search.
|
|
42
|
+
*/
|
|
43
|
+
export interface TextSearchProviderOptionsNew {
|
|
44
|
+
|
|
45
|
+
folderOptions: {
|
|
46
|
+
/**
|
|
47
|
+
* The root folder to search within.
|
|
48
|
+
*/
|
|
49
|
+
folder: Uri;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Files that match an `includes` glob pattern should be included in the search.
|
|
53
|
+
*/
|
|
54
|
+
includes: string[];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Files that match an `excludes` glob pattern should be excluded from the search.
|
|
58
|
+
*/
|
|
59
|
+
excludes: GlobPattern[];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Whether symlinks should be followed while searching.
|
|
63
|
+
* For more info, see the setting description for `search.followSymlinks`.
|
|
64
|
+
*/
|
|
65
|
+
followSymlinks: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Which file locations we should look for ignore (.gitignore or .ignore) files to respect.
|
|
69
|
+
*/
|
|
70
|
+
useIgnoreFiles: {
|
|
71
|
+
/**
|
|
72
|
+
* Use ignore files at the current workspace root.
|
|
73
|
+
*/
|
|
74
|
+
local: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Use ignore files at the parent directory. If set, {@link TextSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
77
|
+
*/
|
|
78
|
+
parent: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Use global ignore files. If set, {@link TextSearchProviderOptionsNew.useIgnoreFiles.local} should also be `true`.
|
|
81
|
+
*/
|
|
82
|
+
global: boolean;
|
|
83
|
+
};
|
|
84
|
+
}[];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The maximum number of results to be returned.
|
|
88
|
+
*/
|
|
89
|
+
maxResults: number;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Options to specify the size of the result text preview.
|
|
93
|
+
*/
|
|
94
|
+
previewOptions: {
|
|
95
|
+
/**
|
|
96
|
+
* The maximum number of lines in the preview.
|
|
97
|
+
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
98
|
+
* Defaults to 100.
|
|
99
|
+
*/
|
|
100
|
+
matchLines: number;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The maximum number of characters included per line.
|
|
104
|
+
* Defaults to 10000.
|
|
105
|
+
*/
|
|
106
|
+
charsPerLine: number;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Exclude files larger than `maxFileSize` in bytes.
|
|
111
|
+
*/
|
|
112
|
+
maxFileSize: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Interpret files using this encoding.
|
|
116
|
+
* See the vscode setting `"files.encoding"`
|
|
117
|
+
*/
|
|
118
|
+
encoding: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Number of lines of context to include before and after each match.
|
|
122
|
+
*/
|
|
123
|
+
surroundingContext: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Information collected when text search is complete.
|
|
128
|
+
*/
|
|
129
|
+
export interface TextSearchCompleteNew {
|
|
130
|
+
/**
|
|
131
|
+
* Whether the search hit the limit on the maximum number of search results.
|
|
132
|
+
* `maxResults` on {@linkcode TextSearchProviderOptionsNew} specifies the max number of results.
|
|
133
|
+
* - If exactly that number of matches exist, this should be false.
|
|
134
|
+
* - If `maxResults` matches are returned and more exist, this should be true.
|
|
135
|
+
* - If search hits an internal limit which is less than `maxResults`, this should be true.
|
|
136
|
+
*/
|
|
137
|
+
limitHit?: boolean;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The main match information for a {@link TextSearchResultNew}.
|
|
142
|
+
*/
|
|
143
|
+
export class TextSearchMatchNew {
|
|
144
|
+
/**
|
|
145
|
+
* @param uri The uri for the matching document.
|
|
146
|
+
* @param ranges The ranges associated with this match.
|
|
147
|
+
* @param previewText The text that is used to preview the match. The highlighted range in `previewText` is specified in `ranges`.
|
|
148
|
+
*/
|
|
149
|
+
constructor(uri: Uri, ranges: { sourceRange: Range; previewRange: Range }[], previewText: string);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The uri for the matching document.
|
|
153
|
+
*/
|
|
154
|
+
uri: Uri;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The ranges associated with this match.
|
|
158
|
+
*/
|
|
159
|
+
ranges: {
|
|
160
|
+
/**
|
|
161
|
+
* The range of the match within the document, or multiple ranges for multiple matches.
|
|
162
|
+
*/
|
|
163
|
+
sourceRange: Range;
|
|
164
|
+
/**
|
|
165
|
+
* The Range within `previewText` corresponding to the text of the match.
|
|
166
|
+
*/
|
|
167
|
+
previewRange: Range;
|
|
168
|
+
}[];
|
|
169
|
+
|
|
170
|
+
previewText: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The potential context information for a {@link TextSearchResultNew}.
|
|
175
|
+
*/
|
|
176
|
+
export class TextSearchContextNew {
|
|
177
|
+
/**
|
|
178
|
+
* @param uri The uri for the matching document.
|
|
179
|
+
* @param text The line of context text.
|
|
180
|
+
* @param lineNumber The line number of this line of context.
|
|
181
|
+
*/
|
|
182
|
+
constructor(uri: Uri, text: string, lineNumber: number);
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The uri for the matching document.
|
|
186
|
+
*/
|
|
187
|
+
uri: Uri;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* One line of text.
|
|
191
|
+
* previewOptions.charsPerLine applies to this
|
|
192
|
+
*/
|
|
193
|
+
text: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The line number of this line of context.
|
|
197
|
+
*/
|
|
198
|
+
lineNumber: number;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* A result payload for a text search, pertaining to matches within a single file.
|
|
203
|
+
*/
|
|
204
|
+
export type TextSearchResultNew = TextSearchMatchNew | TextSearchContextNew;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* A TextSearchProvider provides search results for text results inside files in the workspace.
|
|
208
|
+
*/
|
|
209
|
+
export interface TextSearchProviderNew {
|
|
210
|
+
/**
|
|
211
|
+
* WARNING: VERY EXPERIMENTAL.
|
|
212
|
+
*
|
|
213
|
+
* Provide results that match the given text pattern.
|
|
214
|
+
* @param query The parameters for this query.
|
|
215
|
+
* @param options A set of options to consider while searching.
|
|
216
|
+
* @param progress A progress callback that must be invoked for all results.
|
|
217
|
+
* @param token A cancellation token.
|
|
218
|
+
*/
|
|
219
|
+
provideTextSearchResults(query: TextSearchQueryNew, options: TextSearchProviderOptionsNew, progress: Progress<TextSearchResultNew>, token: CancellationToken): ProviderResult<TextSearchCompleteNew>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export namespace workspace {
|
|
223
|
+
/**
|
|
224
|
+
* Register a text search provider.
|
|
225
|
+
*
|
|
226
|
+
* Only one provider can be registered per scheme.
|
|
227
|
+
*
|
|
228
|
+
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
229
|
+
* @param provider The provider.
|
|
230
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
231
|
+
*/
|
|
232
|
+
export function registerTextSearchProviderNew(scheme: string, provider: TextSearchProviderNew): Disposable;
|
|
233
|
+
}
|
|
234
|
+
}
|