@codingame/monaco-vscode-rollup-vsix-plugin 8.0.3 → 9.0.0
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 +19 -5
- package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +1 -85
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +42 -13
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +5 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -17
- package/vscode-dts/vscode.proposed.contribChatParticipantDetection.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts +8 -0
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +6 -3
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +1 -0
- package/vscode-dts/vscode.proposed.fileSearchProviderNew.d.ts +7 -6
- package/vscode-dts/vscode.proposed.findFiles2New.d.ts +36 -11
- package/vscode-dts/vscode.proposed.findTextInFilesNew.d.ts +51 -30
- package/vscode-dts/vscode.proposed.interactive.d.ts +0 -2
- package/vscode-dts/vscode.proposed.lmTools.d.ts +119 -20
- package/vscode-dts/vscode.proposed.notebookReplDocument.d.ts +20 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +1 -0
- package/vscode-dts/vscode.proposed.testObserver.d.ts +6 -0
- package/vscode-dts/vscode.proposed.textSearchCompleteNew.d.ts +1 -9
- package/vscode-dts/vscode.proposed.textSearchProviderNew.d.ts +58 -17
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +0 -70
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +0 -338
- package/vscode-dts/vscode.proposed.testMessageStackTrace.d.ts +0 -38
package/package.json
CHANGED
package/rollup-vsix-plugin.js
CHANGED
|
@@ -831,8 +831,23 @@ 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
|
-
|
|
835
|
-
|
|
834
|
+
/*
|
|
835
|
+
* This module exists so that the AMD build of the monaco editor can replace this with an async loader plugin.
|
|
836
|
+
* If you add new functions to this module make sure that they are also provided in the AMD build of the monaco editor.
|
|
837
|
+
*/
|
|
838
|
+
function getNLSMessages() {
|
|
839
|
+
return globalThis._VSCODE_NLS_MESSAGES;
|
|
840
|
+
}
|
|
841
|
+
function getNLSLanguage() {
|
|
842
|
+
return globalThis._VSCODE_NLS_LANGUAGE;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/*---------------------------------------------------------------------------------------------
|
|
846
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
847
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
848
|
+
*--------------------------------------------------------------------------------------------*/
|
|
849
|
+
// eslint-disable-next-line local/code-import-patterns
|
|
850
|
+
const isPseudo = getNLSLanguage() === 'pseudo' || (typeof document !== 'undefined' && document.location && document.location.hash.indexOf('pseudo=true') >= 0);
|
|
836
851
|
function _format(message, args) {
|
|
837
852
|
let result;
|
|
838
853
|
if (args.length === 0) {
|
|
@@ -873,8 +888,7 @@ function localize(data /* | number when built */, message /* | null when built *
|
|
|
873
888
|
* depending on the target context.
|
|
874
889
|
*/
|
|
875
890
|
function lookupMessage(index, fallback) {
|
|
876
|
-
|
|
877
|
-
const message = globalThis._VSCODE_NLS_MESSAGES?.[index];
|
|
891
|
+
const message = getNLSMessages()?.[index];
|
|
878
892
|
if (typeof message !== 'string') {
|
|
879
893
|
if (typeof fallback === 'string') {
|
|
880
894
|
return fallback;
|
|
@@ -7830,7 +7844,7 @@ function read(stream) {
|
|
|
7830
7844
|
});
|
|
7831
7845
|
}
|
|
7832
7846
|
async function readVsix(file) {
|
|
7833
|
-
return new Promise((resolve) => {
|
|
7847
|
+
return await new Promise((resolve) => {
|
|
7834
7848
|
const files = {};
|
|
7835
7849
|
yauzl.open(file, { lazyEntries: true }, (err, zipfile) => {
|
|
7836
7850
|
if (err != null)
|
|
@@ -4,90 +4,6 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
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
7
|
/**
|
|
92
8
|
* An AITextSearchProvider provides additional AI text search results in the workspace.
|
|
93
9
|
*/
|
|
@@ -101,7 +17,7 @@ declare module 'vscode' {
|
|
|
101
17
|
* @param progress A progress callback that must be invoked for all results.
|
|
102
18
|
* @param token A cancellation token.
|
|
103
19
|
*/
|
|
104
|
-
provideAITextSearchResults(query: string, options:
|
|
20
|
+
provideAITextSearchResults(query: string, options: TextSearchProviderOptions, progress: Progress<TextSearchResultNew>, token: CancellationToken): ProviderResult<TextSearchCompleteNew>;
|
|
105
21
|
}
|
|
106
22
|
|
|
107
23
|
export namespace workspace {
|
|
@@ -70,7 +70,7 @@ declare module 'vscode' {
|
|
|
70
70
|
constructor(value: Uri, license: string, snippet: string);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseDetectedParticipantPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2;
|
|
73
|
+
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseDetectedParticipantPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart;
|
|
74
74
|
|
|
75
75
|
export class ChatResponseWarningPart {
|
|
76
76
|
value: MarkdownString;
|
|
@@ -87,7 +87,7 @@ declare module 'vscode' {
|
|
|
87
87
|
/**
|
|
88
88
|
* The reference target.
|
|
89
89
|
*/
|
|
90
|
-
value: Uri | Location | { variableName: string; value?: Uri | Location };
|
|
90
|
+
value: Uri | Location | { variableName: string; value?: Uri | Location } | string;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* The icon for the reference.
|
|
@@ -109,7 +109,7 @@ declare module 'vscode' {
|
|
|
109
109
|
* @param value A uri or location
|
|
110
110
|
* @param iconPath Icon for the reference shown in UI
|
|
111
111
|
*/
|
|
112
|
-
constructor(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | {
|
|
112
|
+
constructor(value: Uri | Location | { variableName: string; value?: Uri | Location } | string, iconPath?: Uri | ThemeIcon | {
|
|
113
113
|
/**
|
|
114
114
|
* The icon path for the light theme.
|
|
115
115
|
*/
|
|
@@ -121,6 +121,14 @@ declare module 'vscode' {
|
|
|
121
121
|
}, options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } });
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
export class ChatResponseMovePart {
|
|
125
|
+
|
|
126
|
+
readonly uri: Uri;
|
|
127
|
+
readonly range: Range;
|
|
128
|
+
|
|
129
|
+
constructor(uri: Uri, range: Range);
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
export interface ChatResponseStream {
|
|
125
133
|
|
|
126
134
|
/**
|
|
@@ -161,7 +169,7 @@ declare module 'vscode' {
|
|
|
161
169
|
|
|
162
170
|
reference(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | { light: Uri; dark: Uri }): void;
|
|
163
171
|
|
|
164
|
-
reference2(value: Uri | Location | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | { light: Uri; dark: Uri }, options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } }): void;
|
|
172
|
+
reference2(value: Uri | Location | string | { variableName: string; value?: Uri | Location }, iconPath?: Uri | ThemeIcon | { light: Uri; dark: Uri }, options?: { status?: { description: string; kind: ChatResponseReferencePartStatusKind } }): void;
|
|
165
173
|
|
|
166
174
|
codeCitation(value: Uri, license: string, snippet: string): void;
|
|
167
175
|
|
|
@@ -188,8 +196,6 @@ declare module 'vscode' {
|
|
|
188
196
|
* The `data` for any confirmations that were rejected
|
|
189
197
|
*/
|
|
190
198
|
rejectedConfirmationData?: any[];
|
|
191
|
-
|
|
192
|
-
requestedTools?: string[];
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
// TODO@API fit this into the stream
|
|
@@ -224,19 +230,36 @@ declare module 'vscode' {
|
|
|
224
230
|
|
|
225
231
|
export type ChatExtendedRequestHandler = (request: ChatRequest, context: ChatContext, response: ChatResponseStream, token: CancellationToken) => ProviderResult<ChatResult | void>;
|
|
226
232
|
|
|
233
|
+
export interface ChatResult {
|
|
234
|
+
nextQuestion?: {
|
|
235
|
+
prompt: string;
|
|
236
|
+
participant?: string;
|
|
237
|
+
command?: string;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
227
241
|
export namespace chat {
|
|
228
242
|
/**
|
|
229
243
|
* Create a chat participant with the extended progress type
|
|
230
244
|
*/
|
|
231
245
|
export function createChatParticipant(id: string, handler: ChatExtendedRequestHandler): ChatParticipant;
|
|
232
246
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
247
|
+
export function registerChatParticipantDetectionProvider(participantDetectionProvider: ChatParticipantDetectionProvider): Disposable;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface ChatParticipantMetadata {
|
|
251
|
+
participant: string;
|
|
252
|
+
command?: string;
|
|
253
|
+
disambiguation: { categoryName: string; description: string; examples: string[] }[];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface ChatParticipantDetectionResult {
|
|
257
|
+
participant: string;
|
|
258
|
+
command?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface ChatParticipantDetectionProvider {
|
|
262
|
+
provideParticipantDetection(chatRequest: ChatRequest, context: ChatContext, options: { participants?: ChatParticipantMetadata[]; location: ChatLocation }, token: CancellationToken): ProviderResult<ChatParticipantDetectionResult>;
|
|
240
263
|
}
|
|
241
264
|
|
|
242
265
|
/*
|
|
@@ -265,6 +288,8 @@ declare module 'vscode' {
|
|
|
265
288
|
codeBlockIndex: number;
|
|
266
289
|
totalCharacters: number;
|
|
267
290
|
newFile?: boolean;
|
|
291
|
+
userAction?: string;
|
|
292
|
+
codeMapper?: string;
|
|
268
293
|
}
|
|
269
294
|
|
|
270
295
|
export interface ChatTerminalAction {
|
|
@@ -307,4 +332,8 @@ declare module 'vscode' {
|
|
|
307
332
|
*/
|
|
308
333
|
readonly name: string;
|
|
309
334
|
}
|
|
335
|
+
|
|
336
|
+
export interface ChatResultFeedback {
|
|
337
|
+
readonly unhelpfulReason?: string;
|
|
338
|
+
}
|
|
310
339
|
}
|
|
@@ -56,6 +56,11 @@ declare module 'vscode' {
|
|
|
56
56
|
*/
|
|
57
57
|
readonly enableCommandDetection: boolean;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* If the chat participant or command was automatically assigned.
|
|
61
|
+
*/
|
|
62
|
+
readonly isParticipantDetected: boolean;
|
|
63
|
+
|
|
59
64
|
/**
|
|
60
65
|
* The location at which the chat is happening. This will always be one of the supported values
|
|
61
66
|
*
|
|
@@ -12,7 +12,7 @@ declare module 'vscode' {
|
|
|
12
12
|
|
|
13
13
|
export interface ChatResponseFragment2 {
|
|
14
14
|
index: number;
|
|
15
|
-
part: LanguageModelChatResponseTextPart |
|
|
15
|
+
part: LanguageModelChatResponseTextPart | LanguageModelChatResponseToolCallPart;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// @API extension ship a d.ts files for their options
|
|
@@ -77,23 +77,6 @@ declare module 'vscode' {
|
|
|
77
77
|
Full = 3
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export interface ChatVariableValue {
|
|
81
|
-
/**
|
|
82
|
-
* The detail level of this chat variable value. If possible, variable resolvers should try to offer shorter values that will consume fewer tokens in an LLM prompt.
|
|
83
|
-
*/
|
|
84
|
-
level: ChatVariableLevel;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* The variable's value, which can be included in an LLM prompt as-is, or the chat participant may decide to read the value and do something else with it.
|
|
88
|
-
*/
|
|
89
|
-
value: string | Uri;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* A description of this value, which could be provided to the LLM as a hint.
|
|
93
|
-
*/
|
|
94
|
-
description?: string;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
80
|
export interface ChatVariableResolverResponseStream {
|
|
98
81
|
/**
|
|
99
82
|
* Push a progress part to this stream. Short-hand for
|
|
@@ -0,0 +1,6 @@
|
|
|
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 `chatParticipantDetection`-contribution point
|
|
@@ -0,0 +1,6 @@
|
|
|
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 `debugCreateConfiguation` menu
|
|
@@ -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/history/title`-menu contribution point
|
|
7
|
+
// https://github.com/microsoft/vscode/issues/226144
|
|
@@ -0,0 +1,8 @@
|
|
|
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 for view container title menus
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/200880 @roblourens
|
|
@@ -21,12 +21,14 @@ declare module 'vscode' {
|
|
|
21
21
|
icon?: Uri;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface ChatTitleProvider {
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* TODO@API Should this take a ChatResult like the followup provider, or just take a new ChatContext that includes the current message as history?
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
provideChatTitle(context: ChatContext, token: CancellationToken): ProviderResult<string>;
|
|
29
|
+
}
|
|
29
30
|
|
|
31
|
+
export interface ChatParticipant {
|
|
30
32
|
/**
|
|
31
33
|
* When true, this participant is invoked when the user submits their query using ctrl/cmd+enter
|
|
32
34
|
* TODO@API name
|
|
@@ -49,6 +51,7 @@ declare module 'vscode' {
|
|
|
49
51
|
helpTextPostfix?: string | MarkdownString;
|
|
50
52
|
|
|
51
53
|
welcomeMessageProvider?: ChatWelcomeMessageProvider;
|
|
54
|
+
titleProvider?: ChatTitleProvider;
|
|
52
55
|
requester?: ChatRequesterInformation;
|
|
53
56
|
}
|
|
54
57
|
}
|
|
@@ -28,6 +28,7 @@ declare module 'vscode' {
|
|
|
28
28
|
* @return An extension or `undefined`.
|
|
29
29
|
*/
|
|
30
30
|
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
|
|
31
|
+
export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: true): Extension<T | undefined> | undefined;
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* All extensions across all extension hosts.
|
|
@@ -10,7 +10,7 @@ declare module 'vscode' {
|
|
|
10
10
|
/**
|
|
11
11
|
* Options that apply to file search.
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface FileSearchProviderOptions {
|
|
14
14
|
folderOptions: {
|
|
15
15
|
/**
|
|
16
16
|
* The root folder to search within.
|
|
@@ -42,11 +42,11 @@ declare module 'vscode' {
|
|
|
42
42
|
*/
|
|
43
43
|
local: boolean;
|
|
44
44
|
/**
|
|
45
|
-
* Use ignore files at the parent directory. If set, {@link
|
|
45
|
+
* Use ignore files at the parent directory. If set, {@link FileSearchProviderOptions.useIgnoreFiles.local} should also be `true`.
|
|
46
46
|
*/
|
|
47
47
|
parent: boolean;
|
|
48
48
|
/**
|
|
49
|
-
* Use global ignore files. If set, {@link
|
|
49
|
+
* Use global ignore files. If set, {@link FileSearchProviderOptions.useIgnoreFiles.local} should also be `true`.
|
|
50
50
|
*/
|
|
51
51
|
global: boolean;
|
|
52
52
|
};
|
|
@@ -54,9 +54,10 @@ declare module 'vscode' {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
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
|
|
57
|
+
* and searches with the same session object can search the same cache. When the object is garbage-collected, the session is complete and the cache can be cleared.
|
|
58
|
+
* Please do not store any references to the session object, except via a weak reference (e.g. `WeakRef` or `WeakMap`).
|
|
58
59
|
*/
|
|
59
|
-
session:
|
|
60
|
+
session: object;
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
63
|
* The maximum number of results to be returned.
|
|
@@ -81,7 +82,7 @@ declare module 'vscode' {
|
|
|
81
82
|
* @param options A set of options to consider while searching files.
|
|
82
83
|
* @param token A cancellation token.
|
|
83
84
|
*/
|
|
84
|
-
provideFileSearchResults(pattern: string, options:
|
|
85
|
+
provideFileSearchResults(pattern: string, options: FileSearchProviderOptions, token: CancellationToken): ProviderResult<Uri[]>;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
export namespace workspace {
|
|
@@ -7,8 +7,19 @@ declare module 'vscode' {
|
|
|
7
7
|
|
|
8
8
|
export interface FindFiles2OptionsNew {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* will be matched against the file paths of
|
|
10
|
+
* An array of {@link GlobPattern GlobPattern} that defines files to exclude.
|
|
11
|
+
* The glob patterns will be matched against the file paths of files relative to their workspace or {@link RelativePattern.baseUri} if applicable.
|
|
12
|
+
*
|
|
13
|
+
* If more than one value is used, the values are combined with a logical AND.
|
|
14
|
+
* For example, consider the following code:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const ab = findFiles(['**/*.js'], {exclude: ['*.ts', '*.js']});
|
|
18
|
+
* const a = findFiles(['**/*.js'], {exclude: ['*.ts']});
|
|
19
|
+
* const b = findFiles(['**/*.js'], {exclude: ['*.js']});
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* In this, `ab` will be the intersection of results from `a` and `b`.
|
|
12
23
|
*/
|
|
13
24
|
exclude?: GlobPattern[];
|
|
14
25
|
|
|
@@ -18,19 +29,21 @@ declare module 'vscode' {
|
|
|
18
29
|
useExcludeSettings?: ExcludeSettingOptions;
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
|
-
* The maximum number of results to search for
|
|
32
|
+
* The maximum number of results to search for. Defaults to 20000 results.
|
|
22
33
|
*/
|
|
23
34
|
maxResults?: number;
|
|
24
35
|
|
|
25
36
|
/**
|
|
26
|
-
* Which file locations
|
|
37
|
+
* Which file locations have ignore (`.gitignore` or `.ignore`) files to follow.
|
|
27
38
|
*
|
|
28
|
-
* When any of these fields are `undefined`,
|
|
29
|
-
*
|
|
30
|
-
* or
|
|
31
|
-
* - follow settings using the value for the corresponding `search.use*IgnoreFiles` settting.
|
|
39
|
+
* When any of these fields are `undefined`, the value will either be assumed (e.g. if only one is valid),
|
|
40
|
+
* or it will follow settings based on the corresponding `search.use*IgnoreFiles` setting.
|
|
32
41
|
*
|
|
33
42
|
* Will log an error if an invalid combination is set.
|
|
43
|
+
*
|
|
44
|
+
* Although `.ignore` files are uncommon, they can be leveraged if there are patterns
|
|
45
|
+
* that should not be known to git, but should be known to the search providers.
|
|
46
|
+
* They should be in the same locations where `.gitignore` files are found, and they follow the same format.
|
|
34
47
|
*/
|
|
35
48
|
useIgnoreFiles?: {
|
|
36
49
|
/**
|
|
@@ -67,9 +80,21 @@ declare module 'vscode' {
|
|
|
67
80
|
* @example
|
|
68
81
|
* findFiles(['**/*.js'], {exclude: ['**/out/**'], useIgnoreFiles: true, maxResults: 10})
|
|
69
82
|
*
|
|
70
|
-
* @param filePattern
|
|
71
|
-
* will be matched against the file paths of
|
|
72
|
-
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
83
|
+
* @param filePattern An array of {@link GlobPattern GlobPattern} that defines the files to search for.
|
|
84
|
+
* The glob patterns will be matched against the file paths of files relative to their workspace or {@link baseUri GlobPattern.baseUri} if applicable.
|
|
85
|
+
* Use a {@link RelativePattern RelativePatten} to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
86
|
+
*
|
|
87
|
+
* If more than one value is used, the values are combined with a logical OR.
|
|
88
|
+
*
|
|
89
|
+
* For example, consider the following code:
|
|
90
|
+
*
|
|
91
|
+
* ```ts
|
|
92
|
+
* const ab = findFiles(['*.ts', '*.js']);
|
|
93
|
+
* const a = findFiles(['**/*.ts']);
|
|
94
|
+
* const b = findFiles(['**/*.js']);
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* In this, `ab` will be the union of results from `a` and `b`.
|
|
73
98
|
* @param options A set of {@link FindFiles2Options FindFiles2Options} that defines where and how to search (e.g. exclude settings).
|
|
74
99
|
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
75
100
|
* @returns A thenable that resolves to an array of resource identifiers. Will return no results if no
|
|
@@ -9,15 +9,38 @@ declare module 'vscode' {
|
|
|
9
9
|
|
|
10
10
|
export interface FindTextInFilesOptionsNew {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* will be matched against the file paths of files relative to their workspace
|
|
14
|
-
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
12
|
+
* An array of {@link GlobPattern GlobPattern} that defines the files to search for.
|
|
13
|
+
* The glob patterns will be matched against the file paths of files relative to their workspace or {@link baseUri GlobPattern.baseUri} if applicable.
|
|
14
|
+
* Use a {@link RelativePattern RelativePattern} to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
15
|
+
*
|
|
16
|
+
* If more than one value is used, the values are combined with a logical OR.
|
|
17
|
+
*
|
|
18
|
+
* For example, consider the following code:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* const ab = findTextInFilesNew('foo', {include: ['*.ts', '*.js']});
|
|
22
|
+
* const a = findTextInFilesNew('foo', {include: ['*.ts']});
|
|
23
|
+
* const b = findTextInFilesNew('foo', {include: ['*.js']});
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* In this, `ab` will be the union of results from `a` and `b`.
|
|
15
27
|
*/
|
|
16
28
|
include?: GlobPattern[];
|
|
17
29
|
|
|
18
30
|
/**
|
|
19
|
-
*
|
|
20
|
-
* will be matched against the file paths of
|
|
31
|
+
* An array of {@link GlobPattern GlobPattern} that defines files to exclude.
|
|
32
|
+
* The glob patterns will be matched against the file paths of files relative to their workspace or {@link RelativePattern.baseUri} if applicable.
|
|
33
|
+
*
|
|
34
|
+
* If more than one value is used, the values are combined with a logical AND.
|
|
35
|
+
* For example, consider the following code:
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* const ab = findTextInFilesNew('foo', {exclude: ['*.ts', '*.js']});
|
|
39
|
+
* const a = findTextInFilesNew('foo', {exclude: ['*.ts']});
|
|
40
|
+
* const b = findTextInFilesNew('foo', {exclude: ['*.js']});
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* In this, `ab` will be the intersection of results from `a` and `b`.
|
|
21
44
|
*/
|
|
22
45
|
exclude?: GlobPattern[];
|
|
23
46
|
|
|
@@ -27,20 +50,21 @@ declare module 'vscode' {
|
|
|
27
50
|
useExcludeSettings?: ExcludeSettingOptions;
|
|
28
51
|
|
|
29
52
|
/**
|
|
30
|
-
* The maximum number of results to search for
|
|
53
|
+
* The maximum number of results to search for. Defaults to 20000 results.
|
|
31
54
|
*/
|
|
32
55
|
maxResults?: number;
|
|
33
56
|
|
|
34
|
-
|
|
35
57
|
/**
|
|
36
|
-
* Which file locations
|
|
58
|
+
* Which file locations have ignore (`.gitignore` or `.ignore`) files to follow.
|
|
37
59
|
*
|
|
38
|
-
* When any of these fields are `undefined`,
|
|
39
|
-
*
|
|
40
|
-
* or
|
|
41
|
-
* - follow settings using the value for the corresponding `search.use*IgnoreFiles` settting.
|
|
60
|
+
* When any of these fields are `undefined`, the value will either be assumed (e.g. if only one is valid),
|
|
61
|
+
* or it will follow settings based on the corresponding `search.use*IgnoreFiles` setting.
|
|
42
62
|
*
|
|
43
63
|
* Will log an error if an invalid combination is set.
|
|
64
|
+
*
|
|
65
|
+
* Although `.ignore` files are uncommon, they can be leveraged if there are patterns
|
|
66
|
+
* that should not be known to git, but should be known to the search providers.
|
|
67
|
+
* They should be in the same locations where `.gitignore` files are found, and they follow the same format.
|
|
44
68
|
*/
|
|
45
69
|
useIgnoreFiles?: {
|
|
46
70
|
/**
|
|
@@ -78,10 +102,10 @@ declare module 'vscode' {
|
|
|
78
102
|
*/
|
|
79
103
|
previewOptions?: {
|
|
80
104
|
/**
|
|
81
|
-
* The maximum number of lines in the preview.
|
|
105
|
+
* The maximum number of lines in the preview of the match itself (not including surrounding context lines).
|
|
82
106
|
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
83
107
|
*/
|
|
84
|
-
|
|
108
|
+
numMatchLines?: number;
|
|
85
109
|
|
|
86
110
|
/**
|
|
87
111
|
* The maximum number of characters included per line.
|
|
@@ -106,25 +130,22 @@ declare module 'vscode' {
|
|
|
106
130
|
complete: Thenable<TextSearchCompleteNew>;
|
|
107
131
|
}
|
|
108
132
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Options for following search.exclude and files.exclude settings.
|
|
135
|
+
*/
|
|
112
136
|
export enum ExcludeSettingOptions {
|
|
113
|
-
|
|
137
|
+
/**
|
|
114
138
|
* Don't use any exclude settings.
|
|
115
139
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
* Use
|
|
119
|
-
* - files.exclude setting
|
|
140
|
+
None = 1,
|
|
141
|
+
/**
|
|
142
|
+
* Use the `files.exclude` setting
|
|
120
143
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* Use
|
|
124
|
-
* - files.exclude setting
|
|
125
|
-
* - search.exclude setting
|
|
144
|
+
FilesExclude = 2,
|
|
145
|
+
/**
|
|
146
|
+
* Use the `files.exclude` and `search.exclude` settings
|
|
126
147
|
*/
|
|
127
|
-
|
|
148
|
+
SearchAndFilesExclude = 3
|
|
128
149
|
}
|
|
129
150
|
|
|
130
151
|
export namespace workspace {
|
|
@@ -133,8 +154,8 @@ declare module 'vscode' {
|
|
|
133
154
|
*
|
|
134
155
|
* Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
135
156
|
* @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.
|
|
137
|
-
* @param callback A callback, called for each result
|
|
157
|
+
* @param options An optional set of query options.
|
|
158
|
+
* @param callback A callback, called for each {@link TextSearchResultNew result}. This can be a direct match, or context that surrounds a match.
|
|
138
159
|
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
139
160
|
* @return A thenable that resolves when the search is complete.
|
|
140
161
|
*/
|