55 *--------------------------------------------------------------------------------------------*/
66
77/**
8- * Type Definition for Visual Studio Code 1.104 Extension API
8+ * Type Definition for Visual Studio Code 1.105 Extension API
99 * See https://code.visualstudio.com/api for more information
1010 */
1111
@@ -1672,7 +1672,7 @@ declare module 'vscode' {
16721672 /**
16731673 * An {@link Event} which fires upon cancellation.
16741674 */
1675- onCancellationRequested: Event<any>;
1675+ readonly onCancellationRequested: Event<any>;
16761676 }
16771677
16781678 /**
@@ -8585,6 +8585,11 @@ declare module 'vscode' {
85858585 * machines.
85868586 */
85878587 export interface SecretStorage {
8588+ /**
8589+ * Retrieve the keys of all the secrets stored by this extension.
8590+ */
8591+ keys(): Thenable<string[]>;
8592+
85888593 /**
85898594 * Retrieve a secret that was stored with key. Returns undefined if there
85908595 * is no password matching that key.
@@ -8609,7 +8614,7 @@ declare module 'vscode' {
86098614 /**
86108615 * Fires when a secret is stored or deleted.
86118616 */
8612- onDidChange: Event<SecretStorageChangeEvent>;
8617+ readonly onDidChange: Event<SecretStorageChangeEvent>;
86138618 }
86148619
86158620 /**
@@ -13075,7 +13080,7 @@ declare module 'vscode' {
1307513080 * (Examples include: an explicit call to {@link QuickInput.hide},
1307613081 * the user pressing Esc, some other input UI opening, etc.)
1307713082 */
13078- onDidHide: Event<void>;
13083+ readonly onDidHide: Event<void>;
1307913084
1308013085 /**
1308113086 * Dispose of this input UI and any associated resources. If it is still
@@ -13889,8 +13894,10 @@ declare module 'vscode' {
1388913894 * In the same way, symbolic links are preserved, i.e. the file event will report the path of the
1389013895 * symbolic link as it was provided for watching and not the target.
1389113896 *
13892- * *Note* that file events from deleting a folder may not include events for contained files. If possible
13893- * events will be aggregated to reduce the overal number of emitted events.
13897+ * *Note* that file events from deleting a folder may not include events for contained files but
13898+ * only the most top level folder that was deleted. This is a performance optimisation to reduce
13899+ * the overhead of file events being sent. If you need to know about all deleted files, you have
13900+ * to watch with `**` and deal with all file events yourself.
1389413901 *
1389513902 * ### Examples
1389613903 *
@@ -17815,6 +17822,30 @@ declare module 'vscode' {
1781517822 account?: AuthenticationSessionAccountInformation;
1781617823 }
1781717824
17825+ /**
17826+ * Represents parameters for creating a session based on a WWW-Authenticate header value.
17827+ * This is used when an API returns a 401 with a WWW-Authenticate header indicating
17828+ * that additional authentication is required. The details of which will be passed down
17829+ * to the authentication provider to create a session.
17830+ *
17831+ * @note The authorization provider must support handling challenges and specifically
17832+ * the challenges in this WWW-Authenticate value.
17833+ * @note For more information on WWW-Authenticate please see https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/WWW-Authenticate
17834+ */
17835+ export interface AuthenticationWwwAuthenticateRequest {
17836+ /**
17837+ * The raw WWW-Authenticate header value that triggered this challenge.
17838+ * This will be parsed by the authentication provider to extract the necessary
17839+ * challenge information.
17840+ */
17841+ readonly wwwAuthenticate: string;
17842+
17843+ /**
17844+ * The fallback scopes to use if no scopes are found in the WWW-Authenticate header.
17845+ */
17846+ readonly fallbackScopes?: readonly string[];
17847+ }
17848+
1781817849 /**
1781917850 * Basic information about an {@link AuthenticationProvider}
1782017851 */
@@ -17937,49 +17968,59 @@ declare module 'vscode' {
1793717968 */
1793817969 export namespace authentication {
1793917970 /**
17940- * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
17941- * registered, or if the user does not consent to sharing authentication information with
17942- * the extension. If there are multiple sessions with the same scopes, the user will be shown a
17943- * quickpick to select which account they would like to use.
17971+ * Get an authentication session matching the desired scopes or satisfying the WWW-Authenticate request. Rejects if
17972+ * a provider with providerId is not registered, or if the user does not consent to sharing authentication information
17973+ * with the extension. If there are multiple sessions with the same scopes, the user will be shown a quickpick to
17974+ * select which account they would like to use.
17975+ *
17976+ * Built-in auth providers include:
17977+ * * 'github' - For GitHub.com
17978+ * * 'microsoft' For both personal & organizational Microsoft accounts
17979+ * * (less common) 'github-enterprise' - for alternative GitHub hostings, GHE.com, GitHub Enterprise Server
17980+ * * (less common) 'microsoft-sovereign-cloud' - for alternative Microsoft clouds
1794417981 *
17945- * Currently, there are only two authentication providers that are contributed from built in extensions
17946- * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
1794717982 * @param providerId The id of the provider to use
17948- * @param scopes A list of scopes representing the permissions requested . These are dependent on the authentication provider
17983+ * @param scopeListOrRequest A scope list of permissions requested or a WWW-Authenticate request . These are dependent on the authentication provider.
1794917984 * @param options The {@link AuthenticationGetSessionOptions} to use
1795017985 * @returns A thenable that resolves to an authentication session
1795117986 */
17952- export function getSession(providerId: string, scopes: readonly string[] , options: AuthenticationGetSessionOptions & { /** */createIfNone: true | AuthenticationGetSessionPresentationOptions }): Thenable<AuthenticationSession>;
17987+ export function getSession(providerId: string, scopeListOrRequest: ReadonlyArray< string> | AuthenticationWwwAuthenticateRequest , options: AuthenticationGetSessionOptions & { /** */createIfNone: true | AuthenticationGetSessionPresentationOptions }): Thenable<AuthenticationSession>;
1795317988
1795417989 /**
17955- * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
17956- * registered, or if the user does not consent to sharing authentication information with
17957- * the extension. If there are multiple sessions with the same scopes, the user will be shown a
17958- * quickpick to select which account they would like to use.
17990+ * Get an authentication session matching the desired scopes or request. Rejects if a provider with providerId is not
17991+ * registered, or if the user does not consent to sharing authentication information with the extension. If there
17992+ * are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
17993+ *
17994+ * Built-in auth providers include:
17995+ * * 'github' - For GitHub.com
17996+ * * 'microsoft' For both personal & organizational Microsoft accounts
17997+ * * (less common) 'github-enterprise' - for alternative GitHub hostings, GHE.com, GitHub Enterprise Server
17998+ * * (less common) 'microsoft-sovereign-cloud' - for alternative Microsoft clouds
1795917999 *
17960- * Currently, there are only two authentication providers that are contributed from built in extensions
17961- * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
1796218000 * @param providerId The id of the provider to use
17963- * @param scopes A list of scopes representing the permissions requested . These are dependent on the authentication provider
18001+ * @param scopeListOrRequest A scope list of permissions requested or a WWW-Authenticate request . These are dependent on the authentication provider.
1796418002 * @param options The {@link AuthenticationGetSessionOptions} to use
1796518003 * @returns A thenable that resolves to an authentication session
1796618004 */
17967- export function getSession(providerId: string, scopes: readonly string[] , options: AuthenticationGetSessionOptions & { /** literal-type defines return type */forceNewSession: true | AuthenticationGetSessionPresentationOptions | AuthenticationForceNewSessionOptions }): Thenable<AuthenticationSession>;
18005+ export function getSession(providerId: string, scopeListOrRequest: ReadonlyArray< string> | AuthenticationWwwAuthenticateRequest , options: AuthenticationGetSessionOptions & { /** literal-type defines return type */forceNewSession: true | AuthenticationGetSessionPresentationOptions | AuthenticationForceNewSessionOptions }): Thenable<AuthenticationSession>;
1796818006
1796918007 /**
17970- * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
17971- * registered, or if the user does not consent to sharing authentication information with
17972- * the extension. If there are multiple sessions with the same scopes, the user will be shown a
17973- * quickpick to select which account they would like to use.
18008+ * Get an authentication session matching the desired scopes or request. Rejects if a provider with providerId is not
18009+ * registered, or if the user does not consent to sharing authentication information with the extension. If there
18010+ * are multiple sessions with the same scopes, the user will be shown a quickpick to select which account they would like to use.
18011+ *
18012+ * Built-in auth providers include:
18013+ * * 'github' - For GitHub.com
18014+ * * 'microsoft' For both personal & organizational Microsoft accounts
18015+ * * (less common) 'github-enterprise' - for alternative GitHub hostings, GHE.com, GitHub Enterprise Server
18016+ * * (less common) 'microsoft-sovereign-cloud' - for alternative Microsoft clouds
1797418017 *
17975- * Currently, there are only two authentication providers that are contributed from built in extensions
17976- * to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
1797718018 * @param providerId The id of the provider to use
17978- * @param scopes A list of scopes representing the permissions requested . These are dependent on the authentication provider
18019+ * @param scopeListOrRequest A scope list of permissions requested or a WWW-Authenticate request . These are dependent on the authentication provider.
1797918020 * @param options The {@link AuthenticationGetSessionOptions} to use
17980- * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
18021+ * @returns A thenable that resolves to an authentication session or undefined if a silent flow was used and no session was found
1798118022 */
17982- export function getSession(providerId: string, scopes: readonly string[] , options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
18023+ export function getSession(providerId: string, scopeListOrRequest: ReadonlyArray< string> | AuthenticationWwwAuthenticateRequest , options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
1798318024
1798418025 /**
1798518026 * Get all accounts that the user is logged in to for the specified provider.
@@ -18190,7 +18231,7 @@ declare module 'vscode' {
1819018231 * Fired when a user has changed whether this is a default profile. The
1819118232 * event contains the new value of {@link isDefault}
1819218233 */
18193- onDidChangeDefault: Event<boolean>;
18234+ readonly onDidChangeDefault: Event<boolean>;
1819418235
1819518236 /**
1819618237 * Whether this profile supports continuous running of requests. If so,
@@ -18569,7 +18610,7 @@ declare module 'vscode' {
1856918610 * An event fired when the editor is no longer interested in data
1857018611 * associated with the test run.
1857118612 */
18572- onDidDispose: Event<void>;
18613+ readonly onDidDispose: Event<void>;
1857318614 }
1857418615
1857518616 /**
@@ -19645,7 +19686,7 @@ declare module 'vscode' {
1964519686 * The passed {@link ChatResultFeedback.result result} is guaranteed to have the same properties as the result that was
1964619687 * previously returned from this chat participant's handler.
1964719688 */
19648- onDidReceiveFeedback: Event<ChatResultFeedback>;
19689+ readonly onDidReceiveFeedback: Event<ChatResultFeedback>;
1964919690
1965019691 /**
1965119692 * Dispose this participant and free resources.
@@ -20460,20 +20501,24 @@ declare module 'vscode' {
2046020501 /**
2046120502 * Various features that the model supports such as tool calling or image input.
2046220503 */
20463- readonly capabilities: {
20504+ readonly capabilities: LanguageModelChatCapabilities;
20505+ }
2046420506
20465- /**
20466- * Whether image input is supported by the model.
20467- * Common supported images are jpg and png, but each model will vary in supported mimetypes.
20468- */
20469- readonly imageInput?: boolean;
20507+ /**
20508+ * Various features that the {@link LanguageModelChatInformation} supports such as tool calling or image input.
20509+ */
20510+ export interface LanguageModelChatCapabilities {
20511+ /**
20512+ * Whether image input is supported by the model.
20513+ * Common supported images are jpg and png, but each model will vary in supported mimetypes.
20514+ */
20515+ readonly imageInput?: boolean;
2047020516
20471- /**
20472- * Whether tool calling is supported by the model.
20473- * If a number is provided, that is the maximum number of tools that can be provided in a request to the model.
20474- */
20475- readonly toolCalling?: boolean | number;
20476- };
20517+ /**
20518+ * Whether tool calling is supported by the model.
20519+ * If a number is provided, that is the maximum number of tools that can be provided in a request to the model.
20520+ */
20521+ readonly toolCalling?: boolean | number;
2047720522 }
2047820523
2047920524 /**
@@ -20672,7 +20717,7 @@ declare module 'vscode' {
2067220717 * @param vendor The vendor for this provider. Must be globally unique. An example is `copilot` or `openai`.
2067320718 * @param provider The provider to register
2067420719 * @returns A disposable that unregisters the provider when disposed
20675- */
20720+ */
2067620721 export function registerLanguageModelChatProvider(vendor: string, provider: LanguageModelChatProvider): Disposable;
2067720722 }
2067820723
@@ -20684,7 +20729,7 @@ declare module 'vscode' {
2068420729 /**
2068520730 * An event that fires when access information changes.
2068620731 */
20687- onDidChange: Event<void>;
20732+ readonly onDidChange: Event<void>;
2068820733
2068920734 /**
2069020735 * Checks if a request can be made to a language model.
0 commit comments