mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge vscode source through release 1.79.2 (#23482)
* log when an editor action doesn't run because of enablement * notebooks create/dispose editors. this means controllers must be created eagerly (😢) and that notebooks need a custom way of plugging comparision keys for session. works unless creating another session for the same cell of a duplicated editor * Set offSide to sql lang configuration to true (#183461) * Fixes #181764 (#183550) * fix typo * Always scroll down and focus the input (#183557) * Fixes #180386 (#183561) * cli: ensure ordering of rpc server messages (#183558) * cli: ensure ordering of rpc server messages Sending lots of messages to a stream would block them around the async tokio mutex, which is "fair" so doesn't preserve ordering. Instead, use the write_loop approach I introduced to the server_multiplexer for the same reason some time ago. * fix clippy * update for May endgame * testing: allow invalidateTestResults to take an array (#183569) * Document `ShareProvider` API proposal (#183568) * Document `ShareProvider` API proposal * Remove mention of VS Code from JSDoc * Add support for rendering svg and md in welcome message (#183580) * Remove toggle setting more eagerly (#183584) * rm message abt macOS * Change text (#183589) * Change text * Accidentally changed the wrong file * cli: improve output for code tunnel status (#183571) * testing: allow invalidateTestResults to take an array * cli: improve output for code tunnel status Fixes #183570 * [json/css/html] update services (#183595) * Add experimental setting to enable this dialog * Fix exporting chat model to JSON before it is initialized (#183597) * minimum scrolling to reveal the next cell on shift+enter (#183600) do minimum scrolling to reveal the next cell on Execute cell and select next * Fixing Jupyter notebook issue 13263 (#183527) fix for the issue, still need to understand why there is strange focusing * Tweak proposed API JSDoc (#183590) * Tweak proposed API JSDoc * workbench -> workspace * fix ? operator * Use active editor and show progress when sharing (#183603) Use active editor and show progress * use scroll setting variable correctly * Schedule welcome widget to show once between typing. (#183606) * Schedule dialog to show once between typing * Don't re-render if already displayed once * Add F10 keybinding for debugger step, even on Web. (#183510) Fixes #181792. Previously, for Web the keyboard shortcut was Alt-F10, because it was believed that F10 could not be bound on browsers. This turned out to be incorrect, so we make the shortcut consistent (F10) with desktop VSCode which is also what many other debuggers use. We keep Alt-F10 on web as a secondary keybinding to keep the experience some web users may have gotten used to by now. * Also pass process.env * Restore missing chat clear commands (#183651) * chore: update electron@22.5.4 (#183716) * Show remote indicator in web when remoteAuthority is set (#183728) * feat: .vuerc as json file (#153017) Co-authored-by: Martin Aeschlimann <martinae@microsoft.com> * Delete --compatibility=1.63 code from the server (#183738) * Copy vscode.dev link to tunnel generates an invalid link when an untitled workspace is open (#183739) * Recent devcontainer display string corrupted on Get Started page (#183740) * Improve "next codeblock" navigation (#183744) * Improve "next codeblock" navigation Operate on the current focused response, or the last one, and scroll to the selected item * Normalize command title * Git - run git status if similarityThreshold changes (#183762) * fix aria-label issue in kb editor fixes A11y_GradeB_VSCode_Keyboard shortcut reads words together - Blind: Arrow key navigation to row Find the binding keys and "when" cell data are read together resulting in a word " CTRL + FeditorFocus instead of CTRL + F editorFocus" #182490 * Status - fix compact padding (#183768) * Remove angle brackets from VB brackets (#183782) Fixes #183359 * Update language config schema with more details about brackets. (#183779) * fix comment (#183812) * Support for `Notebook` CodeAction Kind (#183457) * nb kind support -- wip * allow notebook codeactions around single cell edit check * move notebook code action type out of editor --------- Co-authored-by: rebornix <penn.lv@gmail.com> * cli: fix connection default being applied (#183827) * cli: bump to openssl 1.1.1u (#183828) * Implement "delete" action for chat history (#183609) * Use desired file name when generating new md pasted file paths (#183861) Fixes #183851 * Default to filename for markdown new file if empty (#183864) Fixes #183848 * Fix small typo (#183865) Fixes #183819 * Noop when moving a symbol into the file it is already in (#183866) Fixes #183793 * Adjust codeAction validation to account for notebook kind (#183859) * Make JS/TS `go to configuration` commands work on non-`file:` file systems (#183688) Make `go to project` commands work on non-`file:` file systems Fixes #183685 * Can't do regex search after opening notebook (#183884) Fixes #183858 * Default to current dir for `move to file` select (#183875) Fixes #183870 `showOpenDialog` seems to ignore `defaultUri` if the file doesn't exist * Use `<...>` style markdown links when needed (#183876) Fixes #183849 * Remove check for context keys * Update xterm package * Enable updating a chat model without triggering incremental typing (#183894) * Enable chat "move" commands on empty sessions (#183895) * Enable chat "move" commands on empty sessions and also imported sessions * Fix command name * Fix some chat keybindings on windows (#183896) * "Revert File" on inactive editors are ignored (fix #177557) (#183903) * Empty reason while switching profile (fix #183775) (#183904) * fix https://github.com/microsoft/vscode-internalbacklog/issues/4278 (#183910) * fix https://github.com/microsoft/vscode/issues/183770 (#183914) * code --status displays a lot of errors before actual status output (fix #183787) (#183915) * joh/icy manatee (#183917) * Use idle value for widget of interactive editor controller https://github.com/microsoft/vscode/issues/183820 * also make preview editors idle values https://github.com/microsoft/vscode/issues/183820 * Fix #183777 (#183929) * Fix #182309 (#183925) * Tree checkbox item -> items (#183931) Fixes #183826 * Fixes #183909 (#183940) * Fix #183837 (#183943) fix #183837 * Git - fix #183941 (#183944) * Update xterm.css Fixes #181242 * chore: add @ulugbekna and @aiday-mar to my-endgame notebook (#183946) * Revert "When snippet mode is active, make `Tab` not accept suggestion but advance placeholder" This reverts commit 50a80cdb61511343996ff1d41d0b676c3d329f48. * revert not focusing completion list when quick suggest happens during snippet * change `snippetsPreventQuickSuggestions` default to false * Fix #181446 (#183956) * fix https://github.com/microsoft/vscode-internalbacklog/issues/4298 (#183957) * fix: remove extraneous incorrect context keys (#183959) These were actually getting added in getTestItemContextOverlay, and the test ID was using the extended ID which extensions do not know about. Fixes #183612 * Fixes https://github.com/microsoft/monaco-editor/issues/3920 (#183960) * fix https://github.com/microsoft/vscode-internalbacklog/issues/4324 (#183961) * fix #183030 * fix #180826 (#183962) * make message more generic for interactive editor help * . * fix #183968 * Keep codeblock toolbar visible when focused * Fix when clause on "Run in terminal" command * add important info to help menu * fix #183970 * Set `isRefactoring` for all TS refactoring edits (#183982) * consolidate * Disable move to file in TS versions < 5.2 (#183992) There are still a few key bugs with refactoring. We will ship this as a preview for TS 5.2+ instead of for 5.1 * Polish query accepting (#183995) We shouldn't send the same request to Copilot if the query hasn't changed. So if the query is the same, we short circut. Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4286 Also, when we open in chat, we should use the last accepted query, not what's in the input box. Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4280 * Allow widget to have focus (#184000) So that selecting non-code text works. Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4294 * Fix microsoft/vscode-internalbacklog#4257. Mitigate zindex for zone widgets. (#184001) * Change welcome dialog contribution to Eventually * Misc fixes * Workspace folder picker entry descriptions are suboptimal for some filesystems (fix #183418) (#184018) * cli - ignore std error unless verbose (#183787) (#184031) * joh/inquisitive meerkat (#184034) * only stash sessions that are none empty https://github.com/microsoft/vscode-internalbacklog/issues/4281 * only unstash a session once - unless new exchanges are made, https://github.com/microsoft/vscode-internalbacklog/issues/4281 * account for all exchange types * Improve declared components (#184039) * make sure to read setting (#184040) d'oh, related to https://github.com/microsoft/vscode/issues/173387#issuecomment-1571696644 * [html] update service (#184049) [html] update service. FIxes #181176 * reset context keys on reset/hide (#184042) fixes https://github.com/microsoft/vscode-internalbacklog/issues/4330 * use `Lazy`, not `IdleValue` for the IE widget held by the eager controller (#184048) https://github.com/microsoft/vscode/issues/183820 * fix https://github.com/microsoft/vscode-internalbacklog/issues/4333 (#184067) * use undo-loop instead of undo-edit when discarding chat session (#184063) * use undo-loop instead of undo-edit when discarding chat session fixes https://github.com/microsoft/vscode-internalbacklog/issues/4118 * fix tests, wait for correct state * Add logging to node download (#184070) Add logging to node download. For #182951 * re-enable default zone widget revealing when showing (#184072) fixes https://github.com/microsoft/vscode-internalbacklog/issues/4332, also fixes https://github.com/microsoft/vscode-internalbacklog/issues/3784 * fix #178202 * Allow APIs in stable (#184062) * Fix microsoft/vscode-internalbacklog#4206. Override List view whitespace css for monaco editor (#184087) * Fix JSDoc grammatical error (#184090) * Pick up TS 5.1.3 (#184091) Fixes #182931 * Misc fixes * update distro (#184097) * chore: update electron@22.5.5 (#184116) * Extension host veto is registered multiple times on restart (fix #183778) (#184127) Extension host veto is registered multiple times on restart (#183778) * Do not auto start the local web worker extension host (#184137) * Allow embedders to intercept trustedTypes.createPolicy calls (#184136) Allow embedders to intercept trustedTypes.createPolicy calls (#184100) * fix: reading from console output for --status on windows and linux (#184138) fix: reading from console output for --status on windows and linux (#184118) * Misc fixes * code --status displays a lot of errors before actual status output (fix #183787) (#184200) fix 183787 * (cherry-pick to 1.79 from main) Handle galleryExtension failure in featuredExtensionService (#184205) Handle galleryExtension failure in featuredExtensionService (#184198) Handle galleryExtension failure * Fix #184183. Multiple output height updates are skipped. (#184188) * Post merge init fixes * Misc build issues * disable toggle inline diff of `alt` down https://github.com/microsoft/vscode-internalbacklog/issues/4342 * Take into account already activated extensions when computing running locations (#184303) Take into account already activated extensions when computing running locations (fixes #184180) * Avoid `extensionService.getExtension` and use `ActivationKind.Immediate` to allow that URI handling works while resolving (#184310) Avoid `extensionService.getExtension` and use `ActivationKind.Immediate` to allow that URI handling works while resolving (fixes #182217) * WIP * rm fish auto injection * More breaks * Fix Port Attributes constructor (#184412) * WIP * WIP * Allow extensions to get at the exports of other extensions during resolving (#184487) Allow extensions to get at the exports of other extensions during resolving (fixes #184472) * do not auto finish session when inline chat widgets have focus re https://github.com/microsoft/vscode-internalbacklog/issues/4354 * fix compile errors caused by new base method * WIP * WIP * WIP * WIP * Build errors * unc - fix path traversal bypass * Bump version * cherry-pick prod changes from main * Disable sandbox * Build break from merge * bump version * Merge pull request #184739 from max06/max06/issue184659 Restore ShellIntegration for fish (#184659) * Git - only add --find-renames if the value is not the default one (#185053) Git - only add --find-renames if the value is not the default one (#184992) * Cherry-pick: Revert changes to render featured extensions when available (#184747) Revert changes to render featured extensions when available. (#184573) * Lower timeouts for experimentation and gallery service * Revert changes to render extensions when available * Add audio cues * fix: disable app sandbox when --no-sandbox is present (#184913) * fix: disable app sandbox when --no-sandbox is present (#184897) * fix: loading minimist in packaged builds * Runtime errors * UNC allow list checks cannot be disabled in extension host (fix #184989) (#185085) * UNC allow list checks cannot be disabled in extension host (#184989) * Update src/vs/base/node/unc.js Co-authored-by: Robo <hop2deep@gmail.com> --------- Co-authored-by: Robo <hop2deep@gmail.com> * Add notebook extension * Fix mangling issues * Fix mangling issues * npm install * npm install * Issues blocking bundle * Fix build folder compile errors * Fix windows bundle build * Linting fixes * Fix sqllint issues * Update yarn.lock files * Fix unit tests * Fix a couple breaks from test fixes * Bump distro * redo the checkbox style * Update linux build container dockerfile * Bump build image tag * Bump native watch dog package * Bump node-pty * Bump distro * Fix documnetation error * Update distro * redo the button styles * Update datasource TS * Add missing yarn.lock files * Windows setup fix * Turn off extension unit tests while investigating * color box style * Remove appx * Turn off test log upload * update dropdownlist style * fix universal app build error (#23488) * Skip flaky bufferContext vscode test --------- Co-authored-by: Johannes <johannes.rieken@gmail.com> Co-authored-by: Henning Dieterichs <hdieterichs@microsoft.com> Co-authored-by: Julien Richard <jairbubbles@hotmail.com> Co-authored-by: Charles Gagnon <chgagnon@microsoft.com> Co-authored-by: Megan Rogge <merogge@microsoft.com> Co-authored-by: meganrogge <megan.rogge@microsoft.com> Co-authored-by: Rob Lourens <roblourens@gmail.com> Co-authored-by: Connor Peet <connor@peet.io> Co-authored-by: Joyce Er <joyce.er@microsoft.com> Co-authored-by: Bhavya U <bhavyau@microsoft.com> Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Co-authored-by: Martin Aeschlimann <martinae@microsoft.com> Co-authored-by: Aaron Munger <aamunger@microsoft.com> Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com> Co-authored-by: rebornix <penn.lv@gmail.com> Co-authored-by: Ole <oler@google.com> Co-authored-by: Jean Pierre <jeanp413@hotmail.com> Co-authored-by: Robo <hop2deep@gmail.com> Co-authored-by: Yash Singh <saiansh2525@gmail.com> Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Co-authored-by: Ulugbek Abdullaev <ulugbekna@gmail.com> Co-authored-by: Alex Ross <alros@microsoft.com> Co-authored-by: Michael Lively <milively@microsoft.com> Co-authored-by: Matt Bierner <matb@microsoft.com> Co-authored-by: Andrea Mah <31675041+andreamah@users.noreply.github.com> Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com> Co-authored-by: Sandeep Somavarapu <sasomava@microsoft.com> Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Co-authored-by: Tyler James Leonhardt <me@tylerleonhardt.com> Co-authored-by: Alexandru Dima <alexdima@microsoft.com> Co-authored-by: Joao Moreno <Joao.Moreno@microsoft.com> Co-authored-by: Alan Ren <alanren@microsoft.com>
This commit is contained in:
949
src/vscode-dts/vscode.d.ts
vendored
949
src/vscode-dts/vscode.d.ts
vendored
File diff suppressed because it is too large
Load Diff
62
src/vscode-dts/vscode.proposed.authGetSessions.d.ts
vendored
Normal file
62
src/vscode-dts/vscode.proposed.authGetSessions.d.ts
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/152399
|
||||
|
||||
export interface AuthenticationForceNewSessionOptions {
|
||||
/**
|
||||
* The session that you are asking to be recreated. The Auth Provider can use this to
|
||||
* help guide the user to log in to the correct account.
|
||||
*/
|
||||
sessionToRecreate?: AuthenticationSession;
|
||||
}
|
||||
|
||||
export namespace authentication {
|
||||
/**
|
||||
* Get all authentication sessions matching the desired scopes that this extension has access to. In order to request access,
|
||||
* use {@link getSession}. To request an additional account, specify {@link AuthenticationGetSessionOptions.clearSessionPreference}
|
||||
* and {@link AuthenticationGetSessionOptions.createIfNone} together.
|
||||
*
|
||||
* Currently, there are only two authentication providers that are contributed from built in extensions
|
||||
* to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
|
||||
*
|
||||
* @param providerId The id of the provider to use
|
||||
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
||||
* @returns A thenable that resolves to a readonly array of authentication sessions.
|
||||
*/
|
||||
export function getSessions(providerId: string, scopes: readonly string[]): Thenable<readonly AuthenticationSession[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The options passed in to the provider when creating a session.
|
||||
*/
|
||||
export interface AuthenticationProviderCreateSessionOptions {
|
||||
/**
|
||||
* The session that is being asked to be recreated. If this is passed in, the provider should
|
||||
* attempt to recreate the session based on the information in this session.
|
||||
*/
|
||||
sessionToRecreate?: AuthenticationSession;
|
||||
}
|
||||
|
||||
export interface AuthenticationProvider {
|
||||
/**
|
||||
* Prompts a user to login.
|
||||
*
|
||||
* If login is successful, the onDidChangeSessions event should be fired.
|
||||
*
|
||||
* If login fails, a rejected promise should be returned.
|
||||
*
|
||||
* If the provider has specified that it does not support multiple accounts,
|
||||
* then this should never be called if there is already an existing session matching these
|
||||
* scopes.
|
||||
* @param scopes A list of scopes, permissions, that the new session should be created with.
|
||||
* @param options Additional options for creating a session.
|
||||
* @returns A promise that resolves to an authentication session.
|
||||
*/
|
||||
createSession(scopes: readonly string[], options: AuthenticationProviderCreateSessionOptions): Thenable<AuthenticationSession>;
|
||||
}
|
||||
}
|
||||
41
src/vscode-dts/vscode.proposed.badges.d.ts
vendored
41
src/vscode-dts/vscode.proposed.badges.d.ts
vendored
@@ -1,41 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/62783 @matthewjamesadam
|
||||
|
||||
/**
|
||||
* A badge presenting a value for a view
|
||||
*/
|
||||
export interface ViewBadge {
|
||||
|
||||
/**
|
||||
* A label to present in tooltips for the badge
|
||||
*/
|
||||
readonly tooltip: string;
|
||||
|
||||
/**
|
||||
* The value to present in the badge
|
||||
*/
|
||||
readonly value: number;
|
||||
}
|
||||
|
||||
export interface TreeView<T> {
|
||||
/**
|
||||
* The badge to display for this TreeView.
|
||||
* To remove the badge, set to undefined.
|
||||
*/
|
||||
badge?: ViewBadge | undefined;
|
||||
}
|
||||
|
||||
export interface WebviewView {
|
||||
/**
|
||||
* The badge to display for this webview view.
|
||||
* To remove the badge, set to undefined.
|
||||
*/
|
||||
badge?: ViewBadge | undefined;
|
||||
}
|
||||
}
|
||||
47
src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts
vendored
Normal file
47
src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/180582
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
*
|
||||
* @param scheme The URI scheme that this provider can provide canonical URIs for.
|
||||
* A canonical URI represents the conversion of a resource's alias into a source of truth URI.
|
||||
* Multiple aliases may convert to the same source of truth URI.
|
||||
* @param provider A provider which can convert URIs of scheme @param scheme to
|
||||
* a canonical URI which is stable across machines.
|
||||
*/
|
||||
export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param token A cancellation token for the request.
|
||||
*/
|
||||
export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriProvider {
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param options Options that the provider should honor in the URI it returns.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
|
||||
*/
|
||||
provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriRequestOptions {
|
||||
/**
|
||||
*
|
||||
* The desired scheme of the canonical URI.
|
||||
*/
|
||||
targetScheme: string;
|
||||
}
|
||||
}
|
||||
48
src/vscode-dts/vscode.proposed.codiconDecoration.d.ts
vendored
Normal file
48
src/vscode-dts/vscode.proposed.codiconDecoration.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/135591 @alexr00
|
||||
|
||||
// export interface FileDecorationProvider {
|
||||
// provideFileDecoration(uri: Uri, token: CancellationToken): ProviderResult<FileDecoration | FileDecoration1>;
|
||||
// }
|
||||
|
||||
/**
|
||||
* A file decoration represents metadata that can be rendered with a file.
|
||||
*/
|
||||
export class FileDecoration2 {
|
||||
/**
|
||||
* A very short string that represents this decoration.
|
||||
*/
|
||||
badge?: string | ThemeIcon;
|
||||
|
||||
/**
|
||||
* A human-readable tooltip for this decoration.
|
||||
*/
|
||||
tooltip?: string;
|
||||
|
||||
/**
|
||||
* The color of this decoration.
|
||||
*/
|
||||
color?: ThemeColor;
|
||||
|
||||
/**
|
||||
* A flag expressing that this decoration should be
|
||||
* propagated to its parents.
|
||||
*/
|
||||
propagate?: boolean;
|
||||
|
||||
/**
|
||||
* Creates a new decoration.
|
||||
*
|
||||
* @param badge A letter that represents the decoration.
|
||||
* @param tooltip The tooltip of the decoration.
|
||||
* @param color The color of the decoration.
|
||||
*/
|
||||
constructor(badge?: string | ThemeIcon, tooltip?: string, color?: ThemeColor);
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,14 @@
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/145374
|
||||
// https://github.com/microsoft/vscode/issues/171166
|
||||
|
||||
interface WorkspaceEdit {
|
||||
export enum CommentState {
|
||||
Published = 0,
|
||||
Draft = 1
|
||||
}
|
||||
|
||||
// todo@API have a SnippetTextEdit and allow to set that?
|
||||
replace(uri: Uri, range: Range, newText: string | SnippetString, metadata?: WorkspaceEditEntryMetadata): void;
|
||||
export interface Comment {
|
||||
state?: CommentState;
|
||||
}
|
||||
}
|
||||
@@ -3,4 +3,4 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for the `webview/context`-menu contribution point
|
||||
// empty placeholder declaration for the `comments/comment/editorActions` menu
|
||||
10
src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts
vendored
Normal file
10
src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder for comment peek context menus
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/151533 @alexr00
|
||||
|
||||
|
||||
8
src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts
vendored
Normal file
8
src/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder for comment thread additional menus
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/163281
|
||||
@@ -3,4 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for the `contribEditSessions`-contribution point
|
||||
// empty placeholder for edit sessions contribution point from core
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/157734 @joyceerhl
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for the `mergeEditor/toolbar` menu
|
||||
// empty placeholder declaration for the `editor/content` menu
|
||||
6
src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts
vendored
Normal file
6
src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for `mergeEditor/*` menus
|
||||
6
src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts
vendored
Normal file
6
src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for the `notebookPreload` contribution point
|
||||
@@ -4,3 +4,4 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder declaration for the `file/share`-submenu contribution point
|
||||
// https://github.com/microsoft/vscode/issues/176316
|
||||
|
||||
8
src/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts
vendored
Normal file
8
src/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder for status bar items contribution
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/167874 @jrieken
|
||||
@@ -1,17 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// empty placeholder for view size
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/122283 @alexr00
|
||||
|
||||
/**
|
||||
* View contributions can include a `size`, which can be a number. A number works similar to the css flex property.
|
||||
*
|
||||
* For example, if you have 3 views, with sizes 1, 1, and 2, the views of size 1 will together take up the same amount of space as the view of size 2.
|
||||
*
|
||||
* A number value will only be used as an initial size. After a user has changed the size of the view, the user's choice will be restored.
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ declare module 'vscode' {
|
||||
*
|
||||
* @return Thenable indicating that the webview editor has been moved.
|
||||
*/
|
||||
// eslint-disable-next-line vscode-dts-provider-naming
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
|
||||
}
|
||||
}
|
||||
|
||||
74
src/vscode-dts/vscode.proposed.debugFocus.d.ts
vendored
Normal file
74
src/vscode-dts/vscode.proposed.debugFocus.d.ts
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// See https://github.com/microsoft/vscode/issues/63943
|
||||
|
||||
export class ThreadFocus {
|
||||
/**
|
||||
* Create a ThreadFocus
|
||||
* @param session
|
||||
* @param threadId
|
||||
* @param frameId
|
||||
*/
|
||||
constructor(
|
||||
session: DebugSession,
|
||||
threadId?: number);
|
||||
|
||||
|
||||
/**
|
||||
* Debug session for thread.
|
||||
*/
|
||||
readonly session: DebugSession;
|
||||
|
||||
/**
|
||||
* Id of the associated thread (DAP id). May be undefined if thread has become unselected.
|
||||
*/
|
||||
readonly threadId: number | undefined;
|
||||
}
|
||||
|
||||
export class StackFrameFocus {
|
||||
/**
|
||||
* Create a StackFrameFocus
|
||||
* @param session
|
||||
* @param threadId
|
||||
* @param frameId
|
||||
*/
|
||||
constructor(
|
||||
session: DebugSession,
|
||||
threadId?: number,
|
||||
frameId?: number);
|
||||
|
||||
|
||||
/**
|
||||
* Debug session for thread.
|
||||
*/
|
||||
readonly session: DebugSession;
|
||||
|
||||
/**
|
||||
* Id of the associated thread (DAP id). May be undefined if a frame is unselected.
|
||||
*/
|
||||
readonly threadId: number | undefined;
|
||||
/**
|
||||
* Id of the stack frame (DAP id). May be undefined if a frame is unselected.
|
||||
*/
|
||||
readonly frameId: number | undefined;
|
||||
}
|
||||
|
||||
|
||||
export namespace debug {
|
||||
/**
|
||||
* The currently focused thread or stack frame id, or `undefined` if this has not been set. (e.g. not in debug mode).
|
||||
*/
|
||||
export let stackFrameFocus: ThreadFocus | StackFrameFocus | undefined;
|
||||
|
||||
/**
|
||||
* An {@link Event} which fires when the {@link debug.stackFrameFocus} changes. Provides a sessionId. threadId is not undefined
|
||||
* when a thread of frame has gained focus. frameId is defined when a stackFrame has gained focus.
|
||||
*/
|
||||
export const onDidChangeStackFrameFocus: Event<ThreadFocus | StackFrameFocus | undefined>;
|
||||
}
|
||||
}
|
||||
16
src/vscode-dts/vscode.proposed.diffContentOptions.d.ts
vendored
Normal file
16
src/vscode-dts/vscode.proposed.diffContentOptions.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
// TODO@rebornix: add github issue link
|
||||
|
||||
export interface NotebookDocumentContentOptions {
|
||||
/**
|
||||
* Controls if a cell metadata property should be reverted when the cell content
|
||||
* is reverted in notebook diff editor.
|
||||
*/
|
||||
cellContentMetadata?: { [key: string]: boolean | undefined };
|
||||
}
|
||||
}
|
||||
@@ -37,36 +37,68 @@ declare module 'vscode' {
|
||||
*
|
||||
* @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
|
||||
*/
|
||||
provideDocumentPasteEdits(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
|
||||
provideDocumentPasteEdits?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
|
||||
}
|
||||
|
||||
/**
|
||||
* An operation applied on paste
|
||||
*/
|
||||
class DocumentPasteEdit {
|
||||
/**
|
||||
* Identifies the type of edit.
|
||||
*
|
||||
* This id should be unique within the extension but does not need to be unique across extensions.
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* Human readable label that describes the edit.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* The relative priority of this edit. Higher priority items are shown first in the UI.
|
||||
*
|
||||
* Defaults to `0`.
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* The text or snippet to insert at the pasted locations.
|
||||
*/
|
||||
readonly insertText: string | SnippetString;
|
||||
insertText: string | SnippetString;
|
||||
|
||||
/**
|
||||
* An optional additional edit to apply on paste.
|
||||
*/
|
||||
readonly additionalEdit?: WorkspaceEdit;
|
||||
additionalEdit?: WorkspaceEdit;
|
||||
|
||||
/**
|
||||
* @param insertText The text or snippet to insert at the pasted locations.
|
||||
*
|
||||
* TODO: Reverse args, but this will break existing consumers :(
|
||||
*/
|
||||
constructor(insertText: string | SnippetString);
|
||||
constructor(insertText: string | SnippetString, id: string, label: string);
|
||||
}
|
||||
|
||||
interface DocumentPasteProviderMetadata {
|
||||
/**
|
||||
* Mime types that `provideDocumentPasteEdits` should be invoked for.
|
||||
*
|
||||
* Use the special `files` mimetype to indicate the provider should be invoked if any files are present in the `DataTransfer`.
|
||||
* Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
|
||||
*/
|
||||
readonly pasteMimeTypes: readonly string[];
|
||||
readonly copyMimeTypes?: readonly string[];
|
||||
|
||||
/**
|
||||
* Mime types that {@link DocumentPasteEditProvider.provideDocumentPasteEdits provideDocumentPasteEdits} should be invoked for.
|
||||
*
|
||||
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
||||
*
|
||||
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
||||
*
|
||||
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
||||
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
||||
* from the operating system.
|
||||
*/
|
||||
readonly pasteMimeTypes?: readonly string[];
|
||||
}
|
||||
|
||||
namespace languages {
|
||||
|
||||
49
src/vscode-dts/vscode.proposed.dropMetadata.d.ts
vendored
Normal file
49
src/vscode-dts/vscode.proposed.dropMetadata.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/179430
|
||||
|
||||
export interface DocumentDropEdit {
|
||||
/**
|
||||
* Identifies the type of edit.
|
||||
*
|
||||
* This id should be unique within the extension but does not need to be unique across extensions.
|
||||
*/
|
||||
id?: string;
|
||||
|
||||
/**
|
||||
* The relative priority of this edit. Higher priority items are shown first in the UI.
|
||||
*
|
||||
* Defaults to `0`.
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* Human readable label that describes the edit.
|
||||
*/
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface DocumentDropEditProviderMetadata {
|
||||
/**
|
||||
* List of data transfer types that the provider supports.
|
||||
*
|
||||
* This can either be an exact mime type such as `image/png`, or a wildcard pattern such as `image/*`.
|
||||
*
|
||||
* Use `text/uri-list` for resources dropped from the explorer or other tree views in the workbench.
|
||||
*
|
||||
* Use `files` to indicate that the provider should be invoked if any {@link DataTransferFile files} are present in the {@link DataTransfer}.
|
||||
* Note that {@link DataTransferFile} entries are only created when dropping content from outside the editor, such as
|
||||
* from the operating system.
|
||||
*/
|
||||
readonly dropMimeTypes: readonly string[];
|
||||
}
|
||||
|
||||
export namespace languages {
|
||||
export function registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider, metadata?: DocumentDropEditProviderMetadata): Disposable;
|
||||
}
|
||||
}
|
||||
71
src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts
vendored
Normal file
71
src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/157734
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* An event that is emitted when an edit session identity is about to be requested.
|
||||
*/
|
||||
export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param scheme The URI scheme that this provider can provide edit session identities for.
|
||||
* @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
|
||||
* an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
|
||||
*/
|
||||
export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
|
||||
}
|
||||
|
||||
export interface EditSessionIdentityProvider {
|
||||
/**
|
||||
*
|
||||
* @param workspaceFolder The workspace folder to provide an edit session identity for.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns A string representing the edit session identity for the requested workspace folder.
|
||||
*/
|
||||
provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param identity1 An edit session identity.
|
||||
* @param identity2 A second edit session identity to compare to @param identity1.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
|
||||
*/
|
||||
provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
|
||||
}
|
||||
|
||||
export enum EditSessionIdentityMatch {
|
||||
Complete = 100,
|
||||
Partial = 50,
|
||||
None = 0
|
||||
}
|
||||
|
||||
export interface EditSessionIdentityWillCreateEvent {
|
||||
|
||||
/**
|
||||
* A cancellation token.
|
||||
*/
|
||||
readonly token: CancellationToken;
|
||||
|
||||
/**
|
||||
* The workspace folder to create an edit session identity for.
|
||||
*/
|
||||
readonly workspaceFolder: WorkspaceFolder;
|
||||
|
||||
/**
|
||||
* Allows to pause the event until the provided thenable resolves.
|
||||
*
|
||||
* *Note:* This function can only be called during event dispatch.
|
||||
*
|
||||
* @param thenable A thenable that delays saving.
|
||||
*/
|
||||
waitUntil(thenable: Thenable<any>): void;
|
||||
}
|
||||
}
|
||||
56
src/vscode-dts/vscode.proposed.envCollectionOptions.d.ts
vendored
Normal file
56
src/vscode-dts/vscode.proposed.envCollectionOptions.d.ts
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/179476
|
||||
|
||||
/**
|
||||
* Options applied to the mutator.
|
||||
*/
|
||||
export interface EnvironmentVariableMutatorOptions {
|
||||
/**
|
||||
* Apply to the environment just before the process is created.
|
||||
*
|
||||
* Defaults to true.
|
||||
*/
|
||||
applyAtProcessCreation?: boolean;
|
||||
|
||||
/**
|
||||
* Apply to the environment in the shell integration script. Note that this _will not_ apply
|
||||
* the mutator if shell integration is disabled or not working for some reason.
|
||||
*
|
||||
* Defaults to false.
|
||||
*/
|
||||
applyAtShellIntegration?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* A type of mutation and its value to be applied to an environment variable.
|
||||
*/
|
||||
export interface EnvironmentVariableMutator {
|
||||
/**
|
||||
* Options applied to the mutator.
|
||||
*/
|
||||
readonly options: EnvironmentVariableMutatorOptions;
|
||||
}
|
||||
|
||||
export interface EnvironmentVariableCollection extends Iterable<[variable: string, mutator: EnvironmentVariableMutator]> {
|
||||
/**
|
||||
* @param options Options applied to the mutator.
|
||||
*/
|
||||
replace(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
||||
|
||||
/**
|
||||
* @param options Options applied to the mutator.
|
||||
*/
|
||||
append(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
||||
|
||||
/**
|
||||
* @param options Options applied to the mutator.
|
||||
*/
|
||||
prepend(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;
|
||||
}
|
||||
}
|
||||
34
src/vscode-dts/vscode.proposed.envCollectionWorkspace.d.ts
vendored
Normal file
34
src/vscode-dts/vscode.proposed.envCollectionWorkspace.d.ts
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/182069
|
||||
|
||||
// export interface ExtensionContext {
|
||||
// /**
|
||||
// * Gets the extension's environment variable collection for this workspace, enabling changes
|
||||
// * to be applied to terminal environment variables.
|
||||
// *
|
||||
// * @param scope The scope to which the environment variable collection applies to.
|
||||
// */
|
||||
// readonly environmentVariableCollection: EnvironmentVariableCollection & { getScopedEnvironmentVariableCollection(scope: EnvironmentVariableScope): EnvironmentVariableCollection };
|
||||
// }
|
||||
|
||||
export type EnvironmentVariableScope = {
|
||||
/**
|
||||
* Any specific workspace folder to get collection for. If unspecified, collection applicable to all workspace folders is returned.
|
||||
*/
|
||||
workspaceFolder?: WorkspaceFolder;
|
||||
};
|
||||
|
||||
export interface EnvironmentVariableCollection extends Iterable<[variable: string, mutator: EnvironmentVariableMutator]> {
|
||||
/**
|
||||
* A description for the environment variable collection, this will be used to describe the
|
||||
* changes in the UI.
|
||||
*/
|
||||
description: string | MarkdownString | undefined;
|
||||
}
|
||||
}
|
||||
16
src/vscode-dts/vscode.proposed.envShellEvent.d.ts
vendored
Normal file
16
src/vscode-dts/vscode.proposed.envShellEvent.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// See https://github.com/microsoft/vscode/issues/160694
|
||||
export namespace env {
|
||||
|
||||
/**
|
||||
* An {@link Event} which fires when the default shell changes.
|
||||
*/
|
||||
export const onDidChangeShell: Event<string>;
|
||||
}
|
||||
}
|
||||
85
src/vscode-dts/vscode.proposed.fileComments.d.ts
vendored
Normal file
85
src/vscode-dts/vscode.proposed.fileComments.d.ts
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface CommentThread2 {
|
||||
/**
|
||||
* The uri of the document the thread has been created on.
|
||||
*/
|
||||
readonly uri: Uri;
|
||||
|
||||
/**
|
||||
* The range the comment thread is located within the document. The thread icon will be shown
|
||||
* at the last line of the range.
|
||||
*/
|
||||
range: Range | undefined;
|
||||
|
||||
/**
|
||||
* The ordered comments of the thread.
|
||||
*/
|
||||
comments: readonly Comment[];
|
||||
|
||||
/**
|
||||
* Whether the thread should be collapsed or expanded when opening the document.
|
||||
* Defaults to Collapsed.
|
||||
*/
|
||||
collapsibleState: CommentThreadCollapsibleState;
|
||||
|
||||
/**
|
||||
* Whether the thread supports reply.
|
||||
* Defaults to true.
|
||||
*/
|
||||
canReply: boolean;
|
||||
|
||||
/**
|
||||
* Context value of the comment thread. This can be used to contribute thread specific actions.
|
||||
* For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
|
||||
* using `menus` extension point, you can specify context value for key `commentThread` in `when` expression like `commentThread == editable`.
|
||||
* ```json
|
||||
* "contributes": {
|
||||
* "menus": {
|
||||
* "comments/commentThread/title": [
|
||||
* {
|
||||
* "command": "extension.deleteCommentThread",
|
||||
* "when": "commentThread == editable"
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* This will show action `extension.deleteCommentThread` only for comment threads with `contextValue` is `editable`.
|
||||
*/
|
||||
contextValue?: string;
|
||||
|
||||
/**
|
||||
* The optional human-readable label describing the {@link CommentThread Comment Thread}
|
||||
*/
|
||||
label?: string;
|
||||
|
||||
/**
|
||||
* The optional state of a comment thread, which may affect how the comment is displayed.
|
||||
*/
|
||||
state?: CommentThreadState;
|
||||
|
||||
/**
|
||||
* Dispose this comment thread.
|
||||
*
|
||||
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when appropriate.
|
||||
*/
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface CommentController {
|
||||
createCommentThread(uri: Uri, range: Range | undefined, comments: readonly Comment[]): CommentThread | CommentThread2;
|
||||
}
|
||||
|
||||
export interface CommentingRangeProvider2 {
|
||||
/**
|
||||
* Provide a list of ranges which allow new comment threads creation or null for a given document
|
||||
*/
|
||||
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | { fileComments: boolean; ranges?: Range[] }>;
|
||||
}
|
||||
}
|
||||
29
src/vscode-dts/vscode.proposed.formatMultipleRanges.d.ts
vendored
Normal file
29
src/vscode-dts/vscode.proposed.formatMultipleRanges.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/158776
|
||||
|
||||
|
||||
export interface DocumentRangeFormattingEditProvider {
|
||||
|
||||
/**
|
||||
* Provide formatting edits for multiple ranges in a document.
|
||||
*
|
||||
* The given ranges are hints and providers can decide to format a smaller
|
||||
* or larger range. Often this is done by adjusting the start and end
|
||||
* of the range to full syntax nodes.
|
||||
*
|
||||
* @param document The document in which the command was invoked.
|
||||
* @param ranges The ranges which should be formatted.
|
||||
* @param options Options controlling formatting.
|
||||
* @param token A cancellation token.
|
||||
* @return A set of text edits or a thenable that resolves to such. The lack of a result can be
|
||||
* signaled by returning `undefined`, `null`, or an empty array.
|
||||
*/
|
||||
provideDocumentRangesFormattingEdits?(document: TextDocument, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
|
||||
}
|
||||
}
|
||||
31
src/vscode-dts/vscode.proposed.handleIssueUri.d.ts
vendored
Normal file
31
src/vscode-dts/vscode.proposed.handleIssueUri.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/46726
|
||||
|
||||
export interface IssueUriRequestHandler {
|
||||
/**
|
||||
*Handle the request by the issue reporter for the Uri you want to direct the user to.
|
||||
*/
|
||||
handleIssueUrlRequest(): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export namespace env {
|
||||
/**
|
||||
* Register an {@link IssueUriRequestHandler}. By registering an issue uri request handler,
|
||||
* you can direct the built-in issue reporter to your issue reporting web experience of choice.
|
||||
* The Uri that the handler returns will be opened in the user's browser.
|
||||
*
|
||||
* Examples of this include:
|
||||
* - Using GitHub Issue Forms or GitHub Discussions you can pre-fill the issue creation with relevant information from the current workspace using query parameters
|
||||
* - Directing to a different web form that isn't on GitHub for reporting issues
|
||||
*
|
||||
* @param handler the issue uri request handler to register for this extension.
|
||||
*/
|
||||
export function registerIssueUriRequestHandler(handler: IssueUriRequestHandler): Disposable;
|
||||
}
|
||||
}
|
||||
29
src/vscode-dts/vscode.proposed.indentSize.d.ts
vendored
Normal file
29
src/vscode-dts/vscode.proposed.indentSize.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
/**
|
||||
* Represents a {@link TextEditor text editor}'s {@link TextEditor.options options}.
|
||||
*/
|
||||
export interface TextEditorOptions {
|
||||
/**
|
||||
* The size in spaces a tab takes. This is used for two purposes:
|
||||
* - the rendering width of a tab character;
|
||||
* - the number of spaces to insert when {@link TextEditorOptions.insertSpaces insertSpaces} is true
|
||||
* and `indentSize` is set to `"tabSize"`.
|
||||
*
|
||||
* When getting a text editor's options, this property will always be a number (resolved).
|
||||
* When setting a text editor's options, this property is optional and it can be a number or `"auto"`.
|
||||
*/
|
||||
tabSize?: number | string;
|
||||
/**
|
||||
* The number of spaces to insert when [insertSpaces](#TextEditorOptions.insertSpaces) is true.
|
||||
*
|
||||
* When getting a text editor's options, this property will always be a number (resolved).
|
||||
* When setting a text editor's options, this property is optional and it can be a number or `"tabSize"`.
|
||||
*/
|
||||
indentSize?: number | 'tabSize';
|
||||
}
|
||||
}
|
||||
@@ -7,19 +7,6 @@ declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/124024 @hediet @alexdima
|
||||
|
||||
export interface InlineCompletionItemNew {
|
||||
/**
|
||||
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
completeBracketPairs?: boolean;
|
||||
}
|
||||
|
||||
export interface InlineCompletionItemProviderNew {
|
||||
// eslint-disable-next-line vscode-dts-provider-naming
|
||||
handleDidShowCompletionItem?(completionItem: InlineCompletionItemNew): void;
|
||||
}
|
||||
|
||||
export interface InlineCompletionItem {
|
||||
/**
|
||||
* If set to `true`, unopened closing brackets are removed and unclosed opening brackets are closed.
|
||||
@@ -29,8 +16,19 @@ declare module 'vscode' {
|
||||
}
|
||||
|
||||
export interface InlineCompletionItemProvider {
|
||||
// eslint-disable-next-line vscode-dts-provider-naming
|
||||
handleDidShowCompletionItem?(completionItem: InlineCompletionItem): void;
|
||||
/**
|
||||
* @param completionItem The completion item that was shown.
|
||||
* @param updatedInsertText The actual insert text (after brackets were fixed).
|
||||
*/
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
handleDidShowCompletionItem?(completionItem: InlineCompletionItem, updatedInsertText: string): void;
|
||||
|
||||
/**
|
||||
* Is called when an inline completion item was accepted partially.
|
||||
* @param acceptedLength The length of the substring of the inline completion that was accepted already.
|
||||
*/
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
handleDidPartiallyAcceptCompletionItem?(completionItem: InlineCompletionItem, acceptedLength: number): void;
|
||||
}
|
||||
|
||||
// When finalizing `commands`, make sure to add a corresponding constructor parameter.
|
||||
@@ -39,5 +37,16 @@ declare module 'vscode' {
|
||||
* A list of commands associated with the inline completions of this list.
|
||||
*/
|
||||
commands?: Command[];
|
||||
|
||||
/**
|
||||
* When set, overrides the user setting of `editor.inlineSuggest.suppressSuggestions`.
|
||||
*/
|
||||
suppressSuggestions?: boolean;
|
||||
|
||||
/**
|
||||
* When set and the user types a suggestion without derivating from it, the inline suggestion is not updated.
|
||||
* Defaults to false (might change).
|
||||
*/
|
||||
enableForwardStability?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/124024 @hediet @alexdima
|
||||
// Temporary API to allow for safe migration.
|
||||
|
||||
export namespace languages {
|
||||
|
||||
/**
|
||||
* Registers an inline completion provider.
|
||||
*
|
||||
* Multiple providers can be registered for a language. In that case providers are asked in
|
||||
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
||||
* not cause a failure of the whole operation.
|
||||
*
|
||||
* @param selector A selector that defines the documents this provider is applicable to.
|
||||
* @param provider An inline completion provider.
|
||||
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
||||
*/
|
||||
export function registerInlineCompletionItemProviderNew(selector: DocumentSelector, provider: InlineCompletionItemProviderNew): Disposable;
|
||||
}
|
||||
|
||||
/**
|
||||
* The inline completion item provider interface defines the contract between extensions and
|
||||
* the inline completion feature.
|
||||
*
|
||||
* Providers are asked for completions either explicitly by a user gesture or implicitly when typing.
|
||||
*/
|
||||
export interface InlineCompletionItemProviderNew {
|
||||
|
||||
/**
|
||||
* Provides inline completion items for the given position and document.
|
||||
* If inline completions are enabled, this method will be called whenever the user stopped typing.
|
||||
* It will also be called when the user explicitly triggers inline completions or explicitly asks for the next or previous inline completion.
|
||||
* In that case, all available inline completions should be returned.
|
||||
* `context.triggerKind` can be used to distinguish between these scenarios.
|
||||
*
|
||||
* @param document The document inline completions are requested for.
|
||||
* @param position The position inline completions are requested for.
|
||||
* @param context A context object with additional information.
|
||||
* @param token A cancellation token.
|
||||
* @return An array of completion items or a thenable that resolves to an array of completion items.
|
||||
*/
|
||||
provideInlineCompletionItems(document: TextDocument, position: Position, context: InlineCompletionContextNew, token: CancellationToken): ProviderResult<InlineCompletionListNew | InlineCompletionItemNew[]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides information about the context in which an inline completion was requested.
|
||||
*/
|
||||
export interface InlineCompletionContextNew {
|
||||
/**
|
||||
* Describes how the inline completion was triggered.
|
||||
*/
|
||||
readonly triggerKind: InlineCompletionTriggerKindNew;
|
||||
|
||||
/**
|
||||
* Provides information about the currently selected item in the autocomplete widget if it is visible.
|
||||
*
|
||||
* If set, provided inline completions must extend the text of the selected item
|
||||
* and use the same range, otherwise they are not shown as preview.
|
||||
* As an example, if the document text is `console.` and the selected item is `.log` replacing the `.` in the document,
|
||||
* the inline completion must also replace `.` and start with `.log`, for example `.log()`.
|
||||
*
|
||||
* Inline completion providers are requested again whenever the selected item changes.
|
||||
*/
|
||||
readonly selectedCompletionInfo: SelectedCompletionInfoNew | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the currently selected completion item.
|
||||
*/
|
||||
export interface SelectedCompletionInfoNew {
|
||||
/**
|
||||
* The range that will be replaced if this completion item is accepted.
|
||||
*/
|
||||
readonly range: Range;
|
||||
|
||||
/**
|
||||
* The text the range will be replaced with if this completion is accepted.
|
||||
*/
|
||||
readonly text: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
|
||||
*/
|
||||
export enum InlineCompletionTriggerKindNew {
|
||||
/**
|
||||
* Completion was triggered explicitly by a user gesture.
|
||||
* Return multiple completion items to enable cycling through them.
|
||||
*/
|
||||
Invoke = 0,
|
||||
|
||||
/**
|
||||
* Completion was triggered automatically while editing.
|
||||
* It is sufficient to return a single completion item in this case.
|
||||
*/
|
||||
Automatic = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a collection of {@link InlineCompletionItemNew inline completion items} to be presented
|
||||
* in the editor.
|
||||
*/
|
||||
export class InlineCompletionListNew {
|
||||
/**
|
||||
* The inline completion items.
|
||||
*/
|
||||
items: InlineCompletionItemNew[];
|
||||
|
||||
/**
|
||||
* A list of commands associated with the inline completions of this list.
|
||||
*/
|
||||
commands?: Command[];
|
||||
|
||||
/**
|
||||
* Creates a new list of inline completion items with optionally given commands.
|
||||
*/
|
||||
constructor(items: InlineCompletionItemNew[], commands?: Command[]);
|
||||
}
|
||||
|
||||
/**
|
||||
* An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.
|
||||
*
|
||||
* @see {@link InlineCompletionItemProviderNew.provideInlineCompletionItems}
|
||||
*/
|
||||
export class InlineCompletionItemNew {
|
||||
/**
|
||||
* The text to replace the range with. Must be set.
|
||||
* Is used both for the preview and the accept operation.
|
||||
*/
|
||||
insertText: string | SnippetString;
|
||||
|
||||
/**
|
||||
* A text that is used to decide if this inline completion should be shown. When `falsy`
|
||||
* the {@link InlineCompletionItemNew.insertText} is used.
|
||||
*
|
||||
* An inline completion is shown if the text to replace is a prefix of the filter text.
|
||||
*/
|
||||
filterText?: string;
|
||||
|
||||
/**
|
||||
* The range to replace.
|
||||
* Must begin and end on the same line.
|
||||
*
|
||||
* Prefer replacements over insertions to provide a better experience when the user deletes typed text.
|
||||
*/
|
||||
range?: Range;
|
||||
|
||||
/**
|
||||
* An optional {@link Command} that is executed *after* inserting this completion.
|
||||
*/
|
||||
command?: Command;
|
||||
|
||||
/**
|
||||
* Creates a new inline completion item.
|
||||
*
|
||||
* @param insertText The text to replace the range with.
|
||||
* @param range The range to replace. If not set, the word at the requested position will be used.
|
||||
* @param command An optional {@link Command} that is executed *after* inserting this completion.
|
||||
*/
|
||||
constructor(insertText: string | SnippetString, range?: Range, command?: Command);
|
||||
}
|
||||
}
|
||||
184
src/vscode-dts/vscode.proposed.interactive.d.ts
vendored
Normal file
184
src/vscode-dts/vscode.proposed.interactive.d.ts
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface InteractiveEditorSlashCommand {
|
||||
command: string;
|
||||
detail?: string;
|
||||
refer?: boolean;
|
||||
// kind: CompletionItemKind;
|
||||
}
|
||||
|
||||
// todo@API make classes
|
||||
export interface InteractiveEditorSession {
|
||||
placeholder?: string;
|
||||
slashCommands?: InteractiveEditorSlashCommand[];
|
||||
wholeRange?: Range;
|
||||
}
|
||||
|
||||
// todo@API make classes
|
||||
export interface InteractiveEditorRequest {
|
||||
session: InteractiveEditorSession;
|
||||
prompt: string;
|
||||
|
||||
selection: Selection;
|
||||
wholeRange: Range;
|
||||
attempt: number;
|
||||
}
|
||||
|
||||
// todo@API make classes
|
||||
export interface InteractiveEditorResponse {
|
||||
edits: TextEdit[] | WorkspaceEdit;
|
||||
placeholder?: string;
|
||||
wholeRange?: Range;
|
||||
}
|
||||
|
||||
// todo@API make classes
|
||||
export interface InteractiveEditorMessageResponse {
|
||||
contents: MarkdownString;
|
||||
placeholder?: string;
|
||||
wholeRange?: Range;
|
||||
}
|
||||
|
||||
export enum InteractiveEditorResponseFeedbackKind {
|
||||
Unhelpful = 0,
|
||||
Helpful = 1,
|
||||
Undone = 2
|
||||
}
|
||||
|
||||
export interface TextDocumentContext {
|
||||
document: TextDocument;
|
||||
selection: Selection;
|
||||
action?: string;
|
||||
}
|
||||
|
||||
export interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
|
||||
// Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
|
||||
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
|
||||
|
||||
provideInteractiveEditorResponse(request: InteractiveEditorRequest, token: CancellationToken): ProviderResult<R>;
|
||||
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
releaseInteractiveEditorSession?(session: S): any;
|
||||
|
||||
// todo@API use enum instead of boolean
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
|
||||
}
|
||||
|
||||
|
||||
export interface InteractiveSessionState { }
|
||||
|
||||
export interface InteractiveSessionParticipantInformation {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A full URI for the icon of the participant.
|
||||
*/
|
||||
icon?: Uri;
|
||||
}
|
||||
|
||||
export interface InteractiveSession {
|
||||
requester: InteractiveSessionParticipantInformation;
|
||||
responder: InteractiveSessionParticipantInformation;
|
||||
inputPlaceholder?: string;
|
||||
|
||||
saveState?(): InteractiveSessionState;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionRequestArgs {
|
||||
command: string;
|
||||
args: any;
|
||||
}
|
||||
|
||||
export interface InteractiveRequest {
|
||||
session: InteractiveSession;
|
||||
message: string | InteractiveSessionReplyFollowup;
|
||||
}
|
||||
|
||||
export interface InteractiveResponseErrorDetails {
|
||||
message: string;
|
||||
responseIsIncomplete?: boolean;
|
||||
responseIsFiltered?: boolean;
|
||||
}
|
||||
|
||||
export interface InteractiveResponseForProgress {
|
||||
errorDetails?: InteractiveResponseErrorDetails;
|
||||
}
|
||||
|
||||
export interface InteractiveProgressContent {
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface InteractiveProgressId {
|
||||
responseId: string;
|
||||
}
|
||||
|
||||
export type InteractiveProgress = InteractiveProgressContent | InteractiveProgressId;
|
||||
|
||||
export interface InteractiveResponseCommand {
|
||||
commandId: string;
|
||||
args?: any[];
|
||||
title: string; // supports codicon strings
|
||||
}
|
||||
|
||||
export interface InteractiveSessionSlashCommand {
|
||||
command: string;
|
||||
kind: CompletionItemKind;
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionReplyFollowup {
|
||||
message: string;
|
||||
tooltip?: string;
|
||||
title?: string;
|
||||
|
||||
// Extensions can put any serializable data here, such as an ID/version
|
||||
metadata?: any;
|
||||
}
|
||||
|
||||
export type InteractiveSessionFollowup = InteractiveSessionReplyFollowup | InteractiveResponseCommand;
|
||||
|
||||
export type InteractiveWelcomeMessageContent = string | InteractiveSessionReplyFollowup[];
|
||||
|
||||
export interface InteractiveSessionProvider<S extends InteractiveSession = InteractiveSession> {
|
||||
provideWelcomeMessage?(token: CancellationToken): ProviderResult<InteractiveWelcomeMessageContent[]>;
|
||||
provideFollowups?(session: S, token: CancellationToken): ProviderResult<(string | InteractiveSessionFollowup)[]>;
|
||||
provideSlashCommands?(session: S, token: CancellationToken): ProviderResult<InteractiveSessionSlashCommand[]>;
|
||||
|
||||
prepareSession(initialState: InteractiveSessionState | undefined, token: CancellationToken): ProviderResult<S>;
|
||||
resolveRequest(session: S, context: InteractiveSessionRequestArgs | string, token: CancellationToken): ProviderResult<InteractiveRequest>;
|
||||
provideResponseWithProgress(request: InteractiveRequest, progress: Progress<InteractiveProgress>, token: CancellationToken): ProviderResult<InteractiveResponseForProgress>;
|
||||
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
removeRequest(session: S, requestId: string): void;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionDynamicRequest {
|
||||
/**
|
||||
* The message that will be displayed in the UI
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* Any extra metadata/context that will go to the provider.
|
||||
* NOTE not actually used yet.
|
||||
*/
|
||||
metadata?: any;
|
||||
}
|
||||
|
||||
export namespace interactive {
|
||||
// current version of the proposal.
|
||||
export const _version: 1 | number;
|
||||
|
||||
export function registerInteractiveSessionProvider(id: string, provider: InteractiveSessionProvider): Disposable;
|
||||
export function addInteractiveRequest(context: InteractiveSessionRequestArgs): void;
|
||||
|
||||
export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
|
||||
|
||||
export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider): Disposable;
|
||||
}
|
||||
}
|
||||
16
src/vscode-dts/vscode.proposed.interactiveSlashCommands.d.ts
vendored
Normal file
16
src/vscode-dts/vscode.proposed.interactiveSlashCommands.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface InteractiveSlashCommandProvider {
|
||||
provideSlashCommands(token: CancellationToken): ProviderResult<InteractiveSessionSlashCommand[]>;
|
||||
resolveSlashCommand(command: string, token: CancellationToken): ProviderResult<string>;
|
||||
}
|
||||
|
||||
export namespace interactiveSlashCommands {
|
||||
export function registerSlashCommandProvider(chatProviderId: string, provider: InteractiveSlashCommandProvider): Disposable;
|
||||
}
|
||||
}
|
||||
70
src/vscode-dts/vscode.proposed.interactiveUserActions.d.ts
vendored
Normal file
70
src/vscode-dts/vscode.proposed.interactiveUserActions.d.ts
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export enum InteractiveSessionVoteDirection {
|
||||
Up = 1,
|
||||
Down = 2
|
||||
}
|
||||
|
||||
export interface InteractiveSessionVoteAction {
|
||||
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
||||
kind: 'vote';
|
||||
responseId: string;
|
||||
direction: InteractiveSessionVoteDirection;
|
||||
}
|
||||
|
||||
export enum InteractiveSessionCopyKind {
|
||||
// Keyboard shortcut or context menu
|
||||
Action = 1,
|
||||
Toolbar = 2
|
||||
}
|
||||
|
||||
export interface InteractiveSessionCopyAction {
|
||||
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
||||
kind: 'copy';
|
||||
responseId: string;
|
||||
codeBlockIndex: number;
|
||||
copyType: InteractiveSessionCopyKind;
|
||||
copiedCharacters: number;
|
||||
totalCharacters: number;
|
||||
copiedText: string;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionInsertAction {
|
||||
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
||||
kind: 'insert';
|
||||
responseId: string;
|
||||
codeBlockIndex: number;
|
||||
totalCharacters: number;
|
||||
newFile?: boolean;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionTerminalAction {
|
||||
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
||||
kind: 'runInTerminal';
|
||||
responseId: string;
|
||||
codeBlockIndex: number;
|
||||
languageId?: string;
|
||||
}
|
||||
|
||||
export interface InteractiveSessionCommandAction {
|
||||
// eslint-disable-next-line local/vscode-dts-string-type-literals
|
||||
kind: 'command';
|
||||
command: InteractiveResponseCommand;
|
||||
}
|
||||
|
||||
export type InteractiveSessionUserAction = InteractiveSessionVoteAction | InteractiveSessionCopyAction | InteractiveSessionInsertAction | InteractiveSessionTerminalAction | InteractiveSessionCommandAction;
|
||||
|
||||
export interface InteractiveSessionUserActionEvent {
|
||||
action: InteractiveSessionUserAction;
|
||||
providerId: string;
|
||||
}
|
||||
|
||||
export namespace interactive {
|
||||
export const onDidPerformUserAction: Event<InteractiveSessionUserActionEvent>;
|
||||
}
|
||||
}
|
||||
17
src/vscode-dts/vscode.proposed.notebookCodeActions.d.ts
vendored
Normal file
17
src/vscode-dts/vscode.proposed.notebookCodeActions.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/179213
|
||||
|
||||
export class NotebookCodeActionKind {
|
||||
// can only return MULTI CELL workspaceEdits
|
||||
// ex: notebook.organizeImprots
|
||||
static readonly Notebook: CodeActionKind;
|
||||
|
||||
constructor(value: string);
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/147248
|
||||
|
||||
/** @deprecated */
|
||||
interface NotebookDocumentBackup {
|
||||
/**
|
||||
* Unique identifier for the backup.
|
||||
*
|
||||
* This id is passed back to your extension in `openNotebook` when opening a notebook editor from a backup.
|
||||
*/
|
||||
readonly id: string;
|
||||
|
||||
/**
|
||||
* Delete the current backup.
|
||||
*
|
||||
* This is called by the editor when it is clear the current backup is no longer needed, such as when a new backup
|
||||
* is made or when the file is saved.
|
||||
*/
|
||||
delete(): void;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
interface NotebookDocumentBackupContext {
|
||||
readonly destination: Uri;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
interface NotebookDocumentOpenContext {
|
||||
readonly backupId?: string;
|
||||
readonly untitledDocumentData?: Uint8Array;
|
||||
}
|
||||
|
||||
// todo@API use openNotebookDOCUMENT to align with openCustomDocument etc?
|
||||
// todo@API rename to NotebookDocumentContentProvider
|
||||
/** @deprecated */
|
||||
|
||||
export interface NotebookContentProvider {
|
||||
|
||||
readonly options?: NotebookDocumentContentOptions;
|
||||
readonly onDidChangeNotebookContentOptions?: Event<NotebookDocumentContentOptions>;
|
||||
|
||||
/**
|
||||
* Content providers should always use {@link FileSystemProvider file system providers} to
|
||||
* resolve the raw content for `uri` as the resource is not necessarily a file on disk.
|
||||
*/
|
||||
openNotebook(uri: Uri, openContext: NotebookDocumentOpenContext, token: CancellationToken): NotebookData | Thenable<NotebookData>;
|
||||
|
||||
// todo@API use NotebookData instead
|
||||
saveNotebook(document: NotebookDocument, token: CancellationToken): Thenable<void>;
|
||||
|
||||
// todo@API use NotebookData instead
|
||||
saveNotebookAs(targetResource: Uri, document: NotebookDocument, token: CancellationToken): Thenable<void>;
|
||||
|
||||
// todo@API use NotebookData instead
|
||||
backupNotebook(document: NotebookDocument, context: NotebookDocumentBackupContext, token: CancellationToken): Thenable<NotebookDocumentBackup>;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
|
||||
// TODO@api use NotebookDocumentFilter instead of just notebookType:string?
|
||||
// TODO@API options duplicates the more powerful variant on NotebookContentProvider
|
||||
/** @deprecated */
|
||||
export function registerNotebookContentProvider(notebookType: string, provider: NotebookContentProvider, options?: NotebookDocumentContentOptions): Disposable;
|
||||
}
|
||||
}
|
||||
17
src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts
vendored
Normal file
17
src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
// https://github.com/microsoft/vscode/issues/161144
|
||||
export enum NotebookControllerAffinity2 {
|
||||
Default = 1,
|
||||
Preferred = 2,
|
||||
Hidden = -1
|
||||
}
|
||||
|
||||
export interface NotebookController {
|
||||
updateNotebookAffinity(notebook: NotebookDocument, affinity: NotebookControllerAffinity | NotebookControllerAffinity2): void;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// eslint-disable-next-line vscode-dts-region-comments
|
||||
// @roblourens: debugUI.simple: https://github.com/microsoft/vscode/issues/147264. Used for Jupyter's Run By Line.
|
||||
// suppressSaveBeforeStart: https://github.com/microsoft/vscode/issues/147263. Used to enable debugging untitled/unsaved notebooks.
|
||||
|
||||
/**
|
||||
* Options for {@link debug.startDebugging starting a debug session}.
|
||||
*/
|
||||
export interface DebugSessionOptions {
|
||||
|
||||
debugUI?: {
|
||||
/**
|
||||
* When true, the debug toolbar will not be shown for this session, the window statusbar color will not be changed, and the debug viewlet will not be automatically revealed.
|
||||
*/
|
||||
simple?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* When true, a save will not be triggered for open editors when starting a debug session, regardless of the value of the `debug.saveBeforeStart` setting.
|
||||
*/
|
||||
suppressSaveBeforeStart?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/149271
|
||||
|
||||
// ❗️ Important: The main NotebookEditor api has been finalized.
|
||||
// This file only contains deprecated properties/functions from the proposal.
|
||||
|
||||
export interface NotebookEditor {
|
||||
/**
|
||||
* The document associated with this notebook editor.
|
||||
*
|
||||
* @deprecated Use {@linkcode NotebookEditor.notebook} instead.
|
||||
*/
|
||||
readonly document: NotebookDocument;
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* A short-hand for `openNotebookDocument(uri).then(document => showNotebookDocument(document, options))`.
|
||||
*
|
||||
* @deprecated Will not be finalized.
|
||||
*
|
||||
* @see {@link workspace.openNotebookDocument}
|
||||
*
|
||||
* @param uri The resource to open.
|
||||
* @param options {@link NotebookDocumentShowOptions Editor options} to configure the behavior of showing the {@link NotebookEditor notebook editor}.
|
||||
*
|
||||
* @return A promise that resolves to an {@link NotebookEditor notebook editor}.
|
||||
*/
|
||||
export function showNotebookDocument(uri: Uri, options?: NotebookDocumentShowOptions): Thenable<NotebookEditor>;
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/106744
|
||||
|
||||
export interface WorkspaceEdit {
|
||||
replaceNotebookMetadata(uri: Uri, value: { [key: string]: any }): void;
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*/
|
||||
replaceNotebookCells(uri: Uri, range: NotebookRange, cells: NotebookCellData[], metadata?: WorkspaceEditEntryMetadata): void;
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*/
|
||||
replaceNotebookCellMetadata(uri: Uri, index: number, cellMetadata: { [key: string]: any }, metadata?: WorkspaceEditEntryMetadata): void;
|
||||
}
|
||||
|
||||
export interface NotebookEditorEdit {
|
||||
/**
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*/
|
||||
replaceMetadata(value: { [key: string]: any }): void;
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*/
|
||||
replaceCells(start: number, end: number, cells: NotebookCellData[]): void;
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*/
|
||||
replaceCellMetadata(index: number, metadata: { [key: string]: any }): void;
|
||||
}
|
||||
|
||||
export interface NotebookEditor {
|
||||
/**
|
||||
* Perform an edit on the notebook associated with this notebook editor.
|
||||
*
|
||||
* The given callback-function is invoked with an {@link NotebookEditorEdit edit-builder} which must
|
||||
* be used to make edits. Note that the edit-builder is only valid while the
|
||||
* callback executes.
|
||||
*
|
||||
* @deprecated Please migrate to the new `notebookWorkspaceEdit` proposed API.
|
||||
*
|
||||
* @param callback A function which can create edits using an {@link NotebookEditorEdit edit-builder}.
|
||||
* @return A promise that resolves with a value indicating if the edits could be applied.
|
||||
*/
|
||||
edit(callback: (editBuilder: NotebookEditorEdit) => void): Thenable<boolean>;
|
||||
}
|
||||
}
|
||||
39
src/vscode-dts/vscode.proposed.notebookExecution.d.ts
vendored
Normal file
39
src/vscode-dts/vscode.proposed.notebookExecution.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
/**
|
||||
* A NotebookExecution is how {@link NotebookController notebook controller} can indicate whether the notebook controller is busy or not.
|
||||
*
|
||||
* When {@linkcode NotebookExecution.start start()} is called on the execution task, it causes the Notebook to enter a executing state .
|
||||
* When {@linkcode NotebookExecution.end end()} is called, it enters the idle state.
|
||||
*/
|
||||
export interface NotebookExecution {
|
||||
/**
|
||||
* Signal that the execution has begun.
|
||||
*/
|
||||
start(): void;
|
||||
|
||||
/**
|
||||
* Signal that execution has ended.
|
||||
*/
|
||||
end(): void;
|
||||
}
|
||||
|
||||
export interface NotebookController {
|
||||
/**
|
||||
* Create an execution task.
|
||||
*
|
||||
* _Note_ that there can only be one execution per Notebook, that also includes NotebookCellExecutions and t an error is thrown if
|
||||
* a cell execution or another NotebookExecution is created while another is still active.
|
||||
*
|
||||
* 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.
|
||||
* @param {NotebookDocument} notebook
|
||||
* @returns A notebook execution.
|
||||
*/
|
||||
createNotebookExecution(notebook: NotebookDocument): NotebookExecution;
|
||||
}
|
||||
}
|
||||
@@ -4,4 +4,43 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
export interface NotebookControllerDetectionTask {
|
||||
/**
|
||||
* Dispose and remove the detection task.
|
||||
*/
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class NotebookKernelSourceAction {
|
||||
readonly label: string;
|
||||
readonly description?: string;
|
||||
readonly detail?: string;
|
||||
readonly command: string | Command;
|
||||
readonly documentation?: Uri;
|
||||
|
||||
constructor(label: string);
|
||||
}
|
||||
|
||||
export interface NotebookKernelSourceActionProvider {
|
||||
/**
|
||||
* An optional event to signal that the kernel source actions have changed.
|
||||
*/
|
||||
onDidChangeNotebookKernelSourceActions?: Event<void>;
|
||||
/**
|
||||
* Provide kernel source actions
|
||||
*/
|
||||
provideNotebookKernelSourceActions(token: CancellationToken): ProviderResult<NotebookKernelSourceAction[]>;
|
||||
}
|
||||
|
||||
export namespace notebooks {
|
||||
/**
|
||||
* Create notebook controller detection task
|
||||
*/
|
||||
export function createNotebookControllerDetectionTask(notebookType: string): NotebookControllerDetectionTask;
|
||||
|
||||
/**
|
||||
* Register a notebook kernel source action provider
|
||||
*/
|
||||
export function registerKernelSourceActionProvider(notebookType: string, provider: NotebookKernelSourceActionProvider): Disposable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,14 +8,13 @@ declare module 'vscode' {
|
||||
// https://github.com/microsoft/vscode/issues/106744
|
||||
|
||||
export interface NotebookRegistrationData {
|
||||
displayName: string;
|
||||
filenamePattern: (GlobPattern | { include: GlobPattern; exclude: GlobPattern })[];
|
||||
exclusive?: boolean;
|
||||
readonly displayName: string;
|
||||
readonly filenamePattern: ReadonlyArray<(GlobPattern | { readonly include: GlobPattern; readonly exclude: GlobPattern })>;
|
||||
readonly exclusive?: boolean;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
// SPECIAL overload with NotebookRegistrationData
|
||||
export function registerNotebookContentProvider(notebookType: string, provider: NotebookContentProvider, options?: NotebookDocumentContentOptions, registrationData?: NotebookRegistrationData): Disposable;
|
||||
|
||||
// SPECIAL overload with NotebookRegistrationData
|
||||
export function registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions, registration?: NotebookRegistrationData): Disposable;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ declare module 'vscode' {
|
||||
* against the `dependencies` and `optionalDependencies` arrays in the
|
||||
* notebook renderer contribution point.
|
||||
*/
|
||||
provides: string[];
|
||||
provides: readonly string[];
|
||||
|
||||
/**
|
||||
* URI of the JavaScript module to preload.
|
||||
@@ -31,7 +31,7 @@ declare module 'vscode' {
|
||||
* @param uri URI of the JavaScript module to preload
|
||||
* @param provides Value for the `provides` property
|
||||
*/
|
||||
constructor(uri: Uri, provides?: string | string[]);
|
||||
constructor(uri: Uri, provides?: string | readonly string[]);
|
||||
}
|
||||
|
||||
export interface NotebookController {
|
||||
@@ -43,7 +43,7 @@ declare module 'vscode' {
|
||||
* An event that fires when a {@link NotebookController.rendererScripts renderer script} has send a message to
|
||||
* the controller.
|
||||
*/
|
||||
readonly onDidReceiveMessage: Event<{ editor: NotebookEditor; message: any }>;
|
||||
readonly onDidReceiveMessage: Event<{ readonly editor: NotebookEditor; readonly message: any }>;
|
||||
|
||||
/**
|
||||
* Send a message to the renderer of notebook editors.
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/106744
|
||||
|
||||
/**
|
||||
* A notebook edit represents edits that should be applied to the contents of a notebook.
|
||||
*/
|
||||
export class NotebookEdit {
|
||||
|
||||
/**
|
||||
* Utility to create a edit that replaces cells in a notebook.
|
||||
*
|
||||
* @param range The range of cells to replace
|
||||
* @param newCells The new notebook cells.
|
||||
*/
|
||||
static replaceCells(range: NotebookRange, newCells: NotebookCellData[]): NotebookEdit;
|
||||
|
||||
/**
|
||||
* Utility to create an edit that replaces cells in a notebook.
|
||||
*
|
||||
* @param index The index to insert cells at.
|
||||
* @param newCells The new notebook cells.
|
||||
*/
|
||||
static insertCells(index: number, newCells: NotebookCellData[]): NotebookEdit;
|
||||
|
||||
/**
|
||||
* Utility to create an edit that deletes cells in a notebook.
|
||||
*
|
||||
* @param range The range of cells to delete.
|
||||
*/
|
||||
static deleteCells(range: NotebookRange): NotebookEdit;
|
||||
|
||||
/**
|
||||
* Utility to create an edit that update a cell's metadata.
|
||||
*
|
||||
* @param index The index of the cell to update.
|
||||
* @param newCellMetadata The new metadata for the cell.
|
||||
*/
|
||||
static updateCellMetadata(index: number, newCellMetadata: { [key: string]: any }): NotebookEdit;
|
||||
|
||||
/**
|
||||
* Utility to create an edit that updates the notebook's metadata.
|
||||
*
|
||||
* @param newNotebookMetadata The new metadata for the notebook.
|
||||
*/
|
||||
static updateNotebookMetadata(newNotebookMetadata: { [key: string]: any }): NotebookEdit;
|
||||
|
||||
/**
|
||||
* Range of the cells being edited. May be empty.
|
||||
*/
|
||||
range: NotebookRange;
|
||||
|
||||
/**
|
||||
* New cells being inserted. May be empty.
|
||||
*/
|
||||
newCells: NotebookCellData[];
|
||||
|
||||
/**
|
||||
* Optional new metadata for the cells.
|
||||
*/
|
||||
newCellMetadata?: { [key: string]: any };
|
||||
|
||||
/**
|
||||
* Optional new metadata for the notebook.
|
||||
*/
|
||||
newNotebookMetadata?: { [key: string]: any };
|
||||
|
||||
constructor(range: NotebookRange, newCells: NotebookCellData[]);
|
||||
}
|
||||
|
||||
export interface WorkspaceEdit {
|
||||
/**
|
||||
* Set (and replace) edits for a resource.
|
||||
*
|
||||
* @param uri A resource identifier.
|
||||
* @param edits An array of text or notebook edits.
|
||||
*/
|
||||
set(uri: Uri, edits: TextEdit[] | NotebookEdit[]): void;
|
||||
}
|
||||
}
|
||||
@@ -7,21 +7,40 @@ declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/115616 @alexr00
|
||||
|
||||
/**
|
||||
* The action that should be taken when a port is discovered through automatic port forwarding discovery.
|
||||
*/
|
||||
export enum PortAutoForwardAction {
|
||||
/**
|
||||
* Notify the user that the port is being forwarded. This is the default action.
|
||||
*/
|
||||
Notify = 1,
|
||||
/**
|
||||
* Once the port is forwarded, open the browser to the forwarded port.
|
||||
*/
|
||||
OpenBrowser = 2,
|
||||
/**
|
||||
* Once the port is forwarded, open the preview browser to the forwarded port.
|
||||
*/
|
||||
OpenPreview = 3,
|
||||
/**
|
||||
* Forward the port silently.
|
||||
*/
|
||||
Silent = 4,
|
||||
/**
|
||||
* Do not forward the port.
|
||||
*/
|
||||
Ignore = 5,
|
||||
/**
|
||||
* Once the port is forwarded, open the browser to the forwarded port. Only open the browser the first time the port is forwarded in a session.
|
||||
*/
|
||||
OpenBrowserOnce = 6
|
||||
}
|
||||
|
||||
/**
|
||||
* The attributes that a forwarded port can have.
|
||||
*/
|
||||
export class PortAttributes {
|
||||
/**
|
||||
* The port number associated with this this set of attributes.
|
||||
*/
|
||||
port: number;
|
||||
|
||||
/**
|
||||
* The action to be taken when this port is detected for auto forwarding.
|
||||
*/
|
||||
@@ -32,9 +51,12 @@ declare module 'vscode' {
|
||||
* @param port the port number
|
||||
* @param autoForwardAction the action to take when this port is detected
|
||||
*/
|
||||
constructor(port: number, autoForwardAction: PortAutoForwardAction);
|
||||
constructor(autoForwardAction: PortAutoForwardAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* A provider of port attributes. Port attributes are used to determine what action should be taken when a port is discovered.
|
||||
*/
|
||||
export interface PortAttributesProvider {
|
||||
/**
|
||||
* Provides attributes for the given port. For ports that your extension doesn't know about, simply
|
||||
@@ -44,6 +66,21 @@ declare module 'vscode' {
|
||||
providePortAttributes(port: number, pid: number | undefined, commandLine: string | undefined, token: CancellationToken): ProviderResult<PortAttributes>;
|
||||
}
|
||||
|
||||
/**
|
||||
* A selector that will be used to filter which {@link PortAttributesProvider} should be called for each port.
|
||||
*/
|
||||
export interface PortAttributesSelector {
|
||||
/**
|
||||
* Specifying a port range will cause your provider to only be called for ports within the range.
|
||||
*/
|
||||
portRange?: [number, number];
|
||||
|
||||
/**
|
||||
* Specifying a command pattern will cause your provider to only be called for processes whose command line matches the pattern.
|
||||
*/
|
||||
commandPattern?: RegExp;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* If your extension listens on ports, consider registering a PortAttributesProvider to provide information
|
||||
@@ -51,12 +88,12 @@ declare module 'vscode' {
|
||||
* this information with a PortAttributesProvider the extension can tell the editor that these ports should be
|
||||
* ignored, since they don't need to be user facing.
|
||||
*
|
||||
* @param portSelector If registerPortAttributesProvider is called after you start your process then you may already
|
||||
* know the range of ports or the pid of your process. All properties of a the portSelector must be true for your
|
||||
* provider to get called.
|
||||
* The `portRange` is start inclusive and end exclusive.
|
||||
* @param provider The PortAttributesProvider
|
||||
* The results of the PortAttributesProvider are merged with the user setting `remote.portsAttributes`. If the values conflict, the user setting takes precedence.
|
||||
*
|
||||
* @param portSelector It is best practice to specify a port selector to avoid unnecessary calls to your provider.
|
||||
* If you don't specify a port selector your provider will be called for every port, which will result in slower port forwarding for the user.
|
||||
* @param provider The {@link PortAttributesProvider PortAttributesProvider}.
|
||||
*/
|
||||
export function registerPortAttributesProvider(portSelector: { pid?: number; portRange?: [number, number]; commandMatcher?: RegExp }, provider: PortAttributesProvider): Disposable;
|
||||
export function registerPortAttributesProvider(portSelector: PortAttributesSelector, provider: PortAttributesProvider): Disposable;
|
||||
}
|
||||
}
|
||||
|
||||
19
src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts
vendored
Normal file
19
src/vscode-dts/vscode.proposed.profileContentHandlers.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface ProfileContentHandler {
|
||||
readonly name: string;
|
||||
readonly description?: string;
|
||||
saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>;
|
||||
readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable<string | null>;
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
|
||||
}
|
||||
|
||||
}
|
||||
17
src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts
vendored
Normal file
17
src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/169012
|
||||
|
||||
export namespace window {
|
||||
export function registerQuickDiffProvider(selector: DocumentSelector, quickDiffProvider: QuickDiffProvider, label: string, rootUri?: Uri): Disposable;
|
||||
}
|
||||
|
||||
interface QuickDiffProvider {
|
||||
label?: string;
|
||||
}
|
||||
}
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode-jupyter/issues/7373
|
||||
// https://github.com/microsoft/vscode/issues/175662
|
||||
|
||||
export interface NotebookController {
|
||||
export interface QuickPickItem {
|
||||
/**
|
||||
* The human-readable label used to categorise controllers.
|
||||
* A tooltip that is rendered when hovering over the item.
|
||||
*/
|
||||
kind?: string;
|
||||
tooltip?: string | MarkdownString;
|
||||
}
|
||||
}
|
||||
57
src/vscode-dts/vscode.proposed.resolvers.d.ts
vendored
57
src/vscode-dts/vscode.proposed.resolvers.d.ts
vendored
@@ -26,6 +26,23 @@ declare module 'vscode' {
|
||||
constructor(host: string, port: number, connectionToken?: string);
|
||||
}
|
||||
|
||||
export interface ManagedMessagePassing {
|
||||
onDidReceiveMessage: Event<Uint8Array>;
|
||||
onDidClose: Event<Error | undefined>;
|
||||
onDidEnd: Event<void>;
|
||||
|
||||
send: (data: Uint8Array) => void;
|
||||
end: () => void;
|
||||
drain?: () => Thenable<void>;
|
||||
}
|
||||
|
||||
export class ManagedResolvedAuthority {
|
||||
readonly makeConnection: () => Thenable<ManagedMessagePassing>;
|
||||
readonly connectionToken: string | undefined;
|
||||
|
||||
constructor(makeConnection: () => Thenable<ManagedMessagePassing>, connectionToken?: string);
|
||||
}
|
||||
|
||||
export interface ResolvedOptions {
|
||||
extensionHostEnv?: { [key: string]: string | null };
|
||||
|
||||
@@ -43,7 +60,14 @@ declare module 'vscode' {
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface TunnelOptions {
|
||||
export namespace env {
|
||||
/** Quality of the application. May be undefined if running from sources. */
|
||||
export const appQuality: string | undefined;
|
||||
/** Commit of the application. May be undefined if running from sources. */
|
||||
export const appCommit: string | undefined;
|
||||
}
|
||||
|
||||
interface TunnelOptions {
|
||||
remoteAddress: { port: number; host: string };
|
||||
// The desired local port. If this port can't be used, then another will be chosen.
|
||||
localAddressPort?: number;
|
||||
@@ -56,7 +80,7 @@ declare module 'vscode' {
|
||||
protocol?: string;
|
||||
}
|
||||
|
||||
export interface TunnelDescription {
|
||||
interface TunnelDescription {
|
||||
remoteAddress: { port: number; host: string };
|
||||
//The complete local address(ex. localhost:1234)
|
||||
localAddress: { port: number; host: string } | string;
|
||||
@@ -69,7 +93,7 @@ declare module 'vscode' {
|
||||
protocol?: string;
|
||||
}
|
||||
|
||||
export interface Tunnel extends TunnelDescription {
|
||||
interface Tunnel extends TunnelDescription {
|
||||
// Implementers of Tunnel should fire onDidDispose when dispose is called.
|
||||
onDidDispose: Event<void>;
|
||||
dispose(): void | Thenable<void>;
|
||||
@@ -109,7 +133,7 @@ declare module 'vscode' {
|
||||
Output = 2
|
||||
}
|
||||
|
||||
export type ResolverResult = ResolvedAuthority & ResolvedOptions & TunnelInformation;
|
||||
export type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
|
||||
|
||||
export class RemoteAuthorityResolverError extends Error {
|
||||
static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError;
|
||||
@@ -164,29 +188,6 @@ declare module 'vscode' {
|
||||
candidatePortSource?: CandidatePortSource;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* Forwards a port. If the current resolver implements RemoteAuthorityResolver:forwardPort then that will be used to make the tunnel.
|
||||
* By default, openTunnel only support localhost; however, RemoteAuthorityResolver:tunnelFactory can be used to support other ips.
|
||||
*
|
||||
* @throws When run in an environment without a remote.
|
||||
*
|
||||
* @param tunnelOptions The `localPort` is a suggestion only. If that port is not available another will be chosen.
|
||||
*/
|
||||
export function openTunnel(tunnelOptions: TunnelOptions): Thenable<Tunnel>;
|
||||
|
||||
/**
|
||||
* Gets an array of the currently available tunnels. This does not include environment tunnels, only tunnels that have been created by the user.
|
||||
* Note that these are of type TunnelDescription and cannot be disposed.
|
||||
*/
|
||||
export let tunnels: Thenable<TunnelDescription[]>;
|
||||
|
||||
/**
|
||||
* Fired when the list of tunnels has changed.
|
||||
*/
|
||||
export const onDidChangeTunnels: Event<void>;
|
||||
}
|
||||
|
||||
export interface ResourceLabelFormatter {
|
||||
scheme: string;
|
||||
authority?: string;
|
||||
@@ -196,7 +197,7 @@ declare module 'vscode' {
|
||||
export interface ResourceLabelFormatting {
|
||||
label: string; // myLabel:/${path}
|
||||
// For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
|
||||
// eslint-disable-next-line vscode-dts-literal-or-types
|
||||
// eslint-disable-next-line local/vscode-dts-literal-or-types, local/vscode-dts-string-type-literals
|
||||
separator: '/' | '\\' | '';
|
||||
tildify?: boolean;
|
||||
normalizeDriveLetter?: boolean;
|
||||
|
||||
35
src/vscode-dts/vscode.proposed.saveEditor.d.ts
vendored
Normal file
35
src/vscode-dts/vscode.proposed.saveEditor.d.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/178713
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export namespace workspace {
|
||||
|
||||
/**
|
||||
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
|
||||
* if save was not successful or no editor with the given resource was found.
|
||||
*
|
||||
* **Note** that an editor with the provided resource must be opened in order to be saved.
|
||||
*
|
||||
* @param uri the associated uri for the opened editor to save.
|
||||
* @return A thenable that resolves when the save operation has finished.
|
||||
*/
|
||||
export function save(uri: Uri): Thenable<Uri | undefined>;
|
||||
|
||||
/**
|
||||
* Saves the editor identified by the given resource to a new file name as provided by the user and
|
||||
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
|
||||
* with the given resource was found.
|
||||
*
|
||||
* **Note** that an editor with the provided resource must be opened in order to be saved as.
|
||||
*
|
||||
* @param uri the associated uri for the opened editor to save as.
|
||||
* @return A thenable that resolves when the save-as operation has finished.
|
||||
*/
|
||||
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
|
||||
}
|
||||
}
|
||||
@@ -4,21 +4,16 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/127473
|
||||
// https://github.com/microsoft/vscode/issues/166615
|
||||
|
||||
/**
|
||||
* The state of a comment thread.
|
||||
* Represents the input box in the Source Control viewlet.
|
||||
*/
|
||||
export enum CommentThreadState {
|
||||
Unresolved = 0,
|
||||
Resolved = 1
|
||||
}
|
||||
export interface SourceControlInputBox {
|
||||
|
||||
export interface CommentThread {
|
||||
/**
|
||||
* The optional state of a comment thread, which may affect how the comment is displayed.
|
||||
* The {@link TextDocument text} of the input box.
|
||||
*/
|
||||
state?: CommentThreadState;
|
||||
readonly document: TextDocument;
|
||||
}
|
||||
}
|
||||
22
src/vscode-dts/vscode.proposed.semanticSimilarity.d.ts
vendored
Normal file
22
src/vscode-dts/vscode.proposed.semanticSimilarity.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
export interface SemanticSimilarityProvider {
|
||||
/**
|
||||
* Computes the semantic similarity score between two strings.
|
||||
* @param string1 The string to compare to all other strings.
|
||||
* @param comparisons An array of strings to compare string1 to. An array allows you to batch multiple comparisons in one call.
|
||||
* @param token A cancellation token.
|
||||
* @return A promise that resolves to the semantic similarity scores between string1 and each string in comparisons.
|
||||
* The score should be a number between 0 and 1, where 0 means no similarity and 1 means
|
||||
* perfect similarity.
|
||||
*/
|
||||
provideSimilarityScore(string1: string, comparisons: string[], token: CancellationToken): Thenable<number[]>;
|
||||
}
|
||||
export namespace ai {
|
||||
export function registerSemanticSimilarityProvider(provider: SemanticSimilarityProvider): Disposable;
|
||||
}
|
||||
}
|
||||
73
src/vscode-dts/vscode.proposed.shareProvider.d.ts
vendored
Normal file
73
src/vscode-dts/vscode.proposed.shareProvider.d.ts
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/176316 @joyceerhl
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
/**
|
||||
* Data about an item which can be shared.
|
||||
*/
|
||||
export interface ShareableItem {
|
||||
/**
|
||||
* A resource in the workspace that can be shared.
|
||||
*/
|
||||
resourceUri: Uri;
|
||||
|
||||
/**
|
||||
* If present, a selection within the `resourceUri`.
|
||||
*/
|
||||
selection?: Range;
|
||||
}
|
||||
|
||||
/**
|
||||
* A provider which generates share links for resources in the editor.
|
||||
*/
|
||||
export interface ShareProvider {
|
||||
|
||||
/**
|
||||
* A unique ID for the provider.
|
||||
* This will be used to activate specific extensions contributing share providers if necessary.
|
||||
*/
|
||||
readonly id: string;
|
||||
|
||||
/**
|
||||
* A label which will be used to present this provider's options in the UI.
|
||||
*/
|
||||
readonly label: string;
|
||||
|
||||
/**
|
||||
* The order in which the provider should be listed in the UI when there are multiple providers.
|
||||
*/
|
||||
readonly priority: number;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param item Data about an item which can be shared.
|
||||
* @param token A cancellation token.
|
||||
* @returns An {@link Uri} which will be copied to the user's clipboard and presented in a confirmation dialog.
|
||||
*/
|
||||
provideShare(item: ShareableItem, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
|
||||
/**
|
||||
* Register a share provider. An extension may register multiple share providers.
|
||||
* There may be multiple share providers for the same {@link ShareableItem}.
|
||||
* @param selector A document selector to filter whether the provider should be shown for a {@link ShareableItem}.
|
||||
* @param provider A share provider.
|
||||
*/
|
||||
export function registerShareProvider(selector: DocumentSelector, provider: ShareProvider): Disposable;
|
||||
}
|
||||
|
||||
export interface TreeItem {
|
||||
|
||||
/**
|
||||
* An optional property which, when set, inlines a `Share` option in the context menu for this tree item.
|
||||
*/
|
||||
shareableItem?: ShareableItem;
|
||||
}
|
||||
}
|
||||
19
src/vscode-dts/vscode.proposed.showLocal.d.ts
vendored
Normal file
19
src/vscode-dts/vscode.proposed.showLocal.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/131138
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface OpenDialogOptions {
|
||||
/**
|
||||
* Controls whether the dialog allows users to select local files via the "Show Local" button.
|
||||
* Extensions that set this to `true` should check the scheme of the selected file.
|
||||
* Resources with the `file` scheme come from the same extension host as the extension.
|
||||
* Resources with the `vscode-local` scheme come from an extension host running in the same place as the UI.
|
||||
*/
|
||||
allowUIResources?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,5 @@ declare module 'vscode' {
|
||||
* Controls whether the task is executed in a specific terminal group using split panes.
|
||||
*/
|
||||
group?: string;
|
||||
|
||||
/**
|
||||
* Controls whether the terminal is closed after executing the task.
|
||||
*/
|
||||
close?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ declare module 'vscode' {
|
||||
/**
|
||||
* Whether or not usage telemetry collection is allowed
|
||||
*/
|
||||
isUsageEnabled: boolean;
|
||||
readonly isUsageEnabled: boolean;
|
||||
/**
|
||||
* Whether or not crash error telemetry collection is allowed
|
||||
*/
|
||||
isErrorsEnabled: boolean;
|
||||
readonly isErrorsEnabled: boolean;
|
||||
/**
|
||||
* Whether or not crash report collection is allowed
|
||||
*/
|
||||
isCrashEnabled: boolean;
|
||||
readonly isCrashEnabled: boolean;
|
||||
}
|
||||
|
||||
export namespace env {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/130231
|
||||
|
||||
/**
|
||||
* Terminal exit reason kind.
|
||||
*/
|
||||
export enum TerminalExitReason {
|
||||
/**
|
||||
* Unknown reason.
|
||||
*/
|
||||
Unknown = 0,
|
||||
|
||||
/**
|
||||
* The window closed/reloaded.
|
||||
*/
|
||||
Shutdown = 1,
|
||||
|
||||
/**
|
||||
* The shell process exited.
|
||||
*/
|
||||
Process = 2,
|
||||
|
||||
/**
|
||||
* The user closed the terminal.
|
||||
*/
|
||||
User = 3,
|
||||
|
||||
/**
|
||||
* An extension disposed the terminal.
|
||||
*/
|
||||
Extension = 4,
|
||||
}
|
||||
|
||||
export interface TerminalExitStatus {
|
||||
/**
|
||||
* The reason that triggered the exit of a terminal.
|
||||
*/
|
||||
readonly reason: TerminalExitReason;
|
||||
}
|
||||
|
||||
}
|
||||
84
src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts
vendored
Normal file
84
src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface TerminalQuickFixProvider {
|
||||
/**
|
||||
* Provides terminal quick fixes
|
||||
* @param commandMatchResult The command match result for which to provide quick fixes
|
||||
* @param token A cancellation token indicating the result is no longer needed
|
||||
* @return Terminal quick fix(es) if any
|
||||
*/
|
||||
provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken): ProviderResult<(TerminalQuickFixCommand | TerminalQuickFixOpener)[] | TerminalQuickFixCommand | TerminalQuickFixOpener>;
|
||||
}
|
||||
|
||||
|
||||
export interface TerminalCommandMatchResult {
|
||||
commandLine: string;
|
||||
commandLineMatch: RegExpMatchArray;
|
||||
outputMatch?: {
|
||||
regexMatch: RegExpMatchArray;
|
||||
outputLines: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
/**
|
||||
* @param provider A terminal quick fix provider
|
||||
* @return A {@link Disposable} that unregisters the provider when being disposed
|
||||
*/
|
||||
export function registerTerminalQuickFixProvider(id: string, provider: TerminalQuickFixProvider): Disposable;
|
||||
}
|
||||
|
||||
export class TerminalQuickFixCommand {
|
||||
/**
|
||||
* The terminal command to run
|
||||
*/
|
||||
terminalCommand: string;
|
||||
constructor(terminalCommand: string);
|
||||
}
|
||||
export class TerminalQuickFixOpener {
|
||||
/**
|
||||
* The uri to open
|
||||
*/
|
||||
uri: Uri;
|
||||
constructor(uri: Uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* A matcher that runs on a sub-section of a terminal command's output
|
||||
*/
|
||||
interface TerminalOutputMatcher {
|
||||
/**
|
||||
* A string or regex to match against the unwrapped line. If this is a regex with the multiline
|
||||
* flag, it will scan an amount of lines equal to `\n` instances in the regex + 1.
|
||||
*/
|
||||
lineMatcher: string | RegExp;
|
||||
/**
|
||||
* Which side of the output to anchor the {@link offset} and {@link length} against.
|
||||
*/
|
||||
anchor: TerminalOutputAnchor;
|
||||
/**
|
||||
* The number of rows above or below the {@link anchor} to start matching against.
|
||||
*/
|
||||
offset: number;
|
||||
/**
|
||||
* The number of wrapped lines to match against, this should be as small as possible for performance
|
||||
* reasons. This is capped at 40.
|
||||
*/
|
||||
length: number;
|
||||
}
|
||||
|
||||
enum TerminalOutputAnchor {
|
||||
Top = 0,
|
||||
Bottom = 1
|
||||
}
|
||||
|
||||
enum TerminalQuickFixType {
|
||||
Command = 0,
|
||||
Opener = 1
|
||||
}
|
||||
}
|
||||
30
src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts
vendored
Normal file
30
src/vscode-dts/vscode.proposed.testInvalidateResults.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/134970
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export interface TestController {
|
||||
|
||||
/**
|
||||
* Marks an item's results as being outdated. This is commonly called when
|
||||
* code or configuration changes and previous results should no longer
|
||||
* be considered relevant. The same logic used to mark results as outdated
|
||||
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
|
||||
*
|
||||
* If an item is passed to this method, test results for the item and all of
|
||||
* its children will be marked as outdated. If no item is passed, then all
|
||||
* test owned by the TestController will be marked as outdated.
|
||||
*
|
||||
* Any test runs started before the moment this method is called, including
|
||||
* runs which may still be ongoing, will be marked as outdated and deprioritized
|
||||
* in the editor's UI.
|
||||
*
|
||||
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
|
||||
*/
|
||||
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;
|
||||
}
|
||||
}
|
||||
58
src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts
vendored
Normal file
58
src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
export class TreeItem2 extends TreeItem {
|
||||
/**
|
||||
* {@link TreeItemCheckboxState TreeItemCheckboxState} of the tree item.
|
||||
* {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} should be fired when {@link TreeItem2.checkboxState checkboxState} changes.
|
||||
*/
|
||||
checkboxState?: TreeItemCheckboxState | { readonly state: TreeItemCheckboxState; readonly tooltip?: string; readonly accessibilityInformation?: AccessibilityInformation };
|
||||
}
|
||||
|
||||
/**
|
||||
* Checkbox state of the tree item
|
||||
*/
|
||||
export enum TreeItemCheckboxState {
|
||||
/**
|
||||
* Determines an item is unchecked
|
||||
*/
|
||||
Unchecked = 0,
|
||||
/**
|
||||
* Determines an item is checked
|
||||
*/
|
||||
Checked = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* A data provider that provides tree data
|
||||
*/
|
||||
export interface TreeView<T> {
|
||||
/**
|
||||
* An event to signal that an element or root has either been checked or unchecked.
|
||||
*/
|
||||
onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;
|
||||
}
|
||||
|
||||
export interface TreeCheckboxChangeEvent<T> {
|
||||
/**
|
||||
* The items that were checked or unchecked.
|
||||
*/
|
||||
readonly items: ReadonlyArray<[T, TreeItemCheckboxState]>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for creating a {@link TreeView}
|
||||
*/
|
||||
export interface TreeViewOptions<T> {
|
||||
/**
|
||||
* By default, when the children of a tree item have already been fetched, child checkboxes are automatically managed based on the checked state of the parent tree item.
|
||||
* If the tree item is collapsed by default (meaning that the children haven't yet been fetched) then child checkboxes will not be updated.
|
||||
* To override this behavior and manage child and parent checkbox state in the extension, set this to `true`.
|
||||
*/
|
||||
manuallyManageCheckboxSelection?: boolean;
|
||||
}
|
||||
}
|
||||
64
src/vscode-dts/vscode.proposed.tunnels.d.ts
vendored
Normal file
64
src/vscode-dts/vscode.proposed.tunnels.d.ts
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// tunnels @alexr00
|
||||
|
||||
export interface TunnelOptions {
|
||||
remoteAddress: { port: number; host: string };
|
||||
// The desired local port. If this port can't be used, then another will be chosen.
|
||||
localAddressPort?: number;
|
||||
label?: string;
|
||||
/**
|
||||
* @deprecated Use privacy instead
|
||||
*/
|
||||
public?: boolean;
|
||||
privacy?: string;
|
||||
protocol?: string;
|
||||
}
|
||||
|
||||
export interface TunnelDescription {
|
||||
remoteAddress: { port: number; host: string };
|
||||
//The complete local address(ex. localhost:1234)
|
||||
localAddress: { port: number; host: string } | string;
|
||||
/**
|
||||
* @deprecated Use privacy instead
|
||||
*/
|
||||
public?: boolean;
|
||||
privacy?: string;
|
||||
// If protocol is not provided it is assumed to be http, regardless of the localAddress.
|
||||
protocol?: string;
|
||||
}
|
||||
|
||||
export interface Tunnel extends TunnelDescription {
|
||||
// Implementers of Tunnel should fire onDidDispose when dispose is called.
|
||||
onDidDispose: Event<void>;
|
||||
dispose(): void | Thenable<void>;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* Forwards a port. If the current resolver implements RemoteAuthorityResolver:forwardPort then that will be used to make the tunnel.
|
||||
* By default, openTunnel only support localhost; however, RemoteAuthorityResolver:tunnelFactory can be used to support other ips.
|
||||
*
|
||||
* @throws When run in an environment without a remote.
|
||||
*
|
||||
* @param tunnelOptions The `localPort` is a suggestion only. If that port is not available another will be chosen.
|
||||
*/
|
||||
export function openTunnel(tunnelOptions: TunnelOptions): Thenable<Tunnel>;
|
||||
|
||||
/**
|
||||
* Gets an array of the currently available tunnels. This does not include environment tunnels, only tunnels that have been created by the user.
|
||||
* Note that these are of type TunnelDescription and cannot be disposed.
|
||||
*/
|
||||
export let tunnels: Thenable<TunnelDescription[]>;
|
||||
|
||||
/**
|
||||
* Fired when the list of tunnels has changed.
|
||||
*/
|
||||
export const onDidChangeTunnels: Event<void>;
|
||||
}
|
||||
}
|
||||
17
src/vscode-dts/vscode.proposed.windowActivity.d.ts
vendored
Normal file
17
src/vscode-dts/vscode.proposed.windowActivity.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/181569 @connor4312
|
||||
|
||||
export interface WindowState {
|
||||
/**
|
||||
* Indicates whether the window has been interacted with recently. This will
|
||||
* change immediately on activity, or after a short time of user inactivity.
|
||||
*/
|
||||
readonly active: boolean;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user