@codingame/monaco-vscode-rollup-vsix-plugin 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.
Files changed (96) hide show
  1. package/package.json +2 -2
  2. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
  3. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
  4. package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
  5. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
  6. package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
  7. package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
  8. package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
  9. package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
  10. package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
  11. package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
  12. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
  13. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
  14. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
  15. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
  16. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
  17. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
  18. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
  19. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
  20. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
  21. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
  22. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
  23. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
  24. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
  25. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
  26. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
  27. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
  28. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
  29. package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
  30. package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
  31. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
  32. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
  33. package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
  34. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
  35. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
  36. package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
  37. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
  38. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
  39. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
  40. package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
  41. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
  42. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
  43. package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
  44. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
  45. package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
  46. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
  47. package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
  48. package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
  49. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
  50. package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
  51. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
  52. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
  53. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
  54. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
  55. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
  56. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
  57. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
  58. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
  59. package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
  60. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
  61. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
  62. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
  63. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
  64. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
  65. package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
  66. package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
  67. package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
  68. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
  69. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
  70. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
  71. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
  72. package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
  73. package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
  74. package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
  75. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
  76. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
  77. package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
  78. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
  79. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
  80. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
  81. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
  82. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
  83. package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
  84. package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
  85. package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
  86. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
  87. package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
  88. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
  89. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
  90. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
  91. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
  92. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
  93. package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
  94. package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
  95. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
  96. package/vscode.proposed.d.ts +0 -4787
@@ -0,0 +1,85 @@
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 CommentThread2 {
9
+ /**
10
+ * The uri of the document the thread has been created on.
11
+ */
12
+ readonly uri: Uri;
13
+
14
+ /**
15
+ * The range the comment thread is located within the document. The thread icon will be shown
16
+ * at the last line of the range.
17
+ */
18
+ range: Range | undefined;
19
+
20
+ /**
21
+ * The ordered comments of the thread.
22
+ */
23
+ comments: readonly Comment[];
24
+
25
+ /**
26
+ * Whether the thread should be collapsed or expanded when opening the document.
27
+ * Defaults to Collapsed.
28
+ */
29
+ collapsibleState: CommentThreadCollapsibleState;
30
+
31
+ /**
32
+ * Whether the thread supports reply.
33
+ * Defaults to true.
34
+ */
35
+ canReply: boolean;
36
+
37
+ /**
38
+ * Context value of the comment thread. This can be used to contribute thread specific actions.
39
+ * For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
40
+ * using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`.
41
+ * ```json
42
+ * "contributes": {
43
+ * "menus": {
44
+ * "comments/commentThread/title": [
45
+ * {
46
+ * "command": "extension.deleteCommentThread",
47
+ * "when": "commentThread == editable"
48
+ * }
49
+ * ]
50
+ * }
51
+ * }
52
+ * ```
53
+ * This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`.
54
+ */
55
+ contextValue?: string;
56
+
57
+ /**
58
+ * The optional human-readable label describing the {@link CommentThread Comment Thread}
59
+ */
60
+ label?: string;
61
+
62
+ /**
63
+ * The optional state of a comment thread, which may affect how the comment is displayed.
64
+ */
65
+ state?: CommentThreadState;
66
+
67
+ /**
68
+ * Dispose this comment thread.
69
+ *
70
+ * Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
71
+ */
72
+ dispose(): void;
73
+ }
74
+
75
+ export interface CommentController {
76
+ createCommentThread(uri: Uri, range: Range | undefined, comments: readonly Comment[]): CommentThread | CommentThread2;
77
+ }
78
+
79
+ export interface CommentingRangeProvider2 {
80
+ /**
81
+ * Provide a list of ranges which allow new comment threads creation or null for a given document
82
+ */
83
+ provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | { fileComments: boolean; ranges?: Range[] }>;
84
+ }
85
+ }
@@ -0,0 +1,67 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/73524
9
+
10
+ /**
11
+ * The parameters of a query for file search.
12
+ */
13
+ export interface FileSearchQuery {
14
+ /**
15
+ * The search pattern to match against file paths.
16
+ */
17
+ pattern: string;
18
+ }
19
+
20
+ /**
21
+ * Options that apply to file search.
22
+ */
23
+ export interface FileSearchOptions extends SearchOptions {
24
+ /**
25
+ * The maximum number of results to be returned.
26
+ */
27
+ maxResults?: number;
28
+
29
+ /**
30
+ * A CancellationToken that represents the session for this search query. If the provider chooses to, this object can be used as the key for a cache,
31
+ * and searches with the same session object can search the same cache. When the token is cancelled, the session is complete and the cache can be cleared.
32
+ */
33
+ session?: CancellationToken;
34
+ }
35
+
36
+ /**
37
+ * A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
38
+ *
39
+ * A FileSearchProvider is the more powerful of two ways to implement file search in the editor. Use a FileSearchProvider if you wish to search within a folder for
40
+ * all files that match the user's query.
41
+ *
42
+ * The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
43
+ * and in that case, every file in the folder should be returned.
44
+ */
45
+ export interface FileSearchProvider {
46
+ /**
47
+ * Provide the set of files that match a certain file path pattern.
48
+ * @param query The parameters for this query.
49
+ * @param options A set of options to consider while searching files.
50
+ * @param token A cancellation token.
51
+ */
52
+ provideFileSearchResults(query: FileSearchQuery, options: FileSearchOptions, token: CancellationToken): ProviderResult<Uri[]>;
53
+ }
54
+
55
+ export namespace workspace {
56
+ /**
57
+ * Register a search provider.
58
+ *
59
+ * Only one provider can be registered per scheme.
60
+ *
61
+ * @param scheme The provider will be invoked for workspace folders that have this file scheme.
62
+ * @param provider The provider.
63
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
64
+ */
65
+ export function registerFileSearchProvider(scheme: string, provider: FileSearchProvider): Disposable;
66
+ }
67
+ }
@@ -0,0 +1,104 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ declare module 'vscode' {
7
+
8
+ // https://github.com/microsoft/vscode/issues/59924
9
+
10
+ /**
11
+ * Options that can be set on a findTextInFiles search.
12
+ */
13
+ export interface FindTextInFilesOptions {
14
+ /**
15
+ * A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
16
+ * will be matched against the file paths of files relative to their workspace. Use a {@link RelativePattern relative pattern}
17
+ * to restrict the search results to a {@link WorkspaceFolder workspace folder}.
18
+ */
19
+ include?: GlobPattern;
20
+
21
+ /**
22
+ * A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
23
+ * will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
24
+ * apply.
25
+ */
26
+ exclude?: GlobPattern;
27
+
28
+ /**
29
+ * Whether to use the default and user-configured excludes. Defaults to true.
30
+ */
31
+ useDefaultExcludes?: boolean;
32
+
33
+ /**
34
+ * The maximum number of results to search for
35
+ */
36
+ maxResults?: number;
37
+
38
+ /**
39
+ * Whether external files that exclude files, like .gitignore, should be respected.
40
+ * See the vscode setting `"search.useIgnoreFiles"`.
41
+ */
42
+ useIgnoreFiles?: boolean;
43
+
44
+ /**
45
+ * Whether global files that exclude files, like .gitignore, should be respected.
46
+ * See the vscode setting `"search.useGlobalIgnoreFiles"`.
47
+ */
48
+ useGlobalIgnoreFiles?: boolean;
49
+
50
+ /**
51
+ * Whether files in parent directories that exclude files, like .gitignore, should be respected.
52
+ * See the vscode setting `"search.useParentIgnoreFiles"`.
53
+ */
54
+ useParentIgnoreFiles?: boolean;
55
+
56
+ /**
57
+ * Whether symlinks should be followed while searching.
58
+ * See the vscode setting `"search.followSymlinks"`.
59
+ */
60
+ followSymlinks?: boolean;
61
+
62
+ /**
63
+ * Interpret files using this encoding.
64
+ * See the vscode setting `"files.encoding"`
65
+ */
66
+ encoding?: string;
67
+
68
+ /**
69
+ * Options to specify the size of the result text preview.
70
+ */
71
+ previewOptions?: TextSearchPreviewOptions;
72
+
73
+ /**
74
+ * Number of lines of context to include before each match.
75
+ */
76
+ beforeContext?: number;
77
+
78
+ /**
79
+ * Number of lines of context to include after each match.
80
+ */
81
+ afterContext?: number;
82
+ }
83
+
84
+ export namespace workspace {
85
+ /**
86
+ * Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
87
+ * @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
88
+ * @param callback A callback, called for each result
89
+ * @param token A token that can be used to signal cancellation to the underlying search engine.
90
+ * @return A thenable that resolves when the search is complete.
91
+ */
92
+ export function findTextInFiles(query: TextSearchQuery, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
93
+
94
+ /**
95
+ * Search text in files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
96
+ * @param query The query parameters for the search - the search string, whether it's case-sensitive, or a regex, or matches whole words.
97
+ * @param options An optional set of query options. Include and exclude patterns, maxResults, etc.
98
+ * @param callback A callback, called for each result
99
+ * @param token A token that can be used to signal cancellation to the underlying search engine.
100
+ * @return A thenable that resolves when the search is complete.
101
+ */
102
+ export function findTextInFiles(query: TextSearchQuery, options: FindTextInFilesOptions, callback: (result: TextSearchResult) => void, token?: CancellationToken): Thenable<TextSearchComplete>;
103
+ }
104
+ }
@@ -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/84515
9
+
10
+ export interface FileSystemProvider {
11
+ open?(resource: Uri, options: { create: boolean }): number | Thenable<number>;
12
+ close?(fd: number): void | Thenable<void>;
13
+ read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
14
+ write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
15
+ }
16
+ }
@@ -0,0 +1,31 @@
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/46726
9
+
10
+ export interface IssueUriRequestHandler {
11
+ /**
12
+ *Handle the request by the issue reporter for the Uri you want to direct the user to.
13
+ */
14
+ handleIssueUrlRequest(): ProviderResult<Uri>;
15
+ }
16
+
17
+ export namespace env {
18
+ /**
19
+ * Register an {@link IssueUriRequestHandler}. By registering an issue uri request handler,
20
+ * you can direct the built-in issue reporter to your issue reporting web experience of choice.
21
+ * The Uri that the handler returns will be opened in the user's browser.
22
+ *
23
+ * Examples of this include:
24
+ * - Using GitHub Issue Forms or GitHub Discussions you can pre-fill the issue creation with relevant information from the current workspace using query parameters
25
+ * - Directing to a different web form that isn't on GitHub for reporting issues
26
+ *
27
+ * @param handler the issue uri request handler to register for this extension.
28
+ */
29
+ export function registerIssueUriRequestHandler(handler: IssueUriRequestHandler): Disposable;
30
+ }
31
+ }
@@ -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
+ * Represents a session of a currently logged in user.
9
+ */
10
+ export interface AuthenticationSession {
11
+ /**
12
+ * An optional ID token that may be included in the session.
13
+ */
14
+ readonly idToken?: string;
15
+ }
16
+ }
@@ -0,0 +1,71 @@
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/124024 @hediet
9
+
10
+ export namespace languages {
11
+ /**
12
+ * Registers an inline completion provider.
13
+ *
14
+ * Multiple providers can be registered for a language. In that case providers are asked in
15
+ * parallel and the results are merged. A failing provider (rejected promise or exception) will
16
+ * not cause a failure of the whole operation.
17
+ *
18
+ * @param selector A selector that defines the documents this provider is applicable to.
19
+ * @param provider An inline completion provider.
20
+ * @param metadata Metadata about the provider.
21
+ * @return A {@link Disposable} that unregisters this provider when being disposed.
22
+ */
23
+ export function registerInlineCompletionItemProvider(selector: DocumentSelector, provider: InlineCompletionItemProvider, metadata: InlineCompletionItemProviderMetadata): Disposable;
24
+ }
25
+
26
+ export interface InlineCompletionItem {
27
+ /**
28
+ * If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
29
+ * Defaults to `false`.
30
+ */
31
+ completeBracketPairs?: boolean;
32
+ }
33
+
34
+ export interface InlineCompletionItemProviderMetadata {
35
+ /**
36
+ * Specifies a list of extension ids that this provider yields to if they return a result.
37
+ * If some inline completion provider registered by such an extension returns a result, this provider is not asked.
38
+ */
39
+ yieldTo: string[];
40
+ }
41
+
42
+ export interface InlineCompletionItemProvider {
43
+ /**
44
+ * @param completionItem The completion item that was shown.
45
+ * @param updatedInsertText The actual insert text (after brackets were fixed).
46
+ */
47
+ // eslint-disable-next-line local/vscode-dts-provider-naming
48
+ handleDidShowCompletionItem?(completionItem: InlineCompletionItem, updatedInsertText: string): void;
49
+
50
+ /**
51
+ * Is called when an inline completion item was accepted partially.
52
+ * @param acceptedLength The length of the substring of the inline completion that was accepted already.
53
+ */
54
+ // eslint-disable-next-line local/vscode-dts-provider-naming
55
+ handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
56
+ }
57
+
58
+ // When finalizing `commands`, make sure to add a corresponding constructor parameter.
59
+ export interface InlineCompletionList {
60
+ /**
61
+ * A list of commands associated with the inline completions of this list.
62
+ */
63
+ commands?: Command[];
64
+
65
+ /**
66
+ * When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
67
+ * Defaults to false (might change).
68
+ */
69
+ enableForwardStability?: boolean;
70
+ }
71
+ }
@@ -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
+ }