@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.
Files changed (24) hide show
  1. package/package.json +4 -4
  2. package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +261 -0
  3. package/vscode-dts/vscode.proposed.authLearnMore.d.ts +16 -0
  4. package/vscode-dts/vscode.proposed.chatParticipant.d.ts +49 -78
  5. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +13 -16
  6. package/vscode-dts/vscode.proposed.chatProvider.d.ts +1 -1
  7. package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +32 -0
  8. package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +16 -0
  9. package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +6 -0
  10. package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +6 -0
  11. package/vscode-dts/vscode.proposed.debugFocus.d.ts +15 -23
  12. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +10 -0
  13. package/vscode-dts/vscode.proposed.documentPaste.d.ts +115 -30
  14. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +19 -14
  15. package/vscode-dts/vscode.proposed.fileComments.d.ts +2 -4
  16. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +18 -0
  17. package/vscode-dts/vscode.proposed.interactive.d.ts +0 -16
  18. package/vscode-dts/vscode.proposed.languageModels.d.ts +115 -53
  19. package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +44 -0
  20. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +3 -0
  21. package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +22 -0
  22. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +2 -0
  23. package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +207 -0
  24. package/vscode-dts/vscode.proposed.testCoverage.d.ts +0 -222
@@ -7,17 +7,13 @@ declare module 'vscode' {
7
7
 
8
8
  // See https://github.com/microsoft/vscode/issues/63943
9
9
 
10
- export class ThreadFocus {
10
+ export class Thread {
11
11
  /**
12
12
  * Create a ThreadFocus
13
13
  * @param session
14
14
  * @param threadId
15
- * @param frameId
16
15
  */
17
- constructor(
18
- session: DebugSession,
19
- threadId?: number);
20
-
16
+ constructor(session: DebugSession, threadId: number);
21
17
 
22
18
  /**
23
19
  * Debug session for thread.
@@ -25,23 +21,19 @@ declare module 'vscode' {
25
21
  readonly session: DebugSession;
26
22
 
27
23
  /**
28
- * Id of the associated thread (DAP id). May be undefined if thread has become unselected.
24
+ * ID of the associated thread in the debug protocol.
29
25
  */
30
- readonly threadId: number | undefined;
26
+ readonly threadId: number;
31
27
  }
32
28
 
33
- export class StackFrameFocus {
29
+ export class StackFrame {
34
30
  /**
35
31
  * Create a StackFrameFocus
36
32
  * @param session
37
33
  * @param threadId
38
34
  * @param frameId
39
35
  */
40
- constructor(
41
- session: DebugSession,
42
- threadId?: number,
43
- frameId?: number);
44
-
36
+ constructor(session: DebugSession, threadId?: number, frameId?: number);
45
37
 
46
38
  /**
47
39
  * Debug session for thread.
@@ -49,26 +41,26 @@ declare module 'vscode' {
49
41
  readonly session: DebugSession;
50
42
 
51
43
  /**
52
- * Id of the associated thread (DAP id). May be undefined if a frame is unselected.
44
+ * Id of the associated thread in the debug protocol.
53
45
  */
54
- readonly threadId: number | undefined;
46
+ readonly threadId: number;
55
47
  /**
56
- * Id of the stack frame (DAP id). May be undefined if a frame is unselected.
48
+ * Id of the stack frame in the debug protocol.
57
49
  */
58
- readonly frameId: number | undefined;
50
+ readonly frameId: number;
59
51
  }
60
52
 
61
53
 
62
54
  export namespace debug {
63
55
  /**
64
- * The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
56
+ * The currently focused thread or stack frame, or `undefined` if no
57
+ * thread or stack is focused.
65
58
  */
66
- export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
59
+ export const activeStackItem: Thread | StackFrame | undefined;
67
60
 
68
61
  /**
69
- * An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
70
- * when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
62
+ * An event which fires when the {@link debug.activeStackItem} has changed.
71
63
  */
72
- export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
64
+ export const onDidChangeActiveStackItem: Event<Thread | StackFrame | undefined>;
73
65
  }
74
66
  }
@@ -12,6 +12,15 @@ declare module 'vscode' {
12
12
  provideSampleQuestions?(token: CancellationToken): ProviderResult<ChatFollowup[]>;
13
13
  }
14
14
 
15
+ export interface ChatRequesterInformation {
16
+ name: string;
17
+
18
+ /**
19
+ * A full URI for the icon of the request.
20
+ */
21
+ icon?: Uri;
22
+ }
23
+
15
24
  export interface ChatParticipant {
16
25
  /**
17
26
  * When true, this participant is invoked by default when no other participant is being invoked
@@ -45,5 +54,6 @@ declare module 'vscode' {
45
54
  helpTextPostfix?: string | MarkdownString;
46
55
 
47
56
  welcomeMessageProvider?: ChatWelcomeMessageProvider;
57
+ requester?: ChatRequesterInformation;
48
58
  }
49
59
  }
@@ -8,55 +8,106 @@ declare module 'vscode' {
8
8
  // https://github.com/microsoft/vscode/issues/30066/
9
9
 
10
10
  /**
11
- * Provider invoked when the user copies and pastes code.
11
+ * The reason why paste edits were requested.
12
12
  */
13
- interface DocumentPasteEditProvider {
13
+ export enum DocumentPasteTriggerKind {
14
+ /**
15
+ * Pasting was requested as part of a normal paste operation.
16
+ */
17
+ Automatic = 0,
18
+
19
+ /**
20
+ * Pasting was requested by the user with the `paste as` command.
21
+ */
22
+ PasteAs = 1,
23
+ }
24
+
25
+ /**
26
+ * Additional information about the paste operation.
27
+ */
28
+
29
+ export interface DocumentPasteEditContext {
30
+ /**
31
+ * Requested kind of paste edits to return.
32
+ */
33
+ readonly only: DocumentPasteEditKind | undefined;
34
+
35
+ /**
36
+ * The reason why paste edits were requested.
37
+ */
38
+ readonly triggerKind: DocumentPasteTriggerKind;
39
+ }
40
+
41
+ /**
42
+ * Provider invoked when the user copies or pastes in a {@linkcode TextDocument}.
43
+ */
44
+ interface DocumentPasteEditProvider<T extends DocumentPasteEdit = DocumentPasteEdit> {
14
45
 
15
46
  /**
16
47
  * Optional method invoked after the user copies text in a file.
17
48
  *
18
- * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
19
- * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
49
+ * This allows the provider to attach copy metadata to the {@link DataTransfer}
50
+ * which is then passed back to providers in {@linkcode provideDocumentPasteEdits}.
51
+ *
52
+ * Note that currently any changes to the {@linkcode DataTransfer} are isolated to the current editor session.
53
+ * This means that added metadata cannot be seen by other applications.
20
54
  *
21
55
  * @param document Document where the copy took place.
22
- * @param ranges Ranges being copied in the `document`.
23
- * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
56
+ * @param ranges Ranges being copied in {@linkcode document}.
57
+ * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@linkcode provideDocumentPasteEdits}.
58
+ * This object is only valid for the duration of this method.
24
59
  * @param token A cancellation token.
60
+ *
61
+ * @return Optional thenable that resolves when all changes to the `dataTransfer` are complete.
25
62
  */
26
63
  prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
27
64
 
28
65
  /**
29
66
  * Invoked before the user pastes into a document.
30
67
  *
31
- * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
68
+ * Returned edits can replace the standard pasting behavior.
32
69
  *
33
70
  * @param document Document being pasted into
34
- * @param ranges Currently selected ranges in the document.
35
- * @param dataTransfer The data transfer associated with the paste.
71
+ * @param ranges Range in the {@linkcode document} to paste into.
72
+ * @param dataTransfer The {@link DataTransfer data transfer} associated with the paste. This object is only valid for the duration of the paste operation.
73
+ * @param context Additional context for the paste.
36
74
  * @param token A cancellation token.
37
75
  *
38
- * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
76
+ * @return Set of potential {@link DocumentPasteEdit edits} that apply the paste. Return `undefined` to use standard pasting.
39
77
  */
40
- provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
78
+ provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, context: DocumentPasteEditContext, token: CancellationToken): ProviderResult<T[]>;
79
+
80
+ /**
81
+ * Optional method which fills in the {@linkcode DocumentPasteEdit.additionalEdit} before the edit is applied.
82
+ *
83
+ * This is called once per edit and should be used if generating the complete edit may take a long time.
84
+ * Resolve can only be used to change {@link DocumentPasteEdit.additionalEdit}.
85
+ *
86
+ * @param pasteEdit The {@linkcode DocumentPasteEdit} to resolve.
87
+ * @param token A cancellation token.
88
+ *
89
+ * @returns The resolved paste edit or a thenable that resolves to such. It is OK to return the given
90
+ * `pasteEdit`. If no result is returned, the given `pasteEdit` is used.
91
+ */
92
+ resolveDocumentPasteEdit?(pasteEdit: T, token: CancellationToken): ProviderResult<T>;
41
93
  }
42
94
 
43
95
  /**
44
- * An operation applied on paste
96
+ * An edit applied on paste.
45
97
  */
46
98
  class DocumentPasteEdit {
47
99
 
48
100
  /**
49
101
  * Human readable label that describes the edit.
50
102
  */
51
- label: string;
103
+ title: string;
52
104
 
53
105
  /**
54
- * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
106
+ * {@link DocumentPasteEditKind Kind} of the edit.
107
+ *
108
+ * Used to identify specific types of edits.
55
109
  */
56
- yieldTo?: ReadonlyArray<
57
- | { readonly extensionId: string; readonly providerId: string }
58
- | { readonly mimeType: string }
59
- >;
110
+ kind: DocumentPasteEditKind;
60
111
 
61
112
  /**
62
113
  * The text or snippet to insert at the pasted locations.
@@ -69,43 +120,77 @@ declare module 'vscode' {
69
120
  additionalEdit?: WorkspaceEdit;
70
121
 
71
122
  /**
72
- * @param insertText The text or snippet to insert at the pasted locations.
123
+ * Controls the ordering of paste edits provided by multiple providers.
124
+ *
125
+ * If this edit yields to another, it will be shown lower in the list of paste edit.
126
+ */
127
+ yieldTo?: readonly DocumentPasteEditKind[];
128
+
129
+ /**
130
+ * Create a new paste edit.
73
131
  *
74
- * TODO: Reverse args, but this will break existing consumers :(
132
+ * @param insertText The text or snippet to insert at the pasted locations.
133
+ * @param title Human readable label that describes the edit.
134
+ * @param kind {@link DocumentPasteEditKind Kind} of the edit.
75
135
  */
76
- constructor(insertText: string | SnippetString, label: string);
136
+ constructor(insertText: string | SnippetString, title: string, kind: DocumentPasteEditKind);
137
+ }
138
+
139
+
140
+ /**
141
+ * TODO: Share with code action kind?
142
+ */
143
+ class DocumentPasteEditKind {
144
+ static readonly Empty: DocumentPasteEditKind;
145
+
146
+ // TODO: Add `Text` any others?
147
+
148
+ private constructor(value: string);
149
+
150
+ readonly value: string;
151
+
152
+ append(...parts: string[]): CodeActionKind;
153
+ intersects(other: CodeActionKind): boolean;
154
+ contains(other: CodeActionKind): boolean;
77
155
  }
78
156
 
79
157
  interface DocumentPasteProviderMetadata {
80
158
  /**
81
- * Identifies the provider.
82
- *
83
- * This id is used when users configure the default provider for paste.
159
+ * List of {@link DocumentPasteEditKind kinds} that the provider may return in {@linkcode DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits}.
84
160
  *
85
- * This id should be unique within the extension but does not need to be unique across extensions.
161
+ * The provider will only be invoked when one of these kinds is being requested. For normal pasting, all providers will be invoked.
86
162
  */
87
- readonly id: string;
163
+ readonly providedPasteEditKinds: readonly DocumentPasteEditKind[];
88
164
 
89
165
  /**
90
- * Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
166
+ * Mime types that {@linkcode DocumentPasteEditProvider.prepareDocumentPaste prepareDocumentPaste} may add on copy.
91
167
  */
92
168
  readonly copyMimeTypes?: readonly string[];
93
169
 
94
170
  /**
95
- * Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
171
+ * Mime types that {@linkcode DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
96
172
  *
97
173
  * This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
98
174
  *
99
175
  * Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
100
176
  *
101
- * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
102
- * Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
177
+ * Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@linkcode DataTransfer}.
178
+ * Note that {@linkcode DataTransferFile} entries are only created when dropping content from outside the editor, such as
103
179
  * from the operating system.
104
180
  */
105
181
  readonly pasteMimeTypes?: readonly string[];
106
182
  }
107
183
 
108
184
  namespace languages {
185
+ /**
186
+ * Registers a new {@linkcode DocumentPasteEditProvider}.
187
+ *
188
+ * @param selector A selector that defines the documents this provider applies to.
189
+ * @param provider A paste editor provider.
190
+ * @param metadata Additional metadata about the provider.
191
+ *
192
+ * @returns A {@link Disposable} that unregisters this provider when disposed of.
193
+ */
109
194
  export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
110
195
  }
111
196
  }
@@ -7,11 +7,27 @@ declare module 'vscode' {
7
7
 
8
8
  // https://github.com/microsoft/vscode/issues/179430
9
9
 
10
+
11
+ /**
12
+ * TODO:
13
+ * - Add ctor(insertText: string | SnippetString, title?: string, kind?: DocumentPasteEditKind); Can't be done as this is an extension to an existing class
14
+ * - Update provider to return multiple edits
15
+ */
16
+
10
17
  export interface DocumentDropEdit {
11
18
  /**
12
19
  * Human readable label that describes the edit.
13
20
  */
14
- label?: string;
21
+ title?: string;
22
+
23
+ /**
24
+ * {@link DocumentPasteEditKind Kind} of the edit.
25
+ *
26
+ * Used to identify specific types of edits.
27
+ *
28
+ * TODO: use own type?
29
+ */
30
+ kind: DocumentPasteEditKind;
15
31
 
16
32
  /**
17
33
  * The mime type from the {@link DataTransfer} that this edit applies.
@@ -23,22 +39,11 @@ declare module 'vscode' {
23
39
  /**
24
40
  * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
25
41
  */
26
- yieldTo?: ReadonlyArray<
27
- // TODO: what about built-in providers?
28
- | { readonly extensionId: string; readonly providerId: string }
29
- | { readonly mimeType: string }
30
- >;
42
+ yieldTo?: ReadonlyArray<DocumentPasteEditKind>;
31
43
  }
32
44
 
33
45
  export interface DocumentDropEditProviderMetadata {
34
- /**
35
- * Identifies the provider.
36
- *
37
- * This id is used when users configure the default provider for drop.
38
- *
39
- * This id should be unique within the extension but does not need to be unique across extensions.
40
- */
41
- readonly id: string;
46
+ readonly providedDropEditKinds?: readonly DocumentPasteEditKind[];
42
47
 
43
48
  /**
44
49
  * List of {@link DataTransfer} mime types that the provider can handle.
@@ -59,10 +59,8 @@ declare module 'vscode' {
59
59
  */
60
60
  label?: string;
61
61
 
62
- /**
63
- * The optional state of a comment thread, which may affect how the comment is displayed.
64
- */
65
- state?: CommentThreadState;
62
+ // from the commentThreadRelevance proposal
63
+ state?: CommentThreadState | { resolved?: CommentThreadState; applicability?: CommentThreadApplicability };
66
64
 
67
65
  /**
68
66
  * Dispose this comment thread.
@@ -53,6 +53,24 @@ declare module 'vscode' {
53
53
  */
54
54
  // eslint-disable-next-line local/vscode-dts-provider-naming
55
55
  handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
56
+
57
+ /**
58
+ * Is called when an inline completion item was accepted partially.
59
+ * @param info Additional info for the partial accepted trigger.
60
+ */
61
+ // eslint-disable-next-line local/vscode-dts-provider-naming
62
+ handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, info: PartialAcceptInfo): void;
63
+ }
64
+
65
+ export interface PartialAcceptInfo {
66
+ kind: PartialAcceptTriggerKind;
67
+ }
68
+
69
+ export enum PartialAcceptTriggerKind {
70
+ Unknown = 0,
71
+ Word = 1,
72
+ Line = 2,
73
+ Suggest = 3,
56
74
  }
57
75
 
58
76
  // When finalizing `commands`, make sure to add a corresponding constructor parameter.
@@ -110,23 +110,9 @@ declare module 'vscode' {
110
110
  handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
111
111
  }
112
112
 
113
- export interface InteractiveSessionParticipantInformation {
114
- name: string;
115
-
116
- /**
117
- * A full URI for the icon of the participant.
118
- */
119
- icon?: Uri;
120
- }
121
-
122
113
  export interface InteractiveSession {
123
- requester: InteractiveSessionParticipantInformation;
124
- responder: InteractiveSessionParticipantInformation;
125
- inputPlaceholder?: string;
126
114
  }
127
115
 
128
- export type InteractiveWelcomeMessageContent = string | MarkdownString | ChatFollowup[];
129
-
130
116
  export interface InteractiveSessionProvider<S extends InteractiveSession = InteractiveSession> {
131
117
  prepareSession(token: CancellationToken): ProviderResult<S>;
132
118
  }
@@ -144,8 +130,6 @@ declare module 'vscode' {
144
130
 
145
131
  export function registerInteractiveSessionProvider(id: string, provider: InteractiveSessionProvider): Disposable;
146
132
 
147
- export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
148
-
149
133
  export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider, metadata?: InteractiveEditorSessionProviderMetadata): Disposable;
150
134
 
151
135
  export function transferChatSession(session: InteractiveSession, toWorkspace: Uri): void;