@codingame/monaco-vscode-api 1.83.14 → 1.83.15
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/api.js +1 -1
- package/contributions.js +36 -0
- package/extensions.d.ts +83 -4
- package/extensions.js +9 -14
- package/lifecycle.js +4 -1
- package/localExtensionHost.js +207 -0
- package/missing-services.js +15 -3
- package/monaco-editor-treemending.patch +966 -955
- package/monaco.js +4 -36
- package/package.json +10 -6
- package/service-override/tools/editor.d.ts +6 -6
- package/services.d.ts +18 -18
- package/services.js +1 -0
- package/vscode/src/vs/base/common/errors.d.ts +1 -8
- package/vscode/src/vs/base/common/uri.d.ts +1 -7
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +564 -11
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +9 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +594 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +307 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +6 -2
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
- package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
- package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
- package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
- package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
- package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
- package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
- package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
- package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
- package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
- package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
- package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
- package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
- package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
- package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
- package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
- package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
- package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
- package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
- package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
- package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
- package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
- package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
- package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
- package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
- package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
- package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
- package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
- package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
- package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
- package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
- package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
- package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
- package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
- package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
- package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
- package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
- package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
- package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
- package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
- package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
- package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
- package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
- package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
- package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
- package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
- package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
- package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
- package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
- package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
- package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
- package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
- package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
- package/vscode.proposed.d.ts +0 -4787
|
@@ -0,0 +1,227 @@
|
|
|
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 InteractiveEditorSlashCommand {
|
|
9
|
+
command: string;
|
|
10
|
+
detail?: string;
|
|
11
|
+
refer?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the command should execute as soon
|
|
14
|
+
* as it is entered. Defaults to `false`.
|
|
15
|
+
*/
|
|
16
|
+
executeImmediately?: boolean;
|
|
17
|
+
// kind: CompletionItemKind;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// todo@API make classes
|
|
21
|
+
export interface InteractiveEditorSession {
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
slashCommands?: InteractiveEditorSlashCommand[];
|
|
24
|
+
wholeRange?: Range;
|
|
25
|
+
message?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// todo@API make classes
|
|
29
|
+
export interface InteractiveEditorRequest {
|
|
30
|
+
prompt: string;
|
|
31
|
+
selection: Selection;
|
|
32
|
+
wholeRange: Range;
|
|
33
|
+
attempt: number;
|
|
34
|
+
live: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// todo@API make classes
|
|
38
|
+
export interface InteractiveEditorResponse {
|
|
39
|
+
edits: TextEdit[] | WorkspaceEdit;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
wholeRange?: Range;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// todo@API make classes
|
|
45
|
+
export interface InteractiveEditorMessageResponse {
|
|
46
|
+
contents: MarkdownString;
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
wholeRange?: Range;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export enum InteractiveEditorResponseFeedbackKind {
|
|
52
|
+
Unhelpful = 0,
|
|
53
|
+
Helpful = 1,
|
|
54
|
+
Undone = 2,
|
|
55
|
+
Accepted = 3
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface TextDocumentContext {
|
|
59
|
+
document: TextDocument;
|
|
60
|
+
selection: Selection;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface InteractiveEditorSessionProviderMetadata {
|
|
64
|
+
label: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
|
|
68
|
+
|
|
69
|
+
// Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
|
|
70
|
+
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
|
|
71
|
+
|
|
72
|
+
provideInteractiveEditorResponse(session: S, request: InteractiveEditorRequest, progress: Progress<{ message: string; edits: TextEdit[] }>, token: CancellationToken): ProviderResult<R>;
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
75
|
+
handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
export interface InteractiveSessionState { }
|
|
80
|
+
|
|
81
|
+
export interface InteractiveSessionParticipantInformation {
|
|
82
|
+
name: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* A full URI for the icon of the participant.
|
|
86
|
+
*/
|
|
87
|
+
icon?: Uri;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface InteractiveSession {
|
|
91
|
+
requester: InteractiveSessionParticipantInformation;
|
|
92
|
+
responder: InteractiveSessionParticipantInformation;
|
|
93
|
+
inputPlaceholder?: string;
|
|
94
|
+
|
|
95
|
+
saveState?(): InteractiveSessionState;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface InteractiveSessionRequestArgs {
|
|
99
|
+
command: string;
|
|
100
|
+
args: any;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface InteractiveRequest {
|
|
104
|
+
session: InteractiveSession;
|
|
105
|
+
message: string | InteractiveSessionReplyFollowup;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface InteractiveResponseErrorDetails {
|
|
109
|
+
message: string;
|
|
110
|
+
responseIsIncomplete?: boolean;
|
|
111
|
+
responseIsFiltered?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface InteractiveResponseForProgress {
|
|
115
|
+
errorDetails?: InteractiveResponseErrorDetails;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface InteractiveProgressContent {
|
|
119
|
+
content: string | MarkdownString;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface InteractiveProgressId {
|
|
123
|
+
responseId: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface InteractiveProgressTask {
|
|
127
|
+
placeholder: string;
|
|
128
|
+
resolvedContent: Thenable<InteractiveProgressContent | InteractiveProgressFileTree>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface FileTreeData {
|
|
132
|
+
label: string;
|
|
133
|
+
uri: Uri;
|
|
134
|
+
children?: FileTreeData[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface InteractiveProgressFileTree {
|
|
138
|
+
treeData: FileTreeData;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface DocumentContext {
|
|
142
|
+
uri: Uri;
|
|
143
|
+
version: number;
|
|
144
|
+
ranges: Range[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface InteractiveProgressUsedContext {
|
|
148
|
+
documents: DocumentContext[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type InteractiveProgress =
|
|
152
|
+
| InteractiveProgressContent
|
|
153
|
+
| InteractiveProgressId
|
|
154
|
+
| InteractiveProgressTask
|
|
155
|
+
| InteractiveProgressFileTree
|
|
156
|
+
| InteractiveProgressUsedContext;
|
|
157
|
+
|
|
158
|
+
export interface InteractiveResponseCommand {
|
|
159
|
+
commandId: string;
|
|
160
|
+
args?: any[];
|
|
161
|
+
title: string; // supports codicon strings
|
|
162
|
+
when?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface InteractiveSessionSlashCommand {
|
|
166
|
+
command: string;
|
|
167
|
+
kind: CompletionItemKind;
|
|
168
|
+
detail?: string;
|
|
169
|
+
shouldRepopulate?: boolean;
|
|
170
|
+
followupPlaceholder?: string;
|
|
171
|
+
executeImmediately?: boolean;
|
|
172
|
+
yieldTo?: ReadonlyArray<{ readonly command: string }>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface InteractiveSessionReplyFollowup {
|
|
176
|
+
message: string;
|
|
177
|
+
tooltip?: string;
|
|
178
|
+
title?: string;
|
|
179
|
+
|
|
180
|
+
// Extensions can put any serializable data here, such as an ID/version
|
|
181
|
+
metadata?: any;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type InteractiveSessionFollowup = InteractiveSessionReplyFollowup | InteractiveResponseCommand;
|
|
185
|
+
|
|
186
|
+
export type InteractiveWelcomeMessageContent = string | InteractiveSessionReplyFollowup[];
|
|
187
|
+
|
|
188
|
+
export interface InteractiveSessionProvider<S extends InteractiveSession = InteractiveSession> {
|
|
189
|
+
provideWelcomeMessage?(token: CancellationToken): ProviderResult<InteractiveWelcomeMessageContent[]>;
|
|
190
|
+
provideFollowups?(session: S, token: CancellationToken): ProviderResult<(string | InteractiveSessionFollowup)[]>;
|
|
191
|
+
provideSlashCommands?(session: S, token: CancellationToken): ProviderResult<InteractiveSessionSlashCommand[]>;
|
|
192
|
+
|
|
193
|
+
prepareSession(initialState: InteractiveSessionState | undefined, token: CancellationToken): ProviderResult<S>;
|
|
194
|
+
resolveRequest(session: S, context: InteractiveSessionRequestArgs | string, token: CancellationToken): ProviderResult<InteractiveRequest>;
|
|
195
|
+
provideResponseWithProgress(request: InteractiveRequest, progress: Progress<InteractiveProgress>, token: CancellationToken): ProviderResult<InteractiveResponseForProgress>;
|
|
196
|
+
|
|
197
|
+
// eslint-disable-next-line local/vscode-dts-provider-naming
|
|
198
|
+
removeRequest(session: S, requestId: string): void;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface InteractiveSessionDynamicRequest {
|
|
202
|
+
/**
|
|
203
|
+
* The message that will be displayed in the UI
|
|
204
|
+
*/
|
|
205
|
+
message: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Any extra metadata/context that will go to the provider.
|
|
209
|
+
* NOTE not actually used yet.
|
|
210
|
+
*/
|
|
211
|
+
metadata?: any;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export namespace interactive {
|
|
215
|
+
// current version of the proposal.
|
|
216
|
+
export const _version: 1 | number;
|
|
217
|
+
|
|
218
|
+
export function registerInteractiveSessionProvider(id: string, provider: InteractiveSessionProvider): Disposable;
|
|
219
|
+
export function addInteractiveRequest(context: InteractiveSessionRequestArgs): void;
|
|
220
|
+
|
|
221
|
+
export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
|
|
222
|
+
|
|
223
|
+
export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider, metadata?: InteractiveEditorSessionProviderMetadata): Disposable;
|
|
224
|
+
|
|
225
|
+
export function transferChatSession(session: InteractiveSession, toWorkspace: Uri): void;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 enum InteractiveSessionVoteDirection {
|
|
9
|
+
Up = 1,
|
|
10
|
+
Down = 2
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface InteractiveSessionVoteAction {
|
|
14
|
+
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
15
|
+
kind: 'vote';
|
|
16
|
+
responseId: string;
|
|
17
|
+
direction: InteractiveSessionVoteDirection;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum InteractiveSessionCopyKind {
|
|
21
|
+
// Keyboard shortcut or context menu
|
|
22
|
+
Action = 1,
|
|
23
|
+
Toolbar = 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface InteractiveSessionCopyAction {
|
|
27
|
+
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
28
|
+
kind: 'copy';
|
|
29
|
+
responseId: string;
|
|
30
|
+
codeBlockIndex: number;
|
|
31
|
+
copyType: InteractiveSessionCopyKind;
|
|
32
|
+
copiedCharacters: number;
|
|
33
|
+
totalCharacters: number;
|
|
34
|
+
copiedText: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface InteractiveSessionInsertAction {
|
|
38
|
+
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
39
|
+
kind: 'insert';
|
|
40
|
+
responseId: string;
|
|
41
|
+
codeBlockIndex: number;
|
|
42
|
+
totalCharacters: number;
|
|
43
|
+
newFile?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface InteractiveSessionTerminalAction {
|
|
47
|
+
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
48
|
+
kind: 'runInTerminal';
|
|
49
|
+
responseId: string;
|
|
50
|
+
codeBlockIndex: number;
|
|
51
|
+
languageId?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface InteractiveSessionCommandAction {
|
|
55
|
+
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
|
56
|
+
kind: 'command';
|
|
57
|
+
command: InteractiveResponseCommand;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type InteractiveSessionUserAction = InteractiveSessionVoteAction | InteractiveSessionCopyAction | InteractiveSessionInsertAction | InteractiveSessionTerminalAction | InteractiveSessionCommandAction;
|
|
61
|
+
|
|
62
|
+
export interface InteractiveSessionUserActionEvent {
|
|
63
|
+
action: InteractiveSessionUserAction;
|
|
64
|
+
providerId: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export namespace interactive {
|
|
68
|
+
export const onDidPerformUserAction: Event<InteractiveSessionUserActionEvent>;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* The tab represents an interactive window.
|
|
9
|
+
*/
|
|
10
|
+
export class TabInputInteractiveWindow {
|
|
11
|
+
/**
|
|
12
|
+
* The uri of the history notebook in the interactive window.
|
|
13
|
+
*/
|
|
14
|
+
readonly uri: Uri;
|
|
15
|
+
/**
|
|
16
|
+
* The uri of the input box in the interactive window.
|
|
17
|
+
*/
|
|
18
|
+
readonly inputBoxUri: Uri;
|
|
19
|
+
private constructor(uri: Uri, inputBoxUri: Uri);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface Tab {
|
|
23
|
+
readonly input: TabInputText | TabInputTextDiff | TabInputCustom | TabInputWebview | TabInputNotebook | TabInputNotebookDiff | TabInputTerminal | TabInputInteractiveWindow | unknown;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* A message passing protocol, which enables sending and receiving messages
|
|
10
|
+
* between two parties.
|
|
11
|
+
*/
|
|
12
|
+
export interface MessagePassingProtocol {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fired when a message is received from the other party.
|
|
16
|
+
*/
|
|
17
|
+
readonly onDidReceiveMessage: Event<any>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Post a message to the other party.
|
|
21
|
+
*
|
|
22
|
+
* @param message Body of the message. This must be a JSON serializable object.
|
|
23
|
+
* @param transfer A collection of `ArrayBuffer` instances which can be transferred
|
|
24
|
+
* to the other party, saving costly memory copy operations.
|
|
25
|
+
*/
|
|
26
|
+
postMessage(message: any, transfer?: ArrayBuffer[]): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ExtensionContext {
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* When not `undefined`, this is an instance of {@link MessagePassingProtocol} in
|
|
33
|
+
* which the other party is owned by the web embedder.
|
|
34
|
+
*/
|
|
35
|
+
readonly messagePassingProtocol: MessagePassingProtocol | undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 DocumentContextItem {
|
|
9
|
+
readonly uri: Uri;
|
|
10
|
+
readonly version: number;
|
|
11
|
+
readonly ranges: Range[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface MappedEditsContext {
|
|
15
|
+
documents: DocumentContextItem[][];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Interface for providing mapped edits for a given document.
|
|
20
|
+
*/
|
|
21
|
+
export interface MappedEditsProvider {
|
|
22
|
+
/**
|
|
23
|
+
* Provide mapped edits for a given document.
|
|
24
|
+
* @param document The document to provide mapped edits for.
|
|
25
|
+
* @param codeBlocks Code blocks that come from an LLM's reply.
|
|
26
|
+
* "Insert at cursor" in the panel chat only sends one edit that the user clicks on, but inline chat can send multiple blocks and let the lang server decide what to do with them.
|
|
27
|
+
* @param context The context for providing mapped edits.
|
|
28
|
+
* @param token A cancellation token.
|
|
29
|
+
* @returns A provider result of text edits.
|
|
30
|
+
*/
|
|
31
|
+
provideMappedEdits(
|
|
32
|
+
document: TextDocument,
|
|
33
|
+
codeBlocks: string[],
|
|
34
|
+
context: MappedEditsContext,
|
|
35
|
+
token: CancellationToken
|
|
36
|
+
): ProviderResult<WorkspaceEdit | null>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
namespace chat {
|
|
40
|
+
export function registerMappedEditsProvider(documentSelector: DocumentSelector, provider: MappedEditsProvider): Disposable;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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/124970
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The execution state of a notebook cell.
|
|
12
|
+
*/
|
|
13
|
+
export enum NotebookCellExecutionState {
|
|
14
|
+
/**
|
|
15
|
+
* The cell is idle.
|
|
16
|
+
*/
|
|
17
|
+
Idle = 1,
|
|
18
|
+
/**
|
|
19
|
+
* Execution for the cell is pending.
|
|
20
|
+
*/
|
|
21
|
+
Pending = 2,
|
|
22
|
+
/**
|
|
23
|
+
* The cell is currently executing.
|
|
24
|
+
*/
|
|
25
|
+
Executing = 3,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An event describing a cell execution state change.
|
|
30
|
+
*/
|
|
31
|
+
export interface NotebookCellExecutionStateChangeEvent {
|
|
32
|
+
/**
|
|
33
|
+
* The {@link NotebookCell cell} for which the execution state has changed.
|
|
34
|
+
*/
|
|
35
|
+
readonly cell: NotebookCell;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The new execution state of the cell.
|
|
39
|
+
*/
|
|
40
|
+
readonly state: NotebookCellExecutionState;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export namespace notebooks {
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* An {@link Event} which fires when the execution state of a cell has changed.
|
|
47
|
+
*/
|
|
48
|
+
// todo@API this is an event that is fired for a property that cells don't have and that makes me wonder
|
|
49
|
+
// how a correct consumer works, e.g the consumer could have been late and missed an event?
|
|
50
|
+
export const onDidChangeNotebookCellExecutionState: Event<NotebookCellExecutionStateChangeEvent>;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
// https://github.com/microsoft/vscode/issues/161144
|
|
8
|
+
export enum NotebookControllerAffinity2 {
|
|
9
|
+
Default = 1,
|
|
10
|
+
Preferred = 2,
|
|
11
|
+
Hidden = -1
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface NotebookController {
|
|
15
|
+
updateNotebookAffinity(notebook: NotebookDocument, affinity: NotebookControllerAffinity | NotebookControllerAffinity2): void;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -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/106744
|
|
9
|
+
|
|
10
|
+
export interface NotebookCellOutput {
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* A NotebookExecution is how {@link NotebookController notebook controller} can indicate whether the notebook controller is busy or not.
|
|
10
|
+
*
|
|
11
|
+
* When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state .
|
|
12
|
+
* When {@linkcode NotebookExecution.end end()} is called, it enters the idle state.
|
|
13
|
+
*/
|
|
14
|
+
export interface NotebookExecution {
|
|
15
|
+
/**
|
|
16
|
+
* Signal that the execution has begun.
|
|
17
|
+
*/
|
|
18
|
+
start(): void;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Signal that execution has ended.
|
|
22
|
+
*/
|
|
23
|
+
end(): void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface NotebookController {
|
|
27
|
+
/**
|
|
28
|
+
* Create an execution task.
|
|
29
|
+
*
|
|
30
|
+
* _Note_ that there can only be one execution per Notebook, that also includes NotebookCellExecutions and t an error is thrown if
|
|
31
|
+
* a cell execution or another NotebookExecution is created while another is still active.
|
|
32
|
+
*
|
|
33
|
+
* This should be used to indicate the {@link NotebookController notebook controller} is busy even though user may not have executed any cell though the UI.
|
|
34
|
+
* @param {NotebookDocument} notebook
|
|
35
|
+
* @returns A notebook execution.
|
|
36
|
+
*/
|
|
37
|
+
createNotebookExecution(notebook: NotebookDocument): NotebookExecution;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -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 NotebookControllerDetectionTask {
|
|
8
|
+
/**
|
|
9
|
+
* Dispose and remove the detection task.
|
|
10
|
+
*/
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class NotebookKernelSourceAction {
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly description?: string;
|
|
17
|
+
readonly detail?: string;
|
|
18
|
+
readonly command: string | Command;
|
|
19
|
+
readonly documentation?: Uri;
|
|
20
|
+
|
|
21
|
+
constructor(label: string);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface NotebookKernelSourceActionProvider {
|
|
25
|
+
/**
|
|
26
|
+
* An optional event to signal that the kernel source actions have changed.
|
|
27
|
+
*/
|
|
28
|
+
onDidChangeNotebookKernelSourceActions?: Event<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Provide kernel source actions
|
|
31
|
+
*/
|
|
32
|
+
provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export namespace notebooks {
|
|
36
|
+
/**
|
|
37
|
+
* Create notebook controller detection task
|
|
38
|
+
*/
|
|
39
|
+
export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Register a notebook kernel source action provider
|
|
43
|
+
*/
|
|
44
|
+
export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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/106744
|
|
9
|
+
|
|
10
|
+
export interface NotebookRegistrationData {
|
|
11
|
+
readonly displayName: string;
|
|
12
|
+
readonly filenamePattern: ReadonlyArray<(GlobPattern | { readonly include: GlobPattern; readonly exclude: GlobPattern })>;
|
|
13
|
+
readonly exclusive?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export namespace workspace {
|
|
17
|
+
|
|
18
|
+
// SPECIAL overload with NotebookRegistrationData
|
|
19
|
+
export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions, registration?: NotebookRegistrationData): Disposable;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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/123601
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents a script that is loaded into the notebook renderer before rendering output. This allows
|
|
12
|
+
* to provide and share functionality for notebook markup and notebook output renderers.
|
|
13
|
+
*/
|
|
14
|
+
export class NotebookRendererScript {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* APIs that the preload provides to the renderer. These are matched
|
|
18
|
+
* against the `dependencies` and `optionalDependencies` arrays in the
|
|
19
|
+
* notebook renderer contribution point.
|
|
20
|
+
*/
|
|
21
|
+
provides: readonly string[];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* URI of the JavaScript module to preload.
|
|
25
|
+
*
|
|
26
|
+
* This module must export an `activate` function that takes a context object that contains the notebook API.
|
|
27
|
+
*/
|
|
28
|
+
uri: Uri;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param uri URI of the JavaScript module to preload
|
|
32
|
+
* @param provides Value for the `provides` property
|
|
33
|
+
*/
|
|
34
|
+
constructor(uri: Uri, provides?: string | readonly string[]);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface NotebookController {
|
|
38
|
+
|
|
39
|
+
// todo@API allow add, not remove
|
|
40
|
+
readonly rendererScripts: NotebookRendererScript[];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
|
|
44
|
+
* the controller.
|
|
45
|
+
*/
|
|
46
|
+
readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: any }>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Send a message to the renderer of notebook editors.
|
|
50
|
+
*
|
|
51
|
+
* Note that only editors showing documents that are bound to this controller
|
|
52
|
+
* are receiving the message.
|
|
53
|
+
*
|
|
54
|
+
* @param message The message to send.
|
|
55
|
+
* @param editor A specific editor to send the message to. When `undefined` all applicable editors are receiving the message.
|
|
56
|
+
* @returns A promise that resolves to a boolean indicating if the message has been send or not.
|
|
57
|
+
*/
|
|
58
|
+
postMessage(message: any, editor?: NotebookEditor): Thenable<boolean>;
|
|
59
|
+
|
|
60
|
+
//todo@API validate this works
|
|
61
|
+
asWebviewUri(localResource: Uri): Uri;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace notebooks {
|
|
65
|
+
|
|
66
|
+
export function createNotebookController(id: string, viewType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void>, rendererScripts?: NotebookRendererScript[]): NotebookController;
|
|
67
|
+
}
|
|
68
|
+
}
|