@opensumi/sumi 3.6.4 → 3.6.5-next-1734685380.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensumi/sumi",
3
- "version": "3.6.4",
3
+ "version": "3.6.5-next-1734685380.0",
4
4
  "typings": "index.d.ts",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,11 +12,11 @@
12
12
  "build": "tsx ./build.ts"
13
13
  },
14
14
  "dependencies": {
15
- "@opensumi/ide-components": "3.6.4",
15
+ "@opensumi/ide-components": "3.6.5-next-1734685380.0",
16
16
  "vscode-uri": "3.0.2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/react": "^18.2.0"
20
20
  },
21
- "gitHead": "23eb1f073234e9e79a32f81c7384924fc459aa69"
21
+ "gitHead": "f3f687ab92b2f35018432c403476b9ee363071cc"
22
22
  }
@@ -124,6 +124,10 @@ declare module 'sumi-worker' {
124
124
  * Render the line numbers with values relative to the primary cursor location.
125
125
  */
126
126
  Relative = 2,
127
+ /**
128
+ * Render the line numbers on every 10th line number.
129
+ */
130
+ Interval = 3,
127
131
  }
128
132
 
129
133
  /**
package/sumi.d.ts CHANGED
@@ -27,6 +27,7 @@ declare module 'sumi' {
27
27
  TextEditor,
28
28
  TextEditorEdit,
29
29
  ExtensionContext as VSCodeExtensionContext,
30
+ ViewBadge,
30
31
  // eslint-disable-next-line import/no-unresolved
31
32
  } from 'vscode';
32
33
 
@@ -472,10 +473,12 @@ declare module 'sumi' {
472
473
  * @example
473
474
  * ```ts
474
475
  * const tabbar = kaitian.layout.getTabbarHandler('TabbarIconTest');
475
- * tabbar.setBadge('12');
476
+ * tabbar.setBadge({value:20,tooltip:'20'});
477
+ * or
478
+ * tabbar.setBadge('20');
476
479
  * ```
477
480
  */
478
- setBadge(badge: string): void;
481
+ setBadge(badge?: string | ViewBadge): void;
479
482
 
480
483
  activate(): void;
481
484
 
@@ -105,6 +105,11 @@ declare module 'vscode' {
105
105
  * Note: you cannot use this option with any other options that prompt the user like {@link createIfNone}.
106
106
  */
107
107
  silent?: boolean;
108
+
109
+ /**
110
+ * The account that you would like to get a session for. This is passed down to the Authentication Provider to be used for creating the correct session.
111
+ */
112
+ account?: AuthenticationSessionAccountInformation;
108
113
  }
109
114
 
110
115
  /**
@@ -165,6 +170,18 @@ declare module 'vscode' {
165
170
  readonly changed?: ReadonlyArray<AuthenticationSession>;
166
171
  }
167
172
 
173
+ /**
174
+ * The options passed in to the {@link AuthenticationProvider.getSessions} and
175
+ * {@link AuthenticationProvider.createSession} call.
176
+ */
177
+ export interface AuthenticationProviderSessionOptions {
178
+ /**
179
+ * The account that is being asked about. If this is passed in, the provider should
180
+ * attempt to return the sessions that are only related to this account.
181
+ */
182
+ account?: AuthenticationSessionAccountInformation;
183
+ }
184
+
168
185
  /**
169
186
  * A provider for performing authentication to a service.
170
187
  */
@@ -181,7 +198,7 @@ declare module 'vscode' {
181
198
  * these permissions, otherwise all sessions should be returned.
182
199
  * @returns A promise that resolves to an array of authentication sessions.
183
200
  */
184
- getSessions(scopes?: string[]): Thenable<ReadonlyArray<AuthenticationSession>>;
201
+ getSessions(scopes?: string[], options?: AuthenticationProviderSessionOptions): Thenable<ReadonlyArray<AuthenticationSession>>;
185
202
 
186
203
  /**
187
204
  * Prompts a user to login.
@@ -196,8 +213,8 @@ declare module 'vscode' {
196
213
  * @param scopes A list of scopes, permissions, that the new session should be created with.
197
214
  * @returns A promise that resolves to an authentication session.
198
215
  */
199
- createSession(scopes: string[]): Thenable<AuthenticationSession>;
200
-
216
+ createSession(scopes: string[], options: AuthenticationProviderSessionOptions): Thenable<AuthenticationSession>;
217
+
201
218
  /**
202
219
  * Removes the session corresponding to session id.
203
220
  *
@@ -259,6 +276,20 @@ declare module 'vscode' {
259
276
  */
260
277
  export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
261
278
 
279
+ /**
280
+ * Get all accounts that the user is logged in to for the specified provider.
281
+ * Use this paired with {@link getSession} in order to get an authentication session for a specific account.
282
+ *
283
+ * Currently, there are only two authentication providers that are contributed from built in extensions
284
+ * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
285
+ *
286
+ * Note: Getting accounts does not imply that your extension has access to that account or its authentication sessions. You can verify access to the account by calling {@link getSession}.
287
+ *
288
+ * @param providerId The id of the provider to use
289
+ * @returns A thenable that resolves to a readonly array of authentication accounts.
290
+ */
291
+ export function getAccounts(providerId: string): Thenable<readonly AuthenticationSessionAccountInformation[]>;
292
+
262
293
  /**
263
294
  * An {@link Event} which fires when the authentication sessions of an authentication provider have
264
295
  * been added, removed, or changed.
@@ -1054,6 +1054,12 @@ declare module 'vscode' {
1054
1054
  * Whether the current window is focused.
1055
1055
  */
1056
1056
  readonly focused: boolean;
1057
+
1058
+ /**
1059
+ * Whether the window has been interacted with recently. This will change
1060
+ * immediately on activity, or after a short time of user inactivity.
1061
+ */
1062
+ readonly active: boolean;
1057
1063
  }
1058
1064
 
1059
1065
  /**
@@ -1618,9 +1624,47 @@ declare module 'vscode' {
1618
1624
  canSelectMany?: boolean;
1619
1625
 
1620
1626
  /**
1621
- * An optional interface to implement drag and drop in the tree view.
1622
- */
1623
- dragAndDropController?: TreeDragAndDropController<T>;
1627
+ * An optional interface to implement drag and drop in the tree view.
1628
+ */
1629
+ dragAndDropController?: TreeDragAndDropController<T>;
1630
+
1631
+ /**
1632
+ * 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.
1633
+ * If the tree item is collapsed by default (meaning that the children haven't yet been fetched) then child checkboxes will not be updated.
1634
+ * To override this behavior and manage child and parent checkbox state in the extension, set this to `true`.
1635
+ *
1636
+ * Examples where {@link TreeViewOptions.manageCheckboxStateManually} is false, the default behavior:
1637
+ *
1638
+ * 1. A tree item is checked, then its children are fetched. The children will be checked.
1639
+ *
1640
+ * 2. A tree item's parent is checked. The tree item and all of it's siblings will be checked.
1641
+ * - [ ] Parent
1642
+ * - [ ] Child 1
1643
+ * - [ ] Child 2
1644
+ * When the user checks Parent, the tree will look like this:
1645
+ * - [x] Parent
1646
+ * - [x] Child 1
1647
+ * - [x] Child 2
1648
+ *
1649
+ * 3. A tree item and all of it's siblings are checked. The parent will be checked.
1650
+ * - [ ] Parent
1651
+ * - [ ] Child 1
1652
+ * - [ ] Child 2
1653
+ * When the user checks Child 1 and Child 2, the tree will look like this:
1654
+ * - [x] Parent
1655
+ * - [x] Child 1
1656
+ * - [x] Child 2
1657
+ *
1658
+ * 4. A tree item is unchecked. The parent will be unchecked.
1659
+ * - [x] Parent
1660
+ * - [x] Child 1
1661
+ * - [x] Child 2
1662
+ * When the user unchecks Child 1, the tree will look like this:
1663
+ * - [ ] Parent
1664
+ * - [ ] Child 1
1665
+ * - [x] Child 2
1666
+ */
1667
+ manageCheckboxStateManually?: boolean;
1624
1668
  }
1625
1669
 
1626
1670
  /**
@@ -1854,6 +1898,11 @@ declare module 'vscode' {
1854
1898
  */
1855
1899
  readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;
1856
1900
 
1901
+ /**
1902
+ * An event to signal that an element or root has either been checked or unchecked.
1903
+ */
1904
+ readonly onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;
1905
+
1857
1906
  /**
1858
1907
  * An optional human-readable message that will be rendered in the view.
1859
1908
  * Setting the message to null, undefined, or empty string will remove the message from the view.
@@ -1872,6 +1921,12 @@ declare module 'vscode' {
1872
1921
  */
1873
1922
  description?: string;
1874
1923
 
1924
+ /**
1925
+ * The badge to display for this TreeView.
1926
+ * To remove the badge, set to undefined.
1927
+ */
1928
+ badge?: ViewBadge | undefined;
1929
+
1875
1930
  /**
1876
1931
  * Reveals the given element in the tree view.
1877
1932
  * If the tree view is not visible then the tree view is shown and element is revealed.
@@ -1887,6 +1942,24 @@ declare module 'vscode' {
1887
1942
  reveal(element: T, options?: { select?: boolean, focus?: boolean, expand?: boolean | number }): Thenable<void>;
1888
1943
  }
1889
1944
 
1945
+
1946
+ /**
1947
+ * A badge presenting a value for a view
1948
+ */
1949
+ export interface ViewBadge {
1950
+
1951
+ /**
1952
+ * A label to present in tooltip for the badge.
1953
+ */
1954
+ readonly tooltip: string;
1955
+
1956
+ /**
1957
+ * The value to present in the badge.
1958
+ */
1959
+ readonly value: number;
1960
+ }
1961
+
1962
+
1890
1963
  /**
1891
1964
  * Label describing the [Tree item](#TreeItem)
1892
1965
  */
@@ -1905,6 +1978,30 @@ declare module 'vscode' {
1905
1978
 
1906
1979
  }
1907
1980
 
1981
+ /**
1982
+ * Checkbox state of the tree item
1983
+ */
1984
+ export enum TreeItemCheckboxState {
1985
+ /**
1986
+ * Determines an item is unchecked
1987
+ */
1988
+ Unchecked = 0,
1989
+ /**
1990
+ * Determines an item is checked
1991
+ */
1992
+ Checked = 1
1993
+ }
1994
+
1995
+ /**
1996
+ * An event describing the change in a tree item's checkbox state.
1997
+ */
1998
+ export interface TreeCheckboxChangeEvent<T> {
1999
+ /**
2000
+ * The items that were checked or unchecked.
2001
+ */
2002
+ readonly items: ReadonlyArray<[T, TreeItemCheckboxState]>;
2003
+ }
2004
+
1908
2005
  /**
1909
2006
  * Collapsible state of the tree item
1910
2007
  */
@@ -2061,6 +2158,25 @@ declare module 'vscode' {
2061
2158
  */
2062
2159
  accessibilityInformation?: AccessibilityInformation;
2063
2160
 
2161
+ /**
2162
+ * {@link TreeItemCheckboxState TreeItemCheckboxState} of the tree item.
2163
+ * {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} should be fired when {@link TreeItem.checkboxState checkboxState} changes.
2164
+ */
2165
+ checkboxState?: TreeItemCheckboxState | {
2166
+ /**
2167
+ * The {@link TreeItemCheckboxState} of the tree item
2168
+ */
2169
+ readonly state: TreeItemCheckboxState;
2170
+ /**
2171
+ * A tooltip for the checkbox
2172
+ */
2173
+ readonly tooltip?: string;
2174
+ /**
2175
+ * Accessibility information used when screen readers interact with this checkbox
2176
+ */
2177
+ readonly accessibilityInformation?: AccessibilityInformation;
2178
+ };
2179
+
2064
2180
  /**
2065
2181
  * @param label A human-readable string describing this item
2066
2182
  * @param collapsibleState {@link TreeItemCollapsibleState} of the tree item. Default is {@link TreeItemCollapsibleState.None}
@@ -2952,8 +3068,43 @@ declare module 'vscode' {
2952
3068
  * without providing an exit code.
2953
3069
  */
2954
3070
  readonly code: number | undefined;
3071
+
3072
+ /**
3073
+ * The reason that triggered the exit of a terminal.
3074
+ */
3075
+ readonly reason: TerminalExitReason;
2955
3076
  }
2956
3077
 
3078
+ /**
3079
+ * Terminal exit reason kind.
3080
+ */
3081
+ export enum TerminalExitReason {
3082
+ /**
3083
+ * Unknown reason.
3084
+ */
3085
+ Unknown = 0,
3086
+
3087
+ /**
3088
+ * The window closed/reloaded.
3089
+ */
3090
+ Shutdown = 1,
3091
+
3092
+ /**
3093
+ * The shell process exited.
3094
+ */
3095
+ Process = 2,
3096
+
3097
+ /**
3098
+ * The user closed the terminal.
3099
+ */
3100
+ User = 3,
3101
+
3102
+ /**
3103
+ * An extension disposed the terminal.
3104
+ */
3105
+ Extension = 4,
3106
+ }
3107
+
2957
3108
  export interface Terminal {
2958
3109
 
2959
3110
  /**
@@ -2971,6 +3122,18 @@ declare module 'vscode' {
2971
3122
  */
2972
3123
  readonly state: TerminalState;
2973
3124
 
3125
+ /**
3126
+ * An object that contains [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration)-powered
3127
+ * features for the terminal. This will always be `undefined` immediately after the terminal
3128
+ * is created. Listen to {@link window.onDidChangeTerminalShellIntegration} to be notified
3129
+ * when shell integration is activated for a terminal.
3130
+ *
3131
+ * Note that this object may remain undefined if shell integration never activates. For
3132
+ * example Command Prompt does not support shell integration and a user's shell setup could
3133
+ * conflict with the automatic shell integration activation.
3134
+ */
3135
+ readonly shellIntegration: TerminalShellIntegration | undefined;
3136
+
2974
3137
  /**
2975
3138
  * The object used to initialize the terminal, this is useful for example to detecting the
2976
3139
  * shell type of when the terminal was not launched by this extension or for detecting what
@@ -3042,6 +3205,316 @@ declare module 'vscode' {
3042
3205
  readonly isInteractedWith: boolean;
3043
3206
  }
3044
3207
 
3208
+ /**
3209
+ * [Shell integration](https://code.visualstudio.com/docs/terminal/shell-integration)-powered capabilities owned by a terminal.
3210
+ */
3211
+ export interface TerminalShellIntegration {
3212
+ /**
3213
+ * The current working directory of the terminal. This {@link Uri} may represent a file on
3214
+ * another machine (eg. ssh into another machine). This requires the shell integration to
3215
+ * support working directory reporting.
3216
+ */
3217
+ readonly cwd: Uri | undefined;
3218
+
3219
+ /**
3220
+ * Execute a command, sending ^C as necessary to interrupt any running command if needed.
3221
+ *
3222
+ * @param commandLine The command line to execute, this is the exact text that will be sent
3223
+ * to the terminal.
3224
+ *
3225
+ * @example
3226
+ * // Execute a command in a terminal immediately after being created
3227
+ * const myTerm = window.createTerminal();
3228
+ * window.onDidChangeTerminalShellIntegration(async ({ terminal, shellIntegration }) => {
3229
+ * if (terminal === myTerm) {
3230
+ * const execution = shellIntegration.executeCommand('echo "Hello world"');
3231
+ * window.onDidEndTerminalShellExecution(event => {
3232
+ * if (event.execution === execution) {
3233
+ * console.log(`Command exited with code ${event.exitCode}`);
3234
+ * }
3235
+ * });
3236
+ * }
3237
+ * }));
3238
+ * // Fallback to sendText if there is no shell integration within 3 seconds of launching
3239
+ * setTimeout(() => {
3240
+ * if (!myTerm.shellIntegration) {
3241
+ * myTerm.sendText('echo "Hello world"');
3242
+ * // Without shell integration, we can't know when the command has finished or what the
3243
+ * // exit code was.
3244
+ * }
3245
+ * }, 3000);
3246
+ *
3247
+ * @example
3248
+ * // Send command to terminal that has been alive for a while
3249
+ * const commandLine = 'echo "Hello world"';
3250
+ * if (term.shellIntegration) {
3251
+ * const execution = shellIntegration.executeCommand({ commandLine });
3252
+ * window.onDidEndTerminalShellExecution(event => {
3253
+ * if (event.execution === execution) {
3254
+ * console.log(`Command exited with code ${event.exitCode}`);
3255
+ * }
3256
+ * });
3257
+ * } else {
3258
+ * term.sendText(commandLine);
3259
+ * // Without shell integration, we can't know when the command has finished or what the
3260
+ * // exit code was.
3261
+ * }
3262
+ */
3263
+ executeCommand(commandLine: string): TerminalShellExecution;
3264
+
3265
+ /**
3266
+ * Execute a command, sending ^C as necessary to interrupt any running command if needed.
3267
+ *
3268
+ * *Note* This is not guaranteed to work as [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration)
3269
+ * must be activated. Check whether {@link TerminalShellExecution.exitCode} is rejected to
3270
+ * verify whether it was successful.
3271
+ *
3272
+ * @param executable A command to run.
3273
+ * @param args Arguments to launch the executable with. The arguments will be escaped such
3274
+ * that they are interpreted as single arguments when the argument both contains whitespace
3275
+ * and does not include any single quote, double quote or backtick characters.
3276
+ *
3277
+ * Note that this escaping is not intended to be a security measure, be careful when passing
3278
+ * untrusted data to this API as strings like `$(...)` can often be used in shells to
3279
+ * execute code within a string.
3280
+ *
3281
+ * @example
3282
+ * // Execute a command in a terminal immediately after being created
3283
+ * const myTerm = window.createTerminal();
3284
+ * window.onDidChangeTerminalShellIntegration(async ({ terminal, shellIntegration }) => {
3285
+ * if (terminal === myTerm) {
3286
+ * const command = shellIntegration.executeCommand({
3287
+ * command: 'echo',
3288
+ * args: ['Hello world']
3289
+ * });
3290
+ * const code = await command.exitCode;
3291
+ * console.log(`Command exited with code ${code}`);
3292
+ * }
3293
+ * }));
3294
+ * // Fallback to sendText if there is no shell integration within 3 seconds of launching
3295
+ * setTimeout(() => {
3296
+ * if (!myTerm.shellIntegration) {
3297
+ * myTerm.sendText('echo "Hello world"');
3298
+ * // Without shell integration, we can't know when the command has finished or what the
3299
+ * // exit code was.
3300
+ * }
3301
+ * }, 3000);
3302
+ *
3303
+ * @example
3304
+ * // Send command to terminal that has been alive for a while
3305
+ * const commandLine = 'echo "Hello world"';
3306
+ * if (term.shellIntegration) {
3307
+ * const command = term.shellIntegration.executeCommand({
3308
+ * command: 'echo',
3309
+ * args: ['Hello world']
3310
+ * });
3311
+ * const code = await command.exitCode;
3312
+ * console.log(`Command exited with code ${code}`);
3313
+ * } else {
3314
+ * term.sendText(commandLine);
3315
+ * // Without shell integration, we can't know when the command has finished or what the
3316
+ * // exit code was.
3317
+ * }
3318
+ */
3319
+ executeCommand(executable: string, args: string[]): TerminalShellExecution;
3320
+ }
3321
+
3322
+ /**
3323
+ * A command that was executed in a terminal.
3324
+ */
3325
+ export interface TerminalShellExecution {
3326
+ /**
3327
+ * The command line that was executed. The {@link TerminalShellExecutionCommandLineConfidence confidence}
3328
+ * of this value depends on the specific shell's shell integration implementation. This
3329
+ * value may become more accurate after {@link window.onDidEndTerminalShellExecution} is
3330
+ * fired.
3331
+ *
3332
+ * @example
3333
+ * // Log the details of the command line on start and end
3334
+ * window.onDidStartTerminalShellExecution(event => {
3335
+ * const commandLine = event.execution.commandLine;
3336
+ * console.log(`Command started\n${summarizeCommandLine(commandLine)}`);
3337
+ * });
3338
+ * window.onDidEndTerminalShellExecution(event => {
3339
+ * const commandLine = event.execution.commandLine;
3340
+ * console.log(`Command ended\n${summarizeCommandLine(commandLine)}`);
3341
+ * });
3342
+ * function summarizeCommandLine(commandLine: TerminalShellExecutionCommandLine) {
3343
+ * return [
3344
+ * ` Command line: ${command.commandLine.value}`,
3345
+ * ` Confidence: ${command.commandLine.confidence}`,
3346
+ * ` Trusted: ${command.commandLine.isTrusted}
3347
+ * ].join('\n');
3348
+ * }
3349
+ */
3350
+ readonly commandLine: TerminalShellExecutionCommandLine;
3351
+
3352
+ /**
3353
+ * The working directory that was reported by the shell when this command executed. This
3354
+ * {@link Uri} may represent a file on another machine (eg. ssh into another machine). This
3355
+ * requires the shell integration to support working directory reporting.
3356
+ */
3357
+ readonly cwd: Uri | undefined;
3358
+
3359
+ /**
3360
+ * Creates a stream of raw data (including escape sequences) that is written to the
3361
+ * terminal. This will only include data that was written after `read` was called for
3362
+ * the first time, ie. you must call `read` immediately after the command is executed via
3363
+ * {@link TerminalShellIntegration.executeCommand} or
3364
+ * {@link window.onDidStartTerminalShellExecution} to not miss any data.
3365
+ *
3366
+ * @example
3367
+ * // Log all data written to the terminal for a command
3368
+ * const command = term.shellIntegration.executeCommand({ commandLine: 'echo "Hello world"' });
3369
+ * const stream = command.read();
3370
+ * for await (const data of stream) {
3371
+ * console.log(data);
3372
+ * }
3373
+ */
3374
+ read(): AsyncIterable<string>;
3375
+ }
3376
+
3377
+ /**
3378
+ * A command line that was executed in a terminal.
3379
+ */
3380
+ export interface TerminalShellExecutionCommandLine {
3381
+ /**
3382
+ * The full command line that was executed, including both the command and its arguments.
3383
+ */
3384
+ readonly value: string;
3385
+
3386
+ /**
3387
+ * Whether the command line value came from a trusted source and is therefore safe to
3388
+ * execute without user additional confirmation, such as a notification that asks "Do you
3389
+ * want to execute (command)?". This verification is likely only needed if you are going to
3390
+ * execute the command again.
3391
+ *
3392
+ * This is `true` only when the command line was reported explicitly by the shell
3393
+ * integration script (ie. {@link TerminalShellExecutionCommandLineConfidence.High high confidence})
3394
+ * and it used a nonce for verification.
3395
+ */
3396
+ readonly isTrusted: boolean;
3397
+
3398
+ /**
3399
+ * The confidence of the command line value which is determined by how the value was
3400
+ * obtained. This depends upon the implementation of the shell integration script.
3401
+ */
3402
+ readonly confidence: TerminalShellExecutionCommandLineConfidence;
3403
+ }
3404
+
3405
+ /**
3406
+ * The confidence of a {@link TerminalShellExecutionCommandLine} value.
3407
+ */
3408
+ enum TerminalShellExecutionCommandLineConfidence {
3409
+ /**
3410
+ * The command line value confidence is low. This means that the value was read from the
3411
+ * terminal buffer using markers reported by the shell integration script. Additionally one
3412
+ * of the following conditions will be met:
3413
+ *
3414
+ * - The command started on the very left-most column which is unusual, or
3415
+ * - The command is multi-line which is more difficult to accurately detect due to line
3416
+ * continuation characters and right prompts.
3417
+ * - Command line markers were not reported by the shell integration script.
3418
+ */
3419
+ Low = 0,
3420
+
3421
+ /**
3422
+ * The command line value confidence is medium. This means that the value was read from the
3423
+ * terminal buffer using markers reported by the shell integration script. The command is
3424
+ * single-line and does not start on the very left-most column (which is unusual).
3425
+ */
3426
+ Medium = 1,
3427
+
3428
+ /**
3429
+ * The command line value confidence is high. This means that the value was explicitly sent
3430
+ * from the shell integration script or the command was executed via the
3431
+ * {@link TerminalShellIntegration.executeCommand} API.
3432
+ */
3433
+ High = 2
3434
+ }
3435
+
3436
+ /**
3437
+ * An event signalling that a terminal's shell integration has changed.
3438
+ */
3439
+ export interface TerminalShellIntegrationChangeEvent {
3440
+ /**
3441
+ * The terminal that shell integration has been activated in.
3442
+ */
3443
+ readonly terminal: Terminal;
3444
+
3445
+ /**
3446
+ * The shell integration object.
3447
+ */
3448
+ readonly shellIntegration: TerminalShellIntegration;
3449
+ }
3450
+
3451
+ /**
3452
+ * An event signalling that an execution has started in a terminal.
3453
+ */
3454
+ export interface TerminalShellExecutionStartEvent {
3455
+ /**
3456
+ * The terminal that shell integration has been activated in.
3457
+ */
3458
+ readonly terminal: Terminal;
3459
+
3460
+ /**
3461
+ * The shell integration object.
3462
+ */
3463
+ readonly shellIntegration: TerminalShellIntegration;
3464
+
3465
+ /**
3466
+ * The terminal shell execution that has ended.
3467
+ */
3468
+ readonly execution: TerminalShellExecution;
3469
+ }
3470
+
3471
+ /**
3472
+ * An event signalling that an execution has ended in a terminal.
3473
+ */
3474
+ export interface TerminalShellExecutionEndEvent {
3475
+ /**
3476
+ * The terminal that shell integration has been activated in.
3477
+ */
3478
+ readonly terminal: Terminal;
3479
+
3480
+ /**
3481
+ * The shell integration object.
3482
+ */
3483
+ readonly shellIntegration: TerminalShellIntegration;
3484
+
3485
+ /**
3486
+ * The terminal shell execution that has ended.
3487
+ */
3488
+ readonly execution: TerminalShellExecution;
3489
+
3490
+ /**
3491
+ * The exit code reported by the shell.
3492
+ *
3493
+ * Note that `undefined` means the shell either did not report an exit code (ie. the shell
3494
+ * integration script is misbehaving) or the shell reported a command started before the command
3495
+ * finished (eg. a sub-shell was opened). Generally this should not happen, depending on the use
3496
+ * case, it may be best to treat this as a failure.
3497
+ *
3498
+ * @example
3499
+ * const execution = shellIntegration.executeCommand({
3500
+ * command: 'echo',
3501
+ * args: ['Hello world']
3502
+ * });
3503
+ * window.onDidEndTerminalShellExecution(event => {
3504
+ * if (event.execution === execution) {
3505
+ * if (event.exitCode === undefined) {
3506
+ * console.log('Command finished but exit code is unknown');
3507
+ * } else if (event.exitCode === 0) {
3508
+ * console.log('Command succeeded');
3509
+ * } else {
3510
+ * console.log('Command failed');
3511
+ * }
3512
+ * }
3513
+ * });
3514
+ */
3515
+ readonly exitCode: number | undefined;
3516
+ }
3517
+
3045
3518
  //#region EnvironmentVariable
3046
3519
 
3047
3520
  /**
@@ -4114,26 +4587,46 @@ declare module 'vscode' {
4114
4587
  }
4115
4588
 
4116
4589
  /**
4117
- * Provider which handles dropping of resources into a text editor.
4118
- *
4119
- * This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging
4120
- * and dropping files, users can hold down `shift` to drop the file into the editor instead of opening it.
4121
- * Requires `editor.dropIntoEditor.enabled` to be on.
4122
- */
4123
- export interface DocumentDropEditProvider {
4124
- /**
4125
- * Provide edits which inserts the content being dragged and dropped into the document.
4126
- *
4127
- * @param document The document in which the drop occurred.
4128
- * @param position The position in the document where the drop occurred.
4129
- * @param dataTransfer A {@link DataTransfer} object that holds data about what is being dragged and dropped.
4130
- * @param token A cancellation token.
4131
- *
4132
- * @returns A {@link DocumentDropEdit} or a thenable that resolves to such. The lack of a result can be
4133
- * signaled by returning `undefined` or `null`.
4134
- */
4135
- provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit>;
4136
- }
4590
+ * An edit operation applied {@link DocumentDropEditProvider on drop}.
4591
+ */
4592
+ export class DocumentDropEdit {
4593
+ /**
4594
+ * The text or snippet to insert at the drop location.
4595
+ */
4596
+ insertText: string | SnippetString;
4597
+
4598
+ /**
4599
+ * An optional additional edit to apply on drop.
4600
+ */
4601
+ additionalEdit?: WorkspaceEdit;
4602
+
4603
+ /**
4604
+ * @param insertText The text or snippet to insert at the drop location.
4605
+ */
4606
+ constructor(insertText: string | SnippetString);
4607
+ }
4608
+
4609
+ /**
4610
+ * Provider which handles dropping of resources into a text editor.
4611
+ *
4612
+ * This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging
4613
+ * and dropping files, users can hold down `shift` to drop the file into the editor instead of opening it.
4614
+ * Requires `editor.dropIntoEditor.enabled` to be on.
4615
+ */
4616
+ export interface DocumentDropEditProvider {
4617
+ /**
4618
+ * Provide edits which inserts the content being dragged and dropped into the document.
4619
+ *
4620
+ * @param document The document in which the drop occurred.
4621
+ * @param position The position in the document where the drop occurred.
4622
+ * @param dataTransfer A {@link DataTransfer} object that holds data about what is being dragged and dropped.
4623
+ * @param token A cancellation token.
4624
+ *
4625
+ * @returns A {@link DocumentDropEdit} or a thenable that resolves to such. The lack of a result can be
4626
+ * signaled by returning `undefined` or `null`.
4627
+ */
4628
+ provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit>;
4629
+ }
4137
4630
 
4138
4631
  //#endregion Semantic Tokens
4139
4632
 
@@ -564,6 +564,50 @@ declare module 'vscode' {
564
564
  Dynamic = 2
565
565
  }
566
566
 
567
+ /**
568
+ * Represents a thread in a debug session.
569
+ */
570
+ export class DebugThread {
571
+ /**
572
+ * Debug session for thread.
573
+ */
574
+ readonly session: DebugSession;
575
+
576
+ /**
577
+ * ID of the associated thread in the debug protocol.
578
+ */
579
+ readonly threadId: number;
580
+
581
+ /**
582
+ * @hidden
583
+ */
584
+ private constructor(session: DebugSession, threadId: number);
585
+ }
586
+
587
+ /**
588
+ * Represents a stack frame in a debug session.
589
+ */
590
+ export class DebugStackFrame {
591
+ /**
592
+ * Debug session for thread.
593
+ */
594
+ readonly session: DebugSession;
595
+
596
+ /**
597
+ * ID of the associated thread in the debug protocol.
598
+ */
599
+ readonly threadId: number;
600
+ /**
601
+ * ID of the stack frame in the debug protocol.
602
+ */
603
+ readonly frameId: number;
604
+
605
+ /**
606
+ * @hidden
607
+ */
608
+ private constructor(session: DebugSession, threadId: number, frameId: number);
609
+ }
610
+
567
611
  /**
568
612
  * A DebugProtocolSource is an opaque stand-in type for the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
569
613
  */
@@ -767,6 +811,21 @@ declare module 'vscode' {
767
811
  */
768
812
  export const onDidChangeBreakpoints: Event<BreakpointsChangeEvent>;
769
813
 
814
+ /**
815
+ * The currently focused thread or stack frame, or `undefined` if no
816
+ * thread or stack is focused. A thread can be focused any time there is
817
+ * an active debug session, while a stack frame can only be focused when
818
+ * a session is paused and the call stack has been retrieved.
819
+ * @stubbed
820
+ */
821
+ export const activeStackItem: DebugThread | DebugStackFrame | undefined;
822
+
823
+ /**
824
+ * An event which fires when the {@link debug.activeStackItem} has changed.
825
+ * @stubbed
826
+ */
827
+ export const onDidChangeActiveStackItem: Event<DebugThread | DebugStackFrame | undefined>;
828
+
770
829
  /**
771
830
  * Register a [debug configuration provider](#DebugConfigurationProvider) for a specific debug type.
772
831
  * The optional [triggerKind](#DebugConfigurationProviderTriggerKind) can be used to specify when the `provideDebugConfigurations` method of the provider is triggered.
@@ -123,7 +123,11 @@ declare module 'vscode' {
123
123
  /**
124
124
  * Render the line numbers with values relative to the primary cursor location.
125
125
  */
126
- Relative = 2
126
+ Relative = 2,
127
+ /**
128
+ * Render the line numbers on every 10th line number.
129
+ */
130
+ Interval = 3
127
131
  }
128
132
 
129
133
  /**
@@ -69,6 +69,21 @@ declare module 'vscode' {
69
69
  */
70
70
  export const onDidChangeTelemetryEnabled: Event<boolean>;
71
71
 
72
+ /**
73
+ * An {@link Event} which fires when the default shell changes. This fires with the new
74
+ * shell path.
75
+ */
76
+ export const onDidChangeShell: Event<string>;
77
+
78
+ /**
79
+ * Creates a new {@link TelemetryLogger telemetry logger}.
80
+ *
81
+ * @param sender The telemetry sender that is used by the telemetry logger.
82
+ * @param options Options for the telemetry logger.
83
+ * @returns A new telemetry logger
84
+ */
85
+ export function createTelemetryLogger(sender: TelemetrySender, options?: TelemetryLoggerOptions): TelemetryLogger;
86
+
72
87
  /**
73
88
  * The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows
74
89
  * Subsystem for Linux or `ssh-remote` for remotes using a secure shell.
@@ -89,7 +104,8 @@ declare module 'vscode' {
89
104
 
90
105
  /**
91
106
  * The detected default shell for the extension host, this is overridden by the
92
- * `terminal.integrated.shell` setting for the extension host's platform.
107
+ * `terminal.integrated.defaultProfile` setting for the extension host's platform. Note that in
108
+ * environments that do not support a shell the value is the empty string.
93
109
  */
94
110
  export const shell: string;
95
111
 
@@ -29,13 +29,6 @@ declare module 'vscode' {
29
29
  */
30
30
  kind: DocumentPasteEditKind;
31
31
 
32
- /**
33
- * The mime type from the {@link DataTransfer} that this edit applies.
34
- *
35
- * TODO: Should this be taken from `dropMimeTypes` instead?
36
- */
37
- handledMimeType?: string;
38
-
39
32
  /**
40
33
  * Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
41
34
  */
@@ -11,6 +11,11 @@ declare module 'vscode' {
11
11
  AIGenerated = 1
12
12
  }
13
13
 
14
+ export enum NewSymbolNameTriggerKind {
15
+ Invoke = 0,
16
+ Automatic = 1,
17
+ }
18
+
14
19
  export class NewSymbolName {
15
20
  readonly newSymbolName: string;
16
21
  readonly tags?: readonly NewSymbolNameTag[];
@@ -27,7 +32,7 @@ declare module 'vscode' {
27
32
  * @param token A cancellation token.
28
33
  * @return A list of new symbol names.
29
34
  */
30
- provideNewSymbolNames(document: TextDocument, range: Range, token: CancellationToken): ProviderResult<NewSymbolName[]>;
35
+ provideNewSymbolNames(document: TextDocument, range: Range, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
31
36
  }
32
37
 
33
38
  export namespace languages {
@@ -78,6 +78,11 @@ declare module "vscode" {
78
78
  * user can configure this.
79
79
  */
80
80
  isDefault: boolean;
81
+ /**
82
+ * Fired when a user has changed whether this is a default profile. The
83
+ * event contains the new value of {@link isDefault}
84
+ */
85
+ onDidChangeDefault: Event<boolean>;
81
86
  /**
82
87
  * Whether this profile supports continuous running of requests. If so,
83
88
  * then {@link TestRunRequest.continuous} may be set to `true`. Defaults
@@ -117,6 +122,41 @@ declare module "vscode" {
117
122
  request: TestRunRequest,
118
123
  token: CancellationToken
119
124
  ) => Thenable<void> | void;
125
+
126
+ /**
127
+ * An extension-provided function that provides detailed statement and
128
+ * function-level coverage for a file. The editor will call this when more
129
+ * detail is needed for a file, such as when it's opened in an editor or
130
+ * expanded in the **Test Coverage** view.
131
+ *
132
+ * The {@link FileCoverage} object passed to this function is the same instance
133
+ * emitted on {@link TestRun.addCoverage} calls associated with this profile.
134
+ */
135
+ loadDetailedCoverage?: (testRun: TestRun, fileCoverage: FileCoverage, token: CancellationToken) => Thenable<FileCoverageDetail[]>;
136
+
137
+ /**
138
+ * An extension-provided function that provides detailed statement and
139
+ * function-level coverage for a single test in a file. This is the per-test
140
+ * sibling of {@link TestRunProfile.loadDetailedCoverage}, called only if
141
+ * a test item is provided in {@link FileCoverage.includesTests} and only
142
+ * for files where such data is reported.
143
+ *
144
+ * Often {@link TestRunProfile.loadDetailedCoverage} will be called first
145
+ * when a user opens a file, and then this method will be called if they
146
+ * drill down into specific per-test coverage information. This method
147
+ * should then return coverage data only for statements and declarations
148
+ * executed by the specific test during the run.
149
+ *
150
+ * The {@link FileCoverage} object passed to this function is the same
151
+ * instance emitted on {@link TestRun.addCoverage} calls associated with this profile.
152
+ *
153
+ * @param testRun The test run that generated the coverage data.
154
+ * @param fileCoverage The file coverage object to load detailed coverage for.
155
+ * @param fromTestItem The test item to request coverage information for.
156
+ * @param token A cancellation token that indicates the operation should be cancelled.
157
+ */
158
+ loadDetailedCoverageForTest?: (testRun: TestRun, fileCoverage: FileCoverage, fromTestItem: TestItem, token: CancellationToken) => Thenable<FileCoverageDetail[]>;
159
+
120
160
  /**
121
161
  * Deletes the run profile.
122
162
  */
@@ -305,6 +345,13 @@ declare module "vscode" {
305
345
  * relevant for profiles that set {@link TestRunProfile.supportsContinuousRun}.
306
346
  */
307
347
  readonly continuous?: boolean;
348
+ /**
349
+ * Controls how test Test Results view is focused. If true, the editor
350
+ * will keep the maintain the user's focus. If false, the editor will
351
+ * prefer to move focus into the Test Results view, although
352
+ * this may be configured by users.
353
+ */
354
+ readonly preserveFocus?: boolean;
308
355
  /**
309
356
  * @param tests Array of specific tests to run, or undefined to run all tests
310
357
  * @param exclude An array of tests to exclude from the run.
@@ -410,12 +457,22 @@ declare module "vscode" {
410
457
  * @param test Test item to associate the output with.
411
458
  */
412
459
  appendOutput(output: string, location?: Location, test?: TestItem): void;
460
+ /**
461
+ * Adds coverage for a file in the run.
462
+ */
463
+ addCoverage(fileCoverage: FileCoverage): void;
413
464
  /**
414
465
  * Signals that the end of the test run. Any tests included in the run whose
415
466
  * states have not been updated will have their state reset.
416
467
  */
417
468
  end(): void;
469
+ /**
470
+ * An event fired when the editor is no longer interested in data
471
+ * associated with the test run.
472
+ */
473
+ onDidDispose: Event<void>;
418
474
  }
475
+
419
476
  /**
420
477
  * Collection of test items, found in {@link TestItem.children} and
421
478
  * {@link TestController.items}.
@@ -547,6 +604,33 @@ declare module "vscode" {
547
604
  // todo@api still unsure about this
548
605
  invalidateResults(): void;
549
606
  }
607
+ /**
608
+ * A stack frame found in the {@link TestMessage.stackTrace}.
609
+ */
610
+ export class TestMessageStackFrame {
611
+ /**
612
+ * The location of this stack frame. This should be provided as a URI if the
613
+ * location of the call frame can be accessed by the editor.
614
+ */
615
+ uri?: Uri;
616
+
617
+ /**
618
+ * Position of the stack frame within the file.
619
+ */
620
+ position?: Position;
621
+
622
+ /**
623
+ * The name of the stack frame, typically a method or function name.
624
+ */
625
+ label: string;
626
+
627
+ /**
628
+ * @param label The name of the stack frame
629
+ * @param file The file URI of the stack frame
630
+ * @param position The position of the stack frame within the file
631
+ */
632
+ constructor(label: string, uri?: Uri, position?: Position);
633
+ }
550
634
  /**
551
635
  * Message associated with the test state. Can be linked to a specific
552
636
  * source range -- useful for assertion failures, for example.
@@ -598,6 +682,10 @@ declare module "vscode" {
598
682
  * - `message`: the {@link TestMessage} instance.
599
683
  */
600
684
  contextValue?: string;
685
+ /**
686
+ * The stack trace associated with the message or failure.
687
+ */
688
+ stackTrace?: TestMessageStackFrame[];
601
689
  /**
602
690
  * Creates a new TestMessage that will present as a diff in the editor.
603
691
  * @param message Message to display to the user.
@@ -616,6 +704,27 @@ declare module "vscode" {
616
704
  constructor(message: string | MarkdownString);
617
705
  }
618
706
 
707
+ /**
708
+ * A class that contains information about a covered resource. A count can
709
+ * be give for lines, branches, and declarations in a file.
710
+ */
711
+ export class TestCoverageCount {
712
+ /**
713
+ * Number of items covered in the file.
714
+ */
715
+ covered: number;
716
+ /**
717
+ * Total number of covered items in the file.
718
+ */
719
+ total: number;
720
+
721
+ /**
722
+ * @param covered Value for {@link TestCoverageCount.covered}
723
+ * @param total Value for {@link TestCoverageCount.total}
724
+ */
725
+ constructor(covered: number, total: number);
726
+ }
727
+
619
728
  //#region Test Observer
620
729
 
621
730
  export interface TestObserver {
@@ -770,43 +879,6 @@ declare module "vscode" {
770
879
  }
771
880
  //#endregion
772
881
 
773
- //#region Test Coverage
774
-
775
- export interface TestRun {
776
- /**
777
- * Test coverage provider for this result. An extension can defer setting
778
- * this until after a run is complete and coverage is available.
779
- */
780
- coverageProvider?: TestCoverageProvider
781
- // ...
782
- }
783
-
784
- /**
785
- * Provides information about test coverage for a test result.
786
- * Methods on the provider will not be called until the test run is complete
787
- */
788
- export interface TestCoverageProvider<T extends FileCoverage = FileCoverage> {
789
- /**
790
- * Returns coverage information for all files involved in the test run.
791
- * @param token A cancellation token.
792
- * @return Coverage metadata for all files involved in the test.
793
- */
794
- provideFileCoverage(token: CancellationToken): ProviderResult<T[]>;
795
-
796
- /**
797
- * Give a FileCoverage to fill in more data, namely {@link FileCoverage.detailedCoverage}.
798
- * The editor will only resolve a FileCoverage once, and onyl if detailedCoverage
799
- * is undefined.
800
- *
801
- * @param coverage A coverage object obtained from {@link provideFileCoverage}
802
- * @param token A cancellation token.
803
- * @return The resolved file coverage, or a thenable that resolves to one. It
804
- * is OK to return the given `coverage`. When no result is returned, the
805
- * given `coverage` will be used.
806
- */
807
- resolveFileCoverage?(coverage: T, token: CancellationToken): ProviderResult<T>;
808
- }
809
-
810
882
  /**
811
883
  * A class that contains information about a covered resource. A count can
812
884
  * be give for lines, branches, and functions in a file.
@@ -841,23 +913,25 @@ declare module "vscode" {
841
913
  * Statement coverage information. If the reporter does not provide statement
842
914
  * coverage information, this can instead be used to represent line coverage.
843
915
  */
844
- statementCoverage: CoveredCount;
916
+ statementCoverage: TestCoverageCount;
845
917
 
846
918
  /**
847
919
  * Branch coverage information.
848
920
  */
849
- branchCoverage?: CoveredCount;
921
+ branchCoverage?: TestCoverageCount;
850
922
 
851
923
  /**
852
- * Function coverage information.
924
+ * Declaration coverage information. Depending on the reporter and
925
+ * language, this may be types such as functions, methods, or namespaces.
853
926
  */
854
- functionCoverage?: CoveredCount;
927
+ declarationCoverage?: TestCoverageCount;
855
928
 
856
929
  /**
857
- * Detailed, per-statement coverage. If this is undefined, the editor will
858
- * call {@link TestCoverageProvider.resolveFileCoverage} when necessary.
930
+ * A list of {@link TestItem test cases} that generated coverage in this
931
+ * file. If set, then {@link TestRunProfile.loadDetailedCoverageForTest}
932
+ * should also be defined in order to retrieve detailed coverage information.
859
933
  */
860
- detailedCoverage?: DetailedCoverage[];
934
+ includesTests?: TestItem[];
861
935
 
862
936
  /**
863
937
  * Creates a {@link FileCoverage} instance with counts filled in from
@@ -865,7 +939,7 @@ declare module "vscode" {
865
939
  * @param uri Covered file URI
866
940
  * @param detailed Detailed coverage information
867
941
  */
868
- static fromDetails(uri: Uri, details: readonly DetailedCoverage[]): FileCoverage;
942
+ static fromDetails(uri: Uri, details: readonly FileCoverageDetail[]): FileCoverage;
869
943
 
870
944
  /**
871
945
  * @param uri Covered file URI
@@ -873,13 +947,15 @@ declare module "vscode" {
873
947
  * does not provide statement coverage information, this can instead be
874
948
  * used to represent line coverage.
875
949
  * @param branchCoverage Branch coverage information
876
- * @param functionCoverage Function coverage information
950
+ * @param declarationCoverage Declaration coverage information
951
+ * @param includesTests Test cases included in this coverage report, see {@link includesTests}
877
952
  */
878
953
  constructor(
879
954
  uri: Uri,
880
- statementCoverage: CoveredCount,
881
- branchCoverage?: CoveredCount,
882
- functionCoverage?: CoveredCount,
955
+ statementCoverage: TestCoverageCount,
956
+ branchCoverage?: TestCoverageCount,
957
+ declarationCoverage?: TestCoverageCount,
958
+ includesTests?: TestItem[],
883
959
  );
884
960
  }
885
961
 
@@ -888,10 +964,11 @@ declare module "vscode" {
888
964
  */
889
965
  export class StatementCoverage {
890
966
  /**
891
- * The number of times this statement was executed. If zero, the
892
- * statement will be marked as un-covered.
967
+ * The number of times this statement was executed, or a boolean indicating
968
+ * whether it was executed if the exact count is unknown. If zero or false,
969
+ * the statement will be marked as un-covered.
893
970
  */
894
- executionCount: number;
971
+ executed: number | boolean;
895
972
 
896
973
  /**
897
974
  * Statement location.
@@ -906,12 +983,13 @@ declare module "vscode" {
906
983
 
907
984
  /**
908
985
  * @param location The statement position.
909
- * @param executionCount The number of times this statement was
910
- * executed. If zero, the statement will be marked as un-covered.
986
+ * @param executed The number of times this statement was executed, or a
987
+ * boolean indicating whether it was executed if the exact count is
988
+ * unknown. If zero or false, the statement will be marked as un-covered.
911
989
  * @param branches Coverage from branches of this line. If it's not a
912
990
  * conditional, this should be omitted.
913
991
  */
914
- constructor(executionCount: number, location: Position | Range, branches?: BranchCoverage[]);
992
+ constructor(executed: number | boolean, location: Position | Range, branches?: BranchCoverage[]);
915
993
  }
916
994
 
917
995
  /**
@@ -919,10 +997,11 @@ declare module "vscode" {
919
997
  */
920
998
  export class BranchCoverage {
921
999
  /**
922
- * The number of times this branch was executed. If zero, the
923
- * branch will be marked as un-covered.
1000
+ * The number of times this branch was executed, or a boolean indicating
1001
+ * whether it was executed if the exact count is unknown. If zero or false,
1002
+ * the branch will be marked as un-covered.
924
1003
  */
925
- executionCount: number;
1004
+ executed: number | boolean;
926
1005
 
927
1006
  /**
928
1007
  * Branch location.
@@ -930,12 +1009,56 @@ declare module "vscode" {
930
1009
  location?: Position | Range;
931
1010
 
932
1011
  /**
933
- * @param executionCount The number of times this branch was executed.
1012
+ * Label for the branch, used in the context of "the ${label} branch was
1013
+ * not taken," for example.
1014
+ */
1015
+ label?: string;
1016
+
1017
+ /**
1018
+ * @param executed The number of times this branch was executed, or a
1019
+ * boolean indicating whether it was executed if the exact count is
1020
+ * unknown. If zero or false, the branch will be marked as un-covered.
934
1021
  * @param location The branch position.
935
1022
  */
936
- constructor(executionCount: number, location?: Position | Range);
1023
+ constructor(executed: number | boolean, location?: Position | Range, label?: string);
937
1024
  }
938
1025
 
1026
+ /**
1027
+ * Contains coverage information for a declaration. Depending on the reporter
1028
+ * and language, this may be types such as functions, methods, or namespaces.
1029
+ */
1030
+ export class DeclarationCoverage {
1031
+ /**
1032
+ * Name of the declaration.
1033
+ */
1034
+ name: string;
1035
+
1036
+ /**
1037
+ * The number of times this declaration was executed, or a boolean
1038
+ * indicating whether it was executed if the exact count is unknown. If
1039
+ * zero or false, the declaration will be marked as un-covered.
1040
+ */
1041
+ executed: number | boolean;
1042
+
1043
+ /**
1044
+ * Declaration location.
1045
+ */
1046
+ location: Position | Range;
1047
+
1048
+ /**
1049
+ * @param executed The number of times this declaration was executed, or a
1050
+ * boolean indicating whether it was executed if the exact count is
1051
+ * unknown. If zero or false, the declaration will be marked as un-covered.
1052
+ * @param location The declaration position.
1053
+ */
1054
+ constructor(name: string, executed: number | boolean, location: Position | Range);
1055
+ }
1056
+
1057
+ /**
1058
+ * Coverage details returned from {@link TestRunProfile.loadDetailedCoverage}.
1059
+ */
1060
+ export type FileCoverageDetail = StatementCoverage | DeclarationCoverage;
1061
+
939
1062
  /**
940
1063
  * Contains coverage information for a function or method.
941
1064
  */
@@ -420,6 +420,25 @@ declare module 'vscode' {
420
420
  */
421
421
  export const onDidChangeTerminalState: Event<Terminal>;
422
422
 
423
+ /**
424
+ * Fires when shell integration activates or one of its properties changes in a terminal.
425
+ */
426
+ export const onDidChangeTerminalShellIntegration: Event<TerminalShellIntegrationChangeEvent>;
427
+
428
+ /**
429
+ * This will be fired when a terminal command is started. This event will fire only when
430
+ * [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) is
431
+ * activated for the terminal.
432
+ */
433
+ export const onDidStartTerminalShellExecution: Event<TerminalShellExecutionStartEvent>;
434
+
435
+ /**
436
+ * This will be fired when a terminal command is ended. This event will fire only when
437
+ * [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) is
438
+ * activated for the terminal.
439
+ */
440
+ export const onDidEndTerminalShellExecution: Event<TerminalShellExecutionEndEvent>;
441
+
423
442
  /**
424
443
  * Represents the current window's state.
425
444
  */
@@ -869,6 +888,12 @@ declare module 'vscode' {
869
888
  */
870
889
  readonly visible: boolean;
871
890
 
891
+ /**
892
+ * The badge to display for this webview view.
893
+ * To remove the badge, set to undefined.
894
+ */
895
+ badge?: ViewBadge | undefined;
896
+
872
897
  /**
873
898
  * Event fired when the visibility of the view changes.
874
899
  *