@opensumi/sumi 2.20.10 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/manifest.json +123 -114
- package/package.json +3 -3
- package/sumi-worker/sumi-worker.d.ts +166 -0
- package/sumi-worker/worker.language.d.ts +166 -0
- package/vscode/typings/vscode.command.d.ts +77 -77
- package/vscode/typings/vscode.comments.d.ts +6 -0
- package/vscode/typings/vscode.d.ts +267 -3
- package/vscode/typings/vscode.debug.d.ts +1 -1
- package/vscode/typings/vscode.doc.d.ts +0 -4
- package/vscode/typings/vscode.env.d.ts +20 -20
- package/vscode/typings/vscode.language.d.ts +170 -0
- package/vscode/typings/vscode.proposed.authSession.d.ts +47 -0
- package/vscode/typings/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode/typings/vscode.proposed.openEditors.d.ts +35 -0
- package/vscode/typings/vscode.proposed.scm.d.ts +69 -0
- package/vscode/typings/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode/typings/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode/typings/vscode.proposed.scmValidation.d.ts +54 -0
- package/vscode/typings/vscode.proposed.task.d.ts +20 -0
- package/vscode/typings/vscode.proposed.terminalDimensions.d.ts +23 -0
- package/vscode/typings/vscode.proposed.timeline.d.ts +163 -0
- package/vscode/typings/vscode.quickpick.d.ts +49 -2
- package/vscode/typings/vscode.scm.d.ts +10 -10
- package/vscode/typings/vscode.window.d.ts +17 -8
- package/vscode/typings/vscode.workspace.d.ts +18 -18
- package/vscode.d.ts +11 -1
- package/vscode/typings/vscode.proposed.d.ts +0 -789
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/Microsoft/vscode/issues/15178
|
|
9
|
+
|
|
10
|
+
// TODO@API must be a class
|
|
11
|
+
export interface OpenEditorInfo {
|
|
12
|
+
name: string;
|
|
13
|
+
resource: Uri;
|
|
14
|
+
isActive: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export namespace window {
|
|
18
|
+
export const openEditors: ReadonlyArray<OpenEditorInfo>;
|
|
19
|
+
|
|
20
|
+
// todo@API proper event type
|
|
21
|
+
export const onDidChangeOpenEditors: Event<void>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
|
|
26
|
+
export namespace extensions {
|
|
27
|
+
/**
|
|
28
|
+
* All extensions across all extension hosts.
|
|
29
|
+
*
|
|
30
|
+
* @see {@link Extension.isFromDifferentExtensionHost}
|
|
31
|
+
*/
|
|
32
|
+
export const allAcrossExtensionHosts: readonly Extension<void>[];
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* This is the place for API experiments and proposals.
|
|
8
|
+
* These API are NOT stable and subject to change. They are only available in the Insiders
|
|
9
|
+
* distribution and CANNOT be used in published extensions.
|
|
10
|
+
*
|
|
11
|
+
* To test these API in local environment:
|
|
12
|
+
* - Use Insiders release of VS Code.
|
|
13
|
+
* - Add `"enableProposedApi": true` to your package.json.
|
|
14
|
+
* - Copy this file to your project.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
declare module 'vscode' {
|
|
18
|
+
|
|
19
|
+
export interface SourceControl {
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Whether the source control is selected.
|
|
23
|
+
*/
|
|
24
|
+
readonly selected: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* An event signaling when the selection state changes.
|
|
28
|
+
*/
|
|
29
|
+
readonly onDidChangeSelection: Event<boolean>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
|
|
34
|
+
//#region Joao: SCM Input Box
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Represents the input box in the Source Control viewlet.
|
|
38
|
+
*/
|
|
39
|
+
export interface SourceControlInputBox {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Controls whether the input box is visible (default is `true`).
|
|
43
|
+
*/
|
|
44
|
+
visible: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#region https://github.com/microsoft/vscode/issues/16221
|
|
48
|
+
|
|
49
|
+
// todo@API Split between Inlay- and OverlayHints (InlayHint are for a position, OverlayHints for a non-empty range)
|
|
50
|
+
// todo@API add "mini-markdown" for links and styles
|
|
51
|
+
// (done) remove description
|
|
52
|
+
// (done) rename to InlayHint
|
|
53
|
+
// (done) add InlayHintKind with type, argument, etc
|
|
54
|
+
|
|
55
|
+
export namespace languages {
|
|
56
|
+
/**
|
|
57
|
+
* Register a inlay hints provider.
|
|
58
|
+
*
|
|
59
|
+
* Multiple providers can be registered for a language. In that case providers are asked in
|
|
60
|
+
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
61
|
+
* not cause a failure of the whole operation.
|
|
62
|
+
*
|
|
63
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
64
|
+
* @param provider An inlay hints provider.
|
|
65
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
66
|
+
*/
|
|
67
|
+
export function registerInlayHintsProvider(selector: DocumentSelector, provider: InlayHintsProvider): Disposable;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
// https://github.com/microsoft/vscode/issues/133935
|
|
8
|
+
|
|
9
|
+
export interface SourceControlActionButton {
|
|
10
|
+
command: Command;
|
|
11
|
+
secondaryCommands?: Command[][];
|
|
12
|
+
description?: string;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SourceControl {
|
|
17
|
+
actionButton?: SourceControlActionButton;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// todo@joaomoreno add issue reference
|
|
9
|
+
|
|
10
|
+
export interface SourceControl {
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Whether the source control is selected.
|
|
14
|
+
*/
|
|
15
|
+
readonly selected: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* An event signaling when the selection state changes.
|
|
19
|
+
*/
|
|
20
|
+
readonly onDidChangeSelection: Event<boolean>;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// todo@joaomoreno add issue reference
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents the validation type of the Source Control input.
|
|
12
|
+
*/
|
|
13
|
+
export enum SourceControlInputBoxValidationType {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Something not allowed by the rules of a language or other means.
|
|
17
|
+
*/
|
|
18
|
+
Error = 0,
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Something suspicious but allowed.
|
|
22
|
+
*/
|
|
23
|
+
Warning = 1,
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Something to inform about but not a problem.
|
|
27
|
+
*/
|
|
28
|
+
Information = 2
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface SourceControlInputBoxValidation {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The validation message to display.
|
|
35
|
+
*/
|
|
36
|
+
readonly message: string | MarkdownString;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The validation type.
|
|
40
|
+
*/
|
|
41
|
+
readonly type: SourceControlInputBoxValidationType;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Represents the input box in the Source Control viewlet.
|
|
46
|
+
*/
|
|
47
|
+
export interface SourceControlInputBox {
|
|
48
|
+
/**
|
|
49
|
+
* A validation function for the input box. It's possible to change
|
|
50
|
+
* the validation provider simply by setting this property to a different function.
|
|
51
|
+
*/
|
|
52
|
+
validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation>;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
/**
|
|
8
|
+
* A task to execute
|
|
9
|
+
*/
|
|
10
|
+
export class Task2 extends Task {
|
|
11
|
+
detail?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TaskPresentationOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Controls whether the task is executed in a specific terminal group using split panes.
|
|
17
|
+
*/
|
|
18
|
+
group?: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/55718
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An {@link Event} which fires when a {@link Terminal}'s dimensions change.
|
|
12
|
+
*/
|
|
13
|
+
export interface TerminalDimensionsChangeEvent {
|
|
14
|
+
/**
|
|
15
|
+
* The {@link Terminal} for which the dimensions have changed.
|
|
16
|
+
*/
|
|
17
|
+
readonly terminal: Terminal;
|
|
18
|
+
/**
|
|
19
|
+
* The new value for the {@link Terminal.dimensions terminal's dimensions}.
|
|
20
|
+
*/
|
|
21
|
+
readonly dimensions: TerminalDimensions;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/84297
|
|
9
|
+
|
|
10
|
+
export class TimelineItem {
|
|
11
|
+
/**
|
|
12
|
+
* A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred.
|
|
13
|
+
*/
|
|
14
|
+
timestamp: number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A human-readable string describing the timeline item.
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Optional id for the timeline item. It must be unique across all the timeline items provided by this source.
|
|
23
|
+
*
|
|
24
|
+
* If not provided, an id is generated using the timeline item's timestamp.
|
|
25
|
+
*/
|
|
26
|
+
id?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The icon path or {@link ThemeIcon} for the timeline item.
|
|
30
|
+
*/
|
|
31
|
+
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A human readable string describing less prominent details of the timeline item.
|
|
35
|
+
*/
|
|
36
|
+
description?: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The tooltip text when you hover over the timeline item.
|
|
40
|
+
*/
|
|
41
|
+
tooltip?: string | MarkdownString | undefined;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The {@link Command} that should be executed when the timeline item is selected.
|
|
45
|
+
*/
|
|
46
|
+
command?: Command;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Context value of the timeline item. This can be used to contribute specific actions to the item.
|
|
50
|
+
* For example, a timeline item is given a context value as `commit`. When contributing actions to `timeline/item/context`
|
|
51
|
+
* using `menus` extension point, you can specify context value for key `timelineItem` in `when` expression like `timelineItem == commit`.
|
|
52
|
+
* ```
|
|
53
|
+
* "contributes": {
|
|
54
|
+
* "menus": {
|
|
55
|
+
* "timeline/item/context": [
|
|
56
|
+
* {
|
|
57
|
+
* "command": "extension.copyCommitId",
|
|
58
|
+
* "when": "timelineItem == commit"
|
|
59
|
+
* }
|
|
60
|
+
* ]
|
|
61
|
+
* }
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
* This will show the `extension.copyCommitId` action only for items where `contextValue` is `commit`.
|
|
65
|
+
*/
|
|
66
|
+
contextValue?: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Accessibility information used when screen reader interacts with this timeline item.
|
|
70
|
+
*/
|
|
71
|
+
accessibilityInformation?: AccessibilityInformation;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @param label A human-readable string describing the timeline item
|
|
75
|
+
* @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
|
|
76
|
+
*/
|
|
77
|
+
constructor(label: string, timestamp: number);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface TimelineChangeEvent {
|
|
81
|
+
/**
|
|
82
|
+
* The {@link Uri} of the resource for which the timeline changed.
|
|
83
|
+
*/
|
|
84
|
+
uri: Uri;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A flag which indicates whether the entire timeline should be reset.
|
|
88
|
+
*/
|
|
89
|
+
reset?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface Timeline {
|
|
93
|
+
readonly paging?: {
|
|
94
|
+
/**
|
|
95
|
+
* A provider-defined cursor specifying the starting point of timeline items which are after the ones returned.
|
|
96
|
+
* Use `undefined` to signal that there are no more items to be returned.
|
|
97
|
+
*/
|
|
98
|
+
readonly cursor: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* An array of {@link TimelineItem timeline items}.
|
|
103
|
+
*/
|
|
104
|
+
readonly items: readonly TimelineItem[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface TimelineOptions {
|
|
108
|
+
/**
|
|
109
|
+
* A provider-defined cursor specifying the starting point of the timeline items that should be returned.
|
|
110
|
+
*/
|
|
111
|
+
cursor?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* An optional maximum number timeline items or the all timeline items newer (inclusive) than the timestamp or id that should be returned.
|
|
115
|
+
* If `undefined` all timeline items should be returned.
|
|
116
|
+
*/
|
|
117
|
+
limit?: number | { timestamp: number; id?: string };
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface TimelineProvider {
|
|
121
|
+
/**
|
|
122
|
+
* An optional event to signal that the timeline for a source has changed.
|
|
123
|
+
* To signal that the timeline for all resources (uris) has changed, do not pass any argument or pass `undefined`.
|
|
124
|
+
*/
|
|
125
|
+
onDidChange?: Event<TimelineChangeEvent | undefined>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* An identifier of the source of the timeline items. This can be used to filter sources.
|
|
129
|
+
*/
|
|
130
|
+
readonly id: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A human-readable string describing the source of the timeline items. This can be used as the display label when filtering sources.
|
|
134
|
+
*/
|
|
135
|
+
readonly label: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Provide {@link TimelineItem timeline items} for a {@link Uri}.
|
|
139
|
+
*
|
|
140
|
+
* @param uri The {@link Uri} of the file to provide the timeline for.
|
|
141
|
+
* @param options A set of options to determine how results should be returned.
|
|
142
|
+
* @param token A cancellation token.
|
|
143
|
+
* @return The {@link TimelineResult timeline result} or a thenable that resolves to such. The lack of a result
|
|
144
|
+
* can be signaled by returning `undefined`, `null`, or an empty array.
|
|
145
|
+
*/
|
|
146
|
+
provideTimeline(uri: Uri, options: TimelineOptions, token: CancellationToken): ProviderResult<Timeline>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export namespace workspace {
|
|
150
|
+
/**
|
|
151
|
+
* Register a timeline provider.
|
|
152
|
+
*
|
|
153
|
+
* Multiple providers can be registered. In that case, providers are asked in
|
|
154
|
+
* parallel and the results are merged. A failing provider (rejected promise or exception) will
|
|
155
|
+
* not cause a failure of the whole operation.
|
|
156
|
+
*
|
|
157
|
+
* @param scheme A scheme or schemes that defines which documents this provider is applicable to. Can be `*` to target all documents.
|
|
158
|
+
* @param provider A timeline provider.
|
|
159
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
160
|
+
*/
|
|
161
|
+
export function registerTimelineProvider(scheme: string | string[], provider: TimelineProvider): Disposable;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
declare module 'vscode' {
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* The kind of {@link QuickPickItem quick pick item}.
|
|
5
|
+
*/
|
|
6
|
+
export enum QuickPickItemKind {
|
|
7
|
+
/**
|
|
8
|
+
* When a {@link QuickPickItem} has a kind of {@link Separator}, the item is just a visual separator and does not represent a real item.
|
|
9
|
+
* The only property that applies is {@link QuickPickItem.label label }. All other properties on {@link QuickPickItem} will be ignored and have no effect.
|
|
10
|
+
*/
|
|
11
|
+
Separator = -1,
|
|
12
|
+
/**
|
|
13
|
+
* The default {@link QuickPickItem.kind} is an item that can be selected in the quick pick.
|
|
14
|
+
*/
|
|
15
|
+
Default = 0,
|
|
16
|
+
}
|
|
17
|
+
|
|
3
18
|
/**
|
|
4
19
|
* Represents an item that can be selected from
|
|
5
20
|
* a list of items.
|
|
@@ -11,6 +26,12 @@ declare module 'vscode' {
|
|
|
11
26
|
*/
|
|
12
27
|
label: string;
|
|
13
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The kind of QuickPickItem that will determine how this item is rendered in the quick pick. When not specified,
|
|
31
|
+
* the default is {@link QuickPickItemKind.Default}.
|
|
32
|
+
*/
|
|
33
|
+
kind?: QuickPickItemKind;
|
|
34
|
+
|
|
14
35
|
/**
|
|
15
36
|
* A human readable string which is rendered less prominent.
|
|
16
37
|
*/
|
|
@@ -335,7 +356,7 @@ declare module 'vscode' {
|
|
|
335
356
|
* @return A human readable string which is presented as diagnostic message.
|
|
336
357
|
* Return `undefined`, `null`, or the empty string when 'value' is valid.
|
|
337
358
|
*/
|
|
338
|
-
validateInput?(value: string): string | undefined | null | Thenable<string | undefined | null>;
|
|
359
|
+
validateInput?(value: string): string | InputBoxValidationMessage | undefined | null | Thenable<string | InputBoxValidationMessage | undefined | null>;
|
|
339
360
|
}
|
|
340
361
|
|
|
341
362
|
/**
|
|
@@ -390,7 +411,7 @@ declare module 'vscode' {
|
|
|
390
411
|
/**
|
|
391
412
|
* An optional validation message indicating a problem with the current input value.
|
|
392
413
|
*/
|
|
393
|
-
validationMessage: string | undefined;
|
|
414
|
+
validationMessage: string | InputBoxValidationMessage | undefined;
|
|
394
415
|
}
|
|
395
416
|
|
|
396
417
|
|
|
@@ -524,4 +545,30 @@ declare module 'vscode' {
|
|
|
524
545
|
readonly item: T;
|
|
525
546
|
}
|
|
526
547
|
|
|
548
|
+
/**
|
|
549
|
+
* Impacts the behavior and appearance of the validation message.
|
|
550
|
+
*/
|
|
551
|
+
export enum InputBoxValidationSeverity {
|
|
552
|
+
Info = 1,
|
|
553
|
+
Warning = 2,
|
|
554
|
+
Error = 3
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Object to configure the behavior of the validation message.
|
|
559
|
+
*/
|
|
560
|
+
export interface InputBoxValidationMessage {
|
|
561
|
+
/**
|
|
562
|
+
* The validation message to display.
|
|
563
|
+
*/
|
|
564
|
+
readonly message: string;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* The severity of the validation message.
|
|
568
|
+
* NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
|
|
569
|
+
* `Info` and `Warning` will still allow the InputBox to accept the input.
|
|
570
|
+
*/
|
|
571
|
+
readonly severity: InputBoxValidationSeverity;
|
|
572
|
+
}
|
|
573
|
+
|
|
527
574
|
}
|
|
@@ -198,16 +198,16 @@ declare module 'vscode' {
|
|
|
198
198
|
* For example, if a resource is given a context value as `diffable`. When contributing actions to `scm/resourceState/context`
|
|
199
199
|
* using `menus` extension point, you can specify context value for key `scmResourceState` in `when` expressions, like `scmResourceState == diffable`.
|
|
200
200
|
* ```
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
201
|
+
* "contributes": {
|
|
202
|
+
* "menus": {
|
|
203
|
+
* "scm/resourceState/context": [
|
|
204
|
+
* {
|
|
205
|
+
* "command": "extension.diff",
|
|
206
|
+
* "when": "scmResourceState == diffable"
|
|
207
|
+
* }
|
|
208
|
+
* ]
|
|
209
|
+
* }
|
|
210
|
+
* }
|
|
211
211
|
* ```
|
|
212
212
|
* This will show action `extension.diff` only for resources with `contextValue` is `diffable`.
|
|
213
213
|
*/
|
|
@@ -149,11 +149,11 @@ declare module 'vscode' {
|
|
|
149
149
|
hide(): void;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
* Replaces all output from the channel with the given value.
|
|
153
|
+
*
|
|
154
|
+
* @param value A string, falsy values will not be printed.
|
|
155
|
+
*/
|
|
156
|
+
replace(value: string): void;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Dispose and free associated resources.
|
|
@@ -340,9 +340,9 @@ declare module 'vscode' {
|
|
|
340
340
|
export const onDidCloseTerminal: Event<Terminal>;
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
* An {@link Event} which fires when a {@link Terminal.state terminal's state} has changed.
|
|
344
|
+
*/
|
|
345
|
+
export const onDidChangeTerminalState: Event<Terminal>;
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* Represents the current window's state.
|
|
@@ -472,6 +472,14 @@ declare module 'vscode' {
|
|
|
472
472
|
* @param provider The terminal profile provider.
|
|
473
473
|
*/
|
|
474
474
|
export function registerTerminalProfileProvider(id: string, provider: TerminalProfileProvider): Disposable;
|
|
475
|
+
/**
|
|
476
|
+
* Register a file decoration provider.
|
|
477
|
+
*
|
|
478
|
+
* @param provider A {@link FileDecorationProvider}.
|
|
479
|
+
* @return A {@link Disposable} that unregisters the provider.
|
|
480
|
+
*/
|
|
481
|
+
export function registerFileDecorationProvider(provider: FileDecorationProvider): Disposable;
|
|
482
|
+
|
|
475
483
|
/**
|
|
476
484
|
* ~~Show progress in the Source Control viewlet while running the given callback and while
|
|
477
485
|
* its returned promise isn't resolve or rejected.~~
|
|
@@ -872,6 +880,7 @@ declare module 'vscode' {
|
|
|
872
880
|
Light = 1,
|
|
873
881
|
Dark = 2,
|
|
874
882
|
HighContrast = 3,
|
|
883
|
+
HighContrastLight = 4
|
|
875
884
|
}
|
|
876
885
|
|
|
877
886
|
/**
|
|
@@ -38,16 +38,16 @@ declare module 'vscode' {
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
|
|
41
|
+
* When true, the user has explicitly trusted the contents of the workspace.
|
|
42
42
|
* TODO: 内部无此类需求,先空实现,等有需求再做
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
*/
|
|
44
|
+
export const isTrusted: boolean;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
|
|
47
|
+
* Event that fires when the current workspace has been trusted.
|
|
48
48
|
* TODO: 内部无此类需求,先空实现,等有需求再做
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
*/
|
|
50
|
+
export const onDidGrantWorkspaceTrust: Event<void>;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Returns the [workspace folder](#WorkspaceFolder) that contains a given uri.
|
|
@@ -516,11 +516,11 @@ declare module 'vscode' {
|
|
|
516
516
|
*
|
|
517
517
|
* ```ts
|
|
518
518
|
* workspace.onWillCreateFiles(event => {
|
|
519
|
-
*
|
|
520
|
-
*
|
|
519
|
+
* // async, will *throw* an error
|
|
520
|
+
* setTimeout(() => event.waitUntil(promise));
|
|
521
521
|
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
522
|
+
* // sync, OK
|
|
523
|
+
* event.waitUntil(promise);
|
|
524
524
|
* })
|
|
525
525
|
* ```
|
|
526
526
|
*
|
|
@@ -575,11 +575,11 @@ declare module 'vscode' {
|
|
|
575
575
|
*
|
|
576
576
|
* ```ts
|
|
577
577
|
* workspace.onWillCreateFiles(event => {
|
|
578
|
-
*
|
|
579
|
-
*
|
|
578
|
+
* // async, will *throw* an error
|
|
579
|
+
* setTimeout(() => event.waitUntil(promise));
|
|
580
580
|
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
581
|
+
* // sync, OK
|
|
582
|
+
* event.waitUntil(promise);
|
|
583
583
|
* })
|
|
584
584
|
* ```
|
|
585
585
|
*
|
|
@@ -634,11 +634,11 @@ declare module 'vscode' {
|
|
|
634
634
|
*
|
|
635
635
|
* ```ts
|
|
636
636
|
* workspace.onWillCreateFiles(event => {
|
|
637
|
-
*
|
|
638
|
-
*
|
|
637
|
+
* // async, will *throw* an error
|
|
638
|
+
* setTimeout(() => event.waitUntil(promise));
|
|
639
639
|
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
640
|
+
* // sync, OK
|
|
641
|
+
* event.waitUntil(promise);
|
|
642
642
|
* })
|
|
643
643
|
* ```
|
|
644
644
|
*
|
package/vscode.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* tslint:disable no-reference */
|
|
2
2
|
|
|
3
3
|
/// <reference path='./vscode/typings/vscode.d.ts' />
|
|
4
|
-
/// <reference path='./vscode/typings/vscode.proposed.d.ts' />
|
|
5
4
|
/// <reference path='./vscode/typings/vscode.command.d.ts' />
|
|
6
5
|
/// <reference path='./vscode/typings/vscode.comments.d.ts' />
|
|
7
6
|
/// <reference path='./vscode/typings/vscode.message.d.ts' />
|
|
@@ -22,3 +21,14 @@
|
|
|
22
21
|
|
|
23
22
|
/// <reference path='./vscode/typings-pending/vscode.d.ts' />
|
|
24
23
|
/// <reference path='./vscode/typings-pending/vscode.proposed.d.ts' />
|
|
24
|
+
|
|
25
|
+
/// <reference path='./vscode/typings/vscode.proposed.authSession.d.ts' />
|
|
26
|
+
/// <reference path='./vscode/typings/vscode.proposed.diffCommand.d.ts' />
|
|
27
|
+
/// <reference path='./vscode/typings/vscode.proposed.openEditors.d.ts' />
|
|
28
|
+
/// <reference path='./vscode/typings/vscode.proposed.scm.d.ts' />
|
|
29
|
+
/// <reference path='./vscode/typings/vscode.proposed.scmActionButton.d.ts' />
|
|
30
|
+
/// <reference path='./vscode/typings/vscode.proposed.scmSelectedProvider.d.ts' />
|
|
31
|
+
/// <reference path='./vscode/typings/vscode.proposed.scmValidation.d.ts' />
|
|
32
|
+
/// <reference path='./vscode/typings/vscode.proposed.task.d.ts' />
|
|
33
|
+
/// <reference path='./vscode/typings/vscode.proposed.terminalDimensions.d.ts' />
|
|
34
|
+
/// <reference path='./vscode/typings/vscode.proposed.timeline.d.ts' />
|