@codingame/monaco-vscode-rollup-vsix-plugin 3.2.2 → 4.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 +4 -4
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +261 -0
- package/vscode-dts/vscode.proposed.authLearnMore.d.ts +16 -0
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +49 -78
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +13 -16
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +32 -0
- package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +16 -0
- package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +15 -23
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +10 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +115 -30
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +19 -14
- package/vscode-dts/vscode.proposed.fileComments.d.ts +2 -4
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +18 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +0 -16
- package/vscode-dts/vscode.proposed.languageModels.d.ts +115 -53
- package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +44 -0
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +3 -0
- package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +22 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +2 -0
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +207 -0
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +0 -222
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-rollup-vsix-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"module": "rollup-vsix-plugin.js",
|
|
19
19
|
"types": "rollup-vsix-plugin.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.0.0",
|
|
22
22
|
"css-url-parser": "^1.1.3",
|
|
23
|
-
"memfs": "^4.8.
|
|
23
|
+
"memfs": "^4.8.1",
|
|
24
24
|
"mime-types": "^2.1.35",
|
|
25
|
-
"yauzl": "^
|
|
25
|
+
"yauzl": "^3.0.0"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -0,0 +1,261 @@
|
|
|
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/205317
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The parameters of a query for text search.
|
|
12
|
+
*/
|
|
13
|
+
export interface TextSearchQuery {
|
|
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 common to file and text search
|
|
42
|
+
*/
|
|
43
|
+
export interface SearchOptions {
|
|
44
|
+
/**
|
|
45
|
+
* The root folder to search within.
|
|
46
|
+
*/
|
|
47
|
+
folder: Uri;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Files that match an `includes` glob pattern should be included in the search.
|
|
51
|
+
*/
|
|
52
|
+
includes: GlobString[];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Files that match an `excludes` glob pattern should be excluded from the search.
|
|
56
|
+
*/
|
|
57
|
+
excludes: GlobString[];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Whether external files that exclude files, like .gitignore, should be respected.
|
|
61
|
+
* See the vscode setting `"search.useIgnoreFiles"`.
|
|
62
|
+
*/
|
|
63
|
+
useIgnoreFiles: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether symlinks should be followed while searching.
|
|
67
|
+
* See the vscode setting `"search.followSymlinks"`.
|
|
68
|
+
*/
|
|
69
|
+
followSymlinks: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Whether global files that exclude files, like .gitignore, should be respected.
|
|
73
|
+
* See the vscode setting `"search.useGlobalIgnoreFiles"`.
|
|
74
|
+
*/
|
|
75
|
+
useGlobalIgnoreFiles: boolean;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Whether files in parent directories that exclude files, like .gitignore, should be respected.
|
|
79
|
+
* See the vscode setting `"search.useParentIgnoreFiles"`.
|
|
80
|
+
*/
|
|
81
|
+
useParentIgnoreFiles: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Options to specify the size of the result text preview.
|
|
86
|
+
* These options don't affect the size of the match itself, just the amount of preview text.
|
|
87
|
+
*/
|
|
88
|
+
export interface TextSearchPreviewOptions {
|
|
89
|
+
/**
|
|
90
|
+
* The maximum number of lines in the preview.
|
|
91
|
+
* Only search providers that support multiline search will ever return more than one line in the match.
|
|
92
|
+
*/
|
|
93
|
+
matchLines: number;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The maximum number of characters included per line.
|
|
97
|
+
*/
|
|
98
|
+
charsPerLine: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Options that apply to AI text search.
|
|
103
|
+
*/
|
|
104
|
+
export interface AITextSearchOptions extends SearchOptions {
|
|
105
|
+
/**
|
|
106
|
+
* The maximum number of results to be returned.
|
|
107
|
+
*/
|
|
108
|
+
maxResults: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Options to specify the size of the result text preview.
|
|
112
|
+
*/
|
|
113
|
+
previewOptions?: TextSearchPreviewOptions;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Exclude files larger than `maxFileSize` in bytes.
|
|
117
|
+
*/
|
|
118
|
+
maxFileSize?: number;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Number of lines of context to include before each match.
|
|
122
|
+
*/
|
|
123
|
+
beforeContext?: number;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Number of lines of context to include after each match.
|
|
127
|
+
*/
|
|
128
|
+
afterContext?: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* A message regarding a completed search.
|
|
135
|
+
*/
|
|
136
|
+
export interface TextSearchCompleteMessage {
|
|
137
|
+
/**
|
|
138
|
+
* Markdown text of the message.
|
|
139
|
+
*/
|
|
140
|
+
text: string;
|
|
141
|
+
/**
|
|
142
|
+
* Whether the source of the message is trusted, command links are disabled for untrusted message sources.
|
|
143
|
+
* Messaged are untrusted by default.
|
|
144
|
+
*/
|
|
145
|
+
trusted?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* The message type, this affects how the message will be rendered.
|
|
148
|
+
*/
|
|
149
|
+
type: TextSearchCompleteMessageType;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Information collected when text search is complete.
|
|
154
|
+
*/
|
|
155
|
+
export interface TextSearchComplete {
|
|
156
|
+
/**
|
|
157
|
+
* Whether the search hit the limit on the maximum number of search results.
|
|
158
|
+
* `maxResults` on {@linkcode AITextSearchOptions} specifies the max number of results.
|
|
159
|
+
* - If exactly that number of matches exist, this should be false.
|
|
160
|
+
* - If `maxResults` matches are returned and more exist, this should be true.
|
|
161
|
+
* - If search hits an internal limit which is less than `maxResults`, this should be true.
|
|
162
|
+
*/
|
|
163
|
+
limitHit?: boolean;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Additional information regarding the state of the completed search.
|
|
167
|
+
*
|
|
168
|
+
* Messages with "Information" style support links in markdown syntax:
|
|
169
|
+
* - Click to [run a command](command:workbench.action.OpenQuickPick)
|
|
170
|
+
* - Click to [open a website](https://aka.ms)
|
|
171
|
+
*
|
|
172
|
+
* Commands may optionally return { triggerSearch: true } to signal to the editor that the original search should run be again.
|
|
173
|
+
*/
|
|
174
|
+
message?: TextSearchCompleteMessage | TextSearchCompleteMessage[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* A preview of the text result.
|
|
179
|
+
*/
|
|
180
|
+
export interface TextSearchMatchPreview {
|
|
181
|
+
/**
|
|
182
|
+
* The matching lines of text, or a portion of the matching line that contains the match.
|
|
183
|
+
*/
|
|
184
|
+
text: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The Range within `text` corresponding to the text of the match.
|
|
188
|
+
* The number of matches must match the TextSearchMatch's range property.
|
|
189
|
+
*/
|
|
190
|
+
matches: Range | Range[];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* A match from a text search
|
|
195
|
+
*/
|
|
196
|
+
export interface TextSearchMatch {
|
|
197
|
+
/**
|
|
198
|
+
* The uri for the matching document.
|
|
199
|
+
*/
|
|
200
|
+
uri: Uri;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The range of the match within the document, or multiple ranges for multiple matches.
|
|
204
|
+
*/
|
|
205
|
+
ranges: Range | Range[];
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* A preview of the text match.
|
|
209
|
+
*/
|
|
210
|
+
preview: TextSearchMatchPreview;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A line of context surrounding a TextSearchMatch.
|
|
215
|
+
*/
|
|
216
|
+
export interface TextSearchContext {
|
|
217
|
+
/**
|
|
218
|
+
* The uri for the matching document.
|
|
219
|
+
*/
|
|
220
|
+
uri: Uri;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* One line of text.
|
|
224
|
+
* previewOptions.charsPerLine applies to this
|
|
225
|
+
*/
|
|
226
|
+
text: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The line number of this line of context.
|
|
230
|
+
*/
|
|
231
|
+
lineNumber: number;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* An AITextSearchProvider provides additional AI text search results in the workspace.
|
|
237
|
+
*/
|
|
238
|
+
export interface AITextSearchProvider {
|
|
239
|
+
/**
|
|
240
|
+
* Provide results that match the given text pattern.
|
|
241
|
+
* @param query The parameter for this query.
|
|
242
|
+
* @param options A set of options to consider while searching.
|
|
243
|
+
* @param progress A progress callback that must be invoked for all results.
|
|
244
|
+
* @param token A cancellation token.
|
|
245
|
+
*/
|
|
246
|
+
provideAITextSearchResults(query: string, options: AITextSearchOptions, progress: Progress<TextSearchResult>, token: CancellationToken): ProviderResult<TextSearchComplete>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export namespace workspace {
|
|
250
|
+
/**
|
|
251
|
+
* Register an AI text search provider.
|
|
252
|
+
*
|
|
253
|
+
* Only one provider can be registered per scheme.
|
|
254
|
+
*
|
|
255
|
+
* @param scheme The provider will be invoked for workspace folders that have this file scheme.
|
|
256
|
+
* @param provider The provider.
|
|
257
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
258
|
+
*/
|
|
259
|
+
export function registerAITextSearchProvider(scheme: string, provider: AITextSearchProvider): Disposable;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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/206587
|
|
9
|
+
|
|
10
|
+
export interface AuthenticationForceNewSessionOptions {
|
|
11
|
+
/**
|
|
12
|
+
* An optional Uri to open in the browser to learn more about this authentication request.
|
|
13
|
+
*/
|
|
14
|
+
learnMore?: Uri;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -21,21 +21,21 @@ declare module 'vscode' {
|
|
|
21
21
|
readonly prompt: string;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* The
|
|
24
|
+
* The id of the chat participant and contributing extension to which this request was directed.
|
|
25
25
|
*/
|
|
26
|
-
readonly participant:
|
|
26
|
+
readonly participant: string;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* The name of the {@link ChatCommand command} that was selected for this request.
|
|
30
30
|
*/
|
|
31
|
-
readonly command
|
|
31
|
+
readonly command?: string;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The variables that were referenced in this message.
|
|
35
35
|
*/
|
|
36
36
|
readonly variables: ChatResolvedVariable[];
|
|
37
37
|
|
|
38
|
-
private constructor(prompt: string, command: string | undefined, variables: ChatResolvedVariable[], participant:
|
|
38
|
+
private constructor(prompt: string, command: string | undefined, variables: ChatResolvedVariable[], participant: string);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -54,16 +54,16 @@ declare module 'vscode' {
|
|
|
54
54
|
readonly result: ChatResult;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* The
|
|
57
|
+
* The id of the chat participant and contributing extension that this response came from.
|
|
58
58
|
*/
|
|
59
|
-
readonly participant:
|
|
59
|
+
readonly participant: string;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* The name of the command that this response came from.
|
|
63
63
|
*/
|
|
64
64
|
readonly command?: string;
|
|
65
65
|
|
|
66
|
-
private constructor(response: ReadonlyArray<ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>, result: ChatResult, participant:
|
|
66
|
+
private constructor(response: ReadonlyArray<ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>, result: ChatResult, participant: string);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export interface ChatContext {
|
|
@@ -143,49 +143,6 @@ declare module 'vscode' {
|
|
|
143
143
|
readonly kind: ChatResultFeedbackKind;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export interface ChatCommand {
|
|
147
|
-
/**
|
|
148
|
-
* A short name by which this command is referred to in the UI, e.g. `fix` or
|
|
149
|
-
* `explain` for commands that fix an issue or explain code.
|
|
150
|
-
*
|
|
151
|
-
* **Note**: The name should be unique among the commands provided by this participant.
|
|
152
|
-
*/
|
|
153
|
-
readonly name: string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Human-readable description explaining what this command does.
|
|
157
|
-
*/
|
|
158
|
-
readonly description: string;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* When the user clicks this command in `/help`, this text will be submitted to this command
|
|
162
|
-
*/
|
|
163
|
-
readonly sampleRequest?: string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Whether executing the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message.
|
|
167
|
-
*/
|
|
168
|
-
readonly isSticky?: boolean;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* A ChatCommandProvider returns {@link ChatCommands commands} that can be invoked on a chat participant using `/`. For example, `@participant /command`.
|
|
173
|
-
* These can be used as shortcuts to let the user explicitly invoke different functionalities provided by the participant.
|
|
174
|
-
*/
|
|
175
|
-
export interface ChatCommandProvider {
|
|
176
|
-
/**
|
|
177
|
-
* Returns a list of commands that its participant is capable of handling. A command
|
|
178
|
-
* can be selected by the user and will then be passed to the {@link ChatRequestHandler handler}
|
|
179
|
-
* via the {@link ChatRequest.command command} property.
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* @param token A cancellation token.
|
|
183
|
-
* @returns A list of commands. The lack of a result can be signaled by returning `undefined`, `null`, or
|
|
184
|
-
* an empty array.
|
|
185
|
-
*/
|
|
186
|
-
provideCommands(context: ChatContext, token: CancellationToken): ProviderResult<ChatCommand[]>;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
146
|
/**
|
|
190
147
|
* A followup question suggested by the participant.
|
|
191
148
|
*/
|
|
@@ -201,7 +158,7 @@ declare module 'vscode' {
|
|
|
201
158
|
label?: string;
|
|
202
159
|
|
|
203
160
|
/**
|
|
204
|
-
* By default, the followup goes to the same participant/command. But this property can be set to invoke a different participant.
|
|
161
|
+
* By default, the followup goes to the same participant/command. But this property can be set to invoke a different participant by ID.
|
|
205
162
|
* Followups can only invoke a participant that was contributed by the same extension.
|
|
206
163
|
*/
|
|
207
164
|
participant?: string;
|
|
@@ -221,13 +178,13 @@ declare module 'vscode' {
|
|
|
221
178
|
* @param result This instance has the same properties as the result returned from the participant callback, including `metadata`, but is not the same instance.
|
|
222
179
|
* @param token A cancellation token.
|
|
223
180
|
*/
|
|
224
|
-
provideFollowups(result: ChatResult, token: CancellationToken): ProviderResult<ChatFollowup[]>;
|
|
181
|
+
provideFollowups(result: ChatResult, context: ChatContext, token: CancellationToken): ProviderResult<ChatFollowup[]>;
|
|
225
182
|
}
|
|
226
183
|
|
|
227
184
|
/**
|
|
228
185
|
* A chat request handler is a callback that will be invoked when a request is made to a chat participant.
|
|
229
186
|
*/
|
|
230
|
-
export type ChatRequestHandler = (request: ChatRequest, context: ChatContext, response: ChatResponseStream, token: CancellationToken) => ProviderResult<ChatResult>;
|
|
187
|
+
export type ChatRequestHandler = (request: ChatRequest, context: ChatContext, response: ChatResponseStream, token: CancellationToken) => ProviderResult<ChatResult | void>;
|
|
231
188
|
|
|
232
189
|
/**
|
|
233
190
|
* A chat participant can be invoked by the user in a chat session, using the `@` prefix. When it is invoked, it handles the chat request and is solely
|
|
@@ -235,14 +192,9 @@ declare module 'vscode' {
|
|
|
235
192
|
*/
|
|
236
193
|
export interface ChatParticipant {
|
|
237
194
|
/**
|
|
238
|
-
*
|
|
239
|
-
*/
|
|
240
|
-
readonly name: string;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* A human-readable description explaining what this participant does.
|
|
195
|
+
* A unique ID for this participant.
|
|
244
196
|
*/
|
|
245
|
-
|
|
197
|
+
readonly id: string;
|
|
246
198
|
|
|
247
199
|
/**
|
|
248
200
|
* Icon for the participant shown in UI.
|
|
@@ -263,11 +215,6 @@ declare module 'vscode' {
|
|
|
263
215
|
*/
|
|
264
216
|
requestHandler: ChatRequestHandler;
|
|
265
217
|
|
|
266
|
-
/**
|
|
267
|
-
* This provider will be called to retrieve the participant's commands.
|
|
268
|
-
*/
|
|
269
|
-
commandProvider?: ChatCommandProvider;
|
|
270
|
-
|
|
271
218
|
/**
|
|
272
219
|
* This provider will be called once after each request to retrieve suggested followup questions.
|
|
273
220
|
*/
|
|
@@ -278,11 +225,6 @@ declare module 'vscode' {
|
|
|
278
225
|
*/
|
|
279
226
|
sampleRequest?: string;
|
|
280
227
|
|
|
281
|
-
/**
|
|
282
|
-
* Whether invoking the participant puts the chat into a persistent mode, where the participant is automatically added to the chat input for the next message.
|
|
283
|
-
*/
|
|
284
|
-
isSticky?: boolean;
|
|
285
|
-
|
|
286
228
|
/**
|
|
287
229
|
* An event that fires whenever feedback for a result is received, e.g. when a user up- or down-votes
|
|
288
230
|
* a result.
|
|
@@ -316,17 +258,42 @@ declare module 'vscode' {
|
|
|
316
258
|
* *Note* that the indices take the leading `#`-character into account which means they can
|
|
317
259
|
* used to modify the prompt as-is.
|
|
318
260
|
*/
|
|
319
|
-
readonly range
|
|
261
|
+
readonly range?: [start: number, end: number];
|
|
320
262
|
|
|
321
263
|
// TODO@API decouple of resolve API, use `value: string | Uri | (maybe) unknown?`
|
|
264
|
+
/**
|
|
265
|
+
* The values of the variable. Can be an empty array if the variable doesn't currently have a value.
|
|
266
|
+
*/
|
|
322
267
|
readonly values: ChatVariableValue[];
|
|
323
268
|
}
|
|
324
269
|
|
|
270
|
+
/**
|
|
271
|
+
* The location at which the chat is happening.
|
|
272
|
+
*/
|
|
273
|
+
export enum ChatLocation {
|
|
274
|
+
/**
|
|
275
|
+
* The chat panel
|
|
276
|
+
*/
|
|
277
|
+
Panel = 1,
|
|
278
|
+
/**
|
|
279
|
+
* Terminal inline chat
|
|
280
|
+
*/
|
|
281
|
+
Terminal = 2,
|
|
282
|
+
/**
|
|
283
|
+
* Notebook inline chat
|
|
284
|
+
*/
|
|
285
|
+
Notebook = 3,
|
|
286
|
+
/**
|
|
287
|
+
* Code editor inline chat
|
|
288
|
+
*/
|
|
289
|
+
Editor = 4
|
|
290
|
+
}
|
|
291
|
+
|
|
325
292
|
export interface ChatRequest {
|
|
326
293
|
/**
|
|
327
294
|
* The prompt as entered by the user.
|
|
328
295
|
*
|
|
329
|
-
* Information about variables used in this request
|
|
296
|
+
* Information about variables used in this request is stored in {@link ChatRequest.variables}.
|
|
330
297
|
*
|
|
331
298
|
* *Note* that the {@link ChatParticipant.name name} of the participant and the {@link ChatCommand.name command}
|
|
332
299
|
* are not part of the prompt.
|
|
@@ -349,6 +316,11 @@ declare module 'vscode' {
|
|
|
349
316
|
*/
|
|
350
317
|
// TODO@API Q? are there implicit variables that are not part of the prompt?
|
|
351
318
|
readonly variables: readonly ChatResolvedVariable[];
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The location at which the chat is happening. This will always be one of the supported values
|
|
322
|
+
*/
|
|
323
|
+
readonly location: ChatLocation;
|
|
352
324
|
}
|
|
353
325
|
|
|
354
326
|
/**
|
|
@@ -415,7 +387,7 @@ declare module 'vscode' {
|
|
|
415
387
|
* @param value A uri or location
|
|
416
388
|
* @returns This stream.
|
|
417
389
|
*/
|
|
418
|
-
reference(value: Uri | Location): ChatResponseStream;
|
|
390
|
+
reference(value: Uri | Location | { variableName: string; value?: Uri | Location }): ChatResponseStream;
|
|
419
391
|
|
|
420
392
|
/**
|
|
421
393
|
* Pushes a part to this stream.
|
|
@@ -453,8 +425,8 @@ declare module 'vscode' {
|
|
|
453
425
|
}
|
|
454
426
|
|
|
455
427
|
export class ChatResponseReferencePart {
|
|
456
|
-
value: Uri | Location;
|
|
457
|
-
constructor(value: Uri | Location);
|
|
428
|
+
value: Uri | Location | { variableName: string; value?: Uri | Location };
|
|
429
|
+
constructor(value: Uri | Location | { variableName: string; value?: Uri | Location });
|
|
458
430
|
}
|
|
459
431
|
|
|
460
432
|
export class ChatResponseCommandButtonPart {
|
|
@@ -473,12 +445,11 @@ declare module 'vscode' {
|
|
|
473
445
|
/**
|
|
474
446
|
* Create a new {@link ChatParticipant chat participant} instance.
|
|
475
447
|
*
|
|
476
|
-
* @param
|
|
477
|
-
* contributing the participant but can collide with names from other extensions.
|
|
448
|
+
* @param id A unique identifier for the participant.
|
|
478
449
|
* @param handler A request handler for the participant.
|
|
479
450
|
* @returns A new chat participant
|
|
480
451
|
*/
|
|
481
|
-
export function createChatParticipant(
|
|
452
|
+
export function createChatParticipant(id: string, handler: ChatRequestHandler): ChatParticipant;
|
|
482
453
|
}
|
|
483
454
|
|
|
484
455
|
/**
|
|
@@ -22,9 +22,18 @@ declare module 'vscode' {
|
|
|
22
22
|
markdownContent: MarkdownString;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Now only used for the "intent detection" API below
|
|
27
|
+
*/
|
|
28
|
+
export interface ChatCommand {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
readonly description: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
// TODO@API fit this into the stream
|
|
26
34
|
export interface ChatDetectedParticipant {
|
|
27
35
|
participant: string;
|
|
36
|
+
// TODO@API validate this against statically-declared slash commands?
|
|
28
37
|
command?: ChatCommand;
|
|
29
38
|
}
|
|
30
39
|
|
|
@@ -158,13 +167,15 @@ declare module 'vscode' {
|
|
|
158
167
|
constructor(label: string | CompletionItemLabel, values: ChatVariableValue[]);
|
|
159
168
|
}
|
|
160
169
|
|
|
161
|
-
export type ChatExtendedRequestHandler = (request: ChatRequest, context: ChatContext, response: ChatExtendedResponseStream, token: CancellationToken) => ProviderResult<ChatResult>;
|
|
170
|
+
export type ChatExtendedRequestHandler = (request: ChatRequest, context: ChatContext, response: ChatExtendedResponseStream, token: CancellationToken) => ProviderResult<ChatResult | void>;
|
|
162
171
|
|
|
163
172
|
export namespace chat {
|
|
164
173
|
/**
|
|
165
174
|
* Create a chat participant with the extended progress type
|
|
166
175
|
*/
|
|
167
|
-
export function createChatParticipant(
|
|
176
|
+
export function createChatParticipant(id: string, handler: ChatExtendedRequestHandler): ChatParticipant;
|
|
177
|
+
|
|
178
|
+
export function createDynamicChatParticipant(id: string, name: string, description: string, handler: ChatExtendedRequestHandler): ChatParticipant;
|
|
168
179
|
}
|
|
169
180
|
|
|
170
181
|
/*
|
|
@@ -231,20 +242,6 @@ declare module 'vscode' {
|
|
|
231
242
|
kind?: string;
|
|
232
243
|
}
|
|
233
244
|
|
|
234
|
-
export interface ChatCommand {
|
|
235
|
-
readonly isSticky2?: {
|
|
236
|
-
/**
|
|
237
|
-
* Indicates that the command should be automatically repopulated.
|
|
238
|
-
*/
|
|
239
|
-
isSticky: true;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* This can be set to a string to use a different placeholder message in the input box when the command has been repopulated.
|
|
243
|
-
*/
|
|
244
|
-
placeholder?: string;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
245
|
export interface ChatVariableResolverResponseStream {
|
|
249
246
|
/**
|
|
250
247
|
* Push a progress part to this stream. Short-hand for
|
|
@@ -16,7 +16,7 @@ declare module 'vscode' {
|
|
|
16
16
|
* Represents a large language model that accepts ChatML messages and produces a streaming response
|
|
17
17
|
*/
|
|
18
18
|
export interface ChatResponseProvider {
|
|
19
|
-
provideLanguageModelResponse2(messages:
|
|
19
|
+
provideLanguageModelResponse2(messages: LanguageModelChatMessage[], options: { [name: string]: any }, extensionId: string, progress: Progress<ChatResponseFragment>, token: CancellationToken): Thenable<any>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface ChatResponseProviderMetadata {
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
// @alexr00 https://github.com/microsoft/vscode/issues/207402
|
|
9
|
+
|
|
10
|
+
export enum CommentThreadApplicability {
|
|
11
|
+
Current = 0,
|
|
12
|
+
Outdated = 1
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CommentThread2 {
|
|
16
|
+
/* @api this is a bit weird for the extension now. The CommentThread is a managed object, which means it listens
|
|
17
|
+
* to when it's properties are set, but not if it's properties are modified. This means that this will not work to update the resolved state
|
|
18
|
+
*
|
|
19
|
+
* thread.state.resolved = CommentThreadState.Resolved;
|
|
20
|
+
*
|
|
21
|
+
* but this will work
|
|
22
|
+
*
|
|
23
|
+
* thread.state = {
|
|
24
|
+
* resolved: CommentThreadState.Resolved
|
|
25
|
+
* applicability: thread.state.applicability
|
|
26
|
+
* };
|
|
27
|
+
*
|
|
28
|
+
* Worth noting that we already have this problem for the `comments` property.
|
|
29
|
+
*/
|
|
30
|
+
state?: CommentThreadState | { resolved?: CommentThreadState; applicability?: CommentThreadApplicability };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
// @alexr00 https://github.com/microsoft/vscode/issues/185551
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Commenting range provider for a {@link CommentController comment controller}.
|
|
12
|
+
*/
|
|
13
|
+
export interface CommentingRangeProvider {
|
|
14
|
+
readonly resourceHints?: { schemes: readonly string[] };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -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 `commentsView/commentThread/context` menu 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 `diffEditor/gutter/*` menus
|