VS Code API is a set of JavaScript APIs that you can invoke in your Visual Studio Code extension. This page lists all VS Code APIs available to extension authors.
API namespaces and classes
This listing is compiled from the vscode.d.ts file from the VS Code repository.
authentication
Events
onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>
Functions
getAccounts(providerId: string): Thenable<readonly AuthenticationSessionAccountInformation[]>
| Parameter | Description |
|---|---|
| providerId: string | The id of the provider to use |
| Returns | Description |
| Thenable<readonly AuthenticationSessionAccountInformation[]> | A thenable that resolves to a readonly array of authentication accounts. |
getSession(providerId: string, scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest, options: AuthenticationGetSessionOptions & {createIfNone: true | AuthenticationGetSessionPresentationOptions}): Thenable<AuthenticationSession>
| Parameter | Description |
|---|---|
| providerId: string | The id of the provider to use |
| scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest | A scope list of permissions requested or a WWW-Authenticate request. These are dependent on the authentication provider. |
| options: AuthenticationGetSessionOptions & {createIfNone: true | AuthenticationGetSessionPresentationOptions} | The AuthenticationGetSessionOptions to use |
| Returns | Description |
| Thenable<AuthenticationSession> | A thenable that resolves to an authentication session |
getSession(providerId: string, scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest, options: AuthenticationGetSessionOptions & {forceNewSession: true | AuthenticationGetSessionPresentationOptions}): Thenable<AuthenticationSession>
| Parameter | Description |
|---|---|
| providerId: string | The id of the provider to use |
| scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest | A scope list of permissions requested or a WWW-Authenticate request. These are dependent on the authentication provider. |
| options: AuthenticationGetSessionOptions & {forceNewSession: true | AuthenticationGetSessionPresentationOptions} | The AuthenticationGetSessionOptions to use |
| Returns | Description |
| Thenable<AuthenticationSession> | A thenable that resolves to an authentication session |
getSession(providerId: string, scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest, options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>
| Parameter | Description |
|---|---|
| providerId: string | The id of the provider to use |
| scopeListOrRequest: readonly string[] | AuthenticationWwwAuthenticateRequest | A scope list of permissions requested or a WWW-Authenticate request. These are dependent on the authentication provider. |
| options?: AuthenticationGetSessionOptions | The AuthenticationGetSessionOptions to use |
| Returns | Description |
| Thenable<AuthenticationSession | undefined> | A thenable that resolves to an authentication session or undefined if a silent flow was used and no session was found |
registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable
| Parameter | Description |
|---|---|
| id: string | The unique identifier of the provider. |
| label: string | The human-readable name of the provider. |
| provider: AuthenticationProvider | The authentication provider provider. |
| options?: AuthenticationProviderOptions | Additional options for the provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
chat
Functions
createChatParticipant(id: string, handler: ChatRequestHandler): ChatParticipant
| Parameter | Description |
|---|---|
| id: string | A unique identifier for the participant. |
| handler: ChatRequestHandler | A request handler for the participant. |
| Returns | Description |
| ChatParticipant | A new chat participant |
commands
Functions
executeCommand<T>(command: string, ...rest: any[]): Thenable<T>
| Parameter | Description |
|---|---|
| command: string | Identifier of the command to execute. |
| ...rest: any[] | Parameters passed to the command function. |
| Returns | Description |
| Thenable<T> | A thenable that resolves to the returned value of the given command. Returns |
getCommands(filterInternal?: boolean): Thenable<string[]>
| Parameter | Description |
|---|---|
| filterInternal?: boolean | Set |
| Returns | Description |
| Thenable<string[]> | Thenable that resolves to a list of command ids. |
registerCommand(command: string, callback: (args: any[]) => any, thisArg?: any): Disposable
| Parameter | Description |
|---|---|
| command: string | A unique identifier for the command. |
| callback: (args: any[]) => any | A command handler function. |
| thisArg?: any | The |
| Returns | Description |
| Disposable | Disposable which unregisters this command on disposal. |
registerTextEditorCommand(command: string, callback: (textEditor: TextEditor, edit: TextEditorEdit, args: any[]) => void, thisArg?: any): Disposable
| Parameter | Description |
|---|---|
| command: string | A unique identifier for the command. |
| callback: (textEditor: TextEditor, edit: TextEditorEdit, args: any[]) => void | A command handler function with access to an editor and an edit. |
| thisArg?: any | The |
| Returns | Description |
| Disposable | Disposable which unregisters this command on disposal. |
Functions
createCommentController(id: string, label: string): CommentController
| Parameter | Description |
|---|---|
| id: string | An |
| label: string | A human-readable string for the comment controller. |
| Returns | Description |
| CommentController | An instance of comment controller. |
debug
Variables
activeDebugConsole: DebugConsole
activeDebugSession: DebugSession | undefined
activeStackItem: DebugThread | DebugStackFrame | undefined
breakpoints: readonly Breakpoint[]
Events
onDidChangeActiveDebugSession: Event<DebugSession | undefined>
onDidChangeActiveStackItem: Event<DebugThread | DebugStackFrame | undefined>
onDidChangeBreakpoints: Event<BreakpointsChangeEvent>
onDidReceiveDebugSessionCustomEvent: Event<DebugSessionCustomEvent>
onDidStartDebugSession: Event<DebugSession>
onDidTerminateDebugSession: Event<DebugSession>
Functions
addBreakpoints(breakpoints: readonly Breakpoint[]): void
| Parameter | Description |
|---|---|
| breakpoints: readonly Breakpoint[] | The breakpoints to add. |
| Returns | Description |
| void |
asDebugSourceUri(source: DebugProtocolSource, session?: DebugSession): Uri
| Parameter | Description |
|---|---|
| source: DebugProtocolSource | An object conforming to the Source type defined in the Debug Adapter Protocol. |
| session?: DebugSession | An optional debug session that will be used when the source descriptor uses a reference number to load the contents from an active debug session. |
| Returns | Description |
| Uri | A uri that can be used to load the contents of the source. |
registerDebugAdapterDescriptorFactory(debugType: string, factory: DebugAdapterDescriptorFactory): Disposable
| Parameter | Description |
|---|---|
| debugType: string | The debug type for which the factory is registered. |
| factory: DebugAdapterDescriptorFactory | The debug adapter descriptor factory to register. |
| Returns | Description |
| Disposable | A Disposable that unregisters this factory when being disposed. |
registerDebugAdapterTrackerFactory(debugType: string, factory: DebugAdapterTrackerFactory): Disposable
| Parameter | Description |
|---|---|
| debugType: string | The debug type for which the factory is registered or '*' for matching all debug types. |
| factory: DebugAdapterTrackerFactory | The debug adapter tracker factory to register. |
| Returns | Description |
| Disposable | A Disposable that unregisters this factory when being disposed. |
registerDebugConfigurationProvider(debugType: string, provider: DebugConfigurationProvider, triggerKind?: DebugConfigurationProviderTriggerKind): Disposable
| Parameter | Description |
|---|---|
| debugType: string | The debug type for which the provider is registered. |
| provider: DebugConfigurationProvider | The debug configuration provider to register. |
| triggerKind?: DebugConfigurationProviderTriggerKind | The trigger for which the 'provideDebugConfiguration' method of the provider is registered. If |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
removeBreakpoints(breakpoints: readonly Breakpoint[]): void
| Parameter | Description |
|---|---|
| breakpoints: readonly Breakpoint[] | The breakpoints to remove. |
| Returns | Description |
| void |
startDebugging(folder: WorkspaceFolder, nameOrConfiguration: string | DebugConfiguration, parentSessionOrOptions?: DebugSession | DebugSessionOptions): Thenable<boolean>
| Parameter | Description |
|---|---|
| folder: WorkspaceFolder | The workspace folder for looking up named configurations and resolving variables or |
| nameOrConfiguration: string | DebugConfiguration | Either the name of a debug or compound configuration or a DebugConfiguration object. |
| parentSessionOrOptions?: DebugSession | DebugSessionOptions | Debug session options. When passed a parent debug session, assumes options with just this parent session. |
| Returns | Description |
| Thenable<boolean> | A thenable that resolves when debugging could be successfully started. |
stopDebugging(session?: DebugSession): Thenable<void>
| Parameter | Description |
|---|---|
| session?: DebugSession | The debug session to stop; if omitted all sessions are stopped. |
| Returns | Description |
| Thenable<void> | A thenable that resolves when the session(s) have been stopped. |
env
Variables
clipboard: Clipboard
logLevel: LogLevel
remoteName: string | undefined
uiKind: UIKind
Events
onDidChangeLogLevel: Event<LogLevel>
onDidChangeShell: Event<string>
onDidChangeTelemetryEnabled: Event<boolean>
Functions
asExternalUri(target: Uri): Thenable<Uri>
| Parameter | Description |
|---|---|
| target: Uri | |
| Returns | Description |
| Thenable<Uri> | A uri that can be used on the client machine. |
createTelemetryLogger(sender: TelemetrySender, options?: TelemetryLoggerOptions): TelemetryLogger
| Parameter | Description |
|---|---|
| sender: TelemetrySender | The telemetry sender that is used by the telemetry logger. |
| options?: TelemetryLoggerOptions | Options for the telemetry logger. |
| Returns | Description |
| TelemetryLogger | A new telemetry logger |
openExternal(target: Uri): Thenable<boolean>
| Parameter | Description |
|---|---|
| target: Uri | The uri that should be opened. |
| Returns | Description |
| Thenable<boolean> | A promise indicating if open was successful. |
extensions
Variables
all: readonly Extension<any>[]
Events
onDidChange: Event<void>
Functions
getExtension<T>(extensionId: string): Extension<T> | undefined
| Parameter | Description |
|---|---|
| extensionId: string | An extension identifier. |
| Returns | Description |
| Extension<T> | undefined | An extension or |
l10n
Variables
uri: Uri | undefined
Functions
t(message: string, ...args: Array<string | number | boolean>): string
| Parameter | Description |
|---|---|
| message: string | The message to localize. Supports index templating where strings like |
| ...args: Array<string | number | boolean> | The arguments to be used in the localized string. The index of the argument is used to match the template placeholder in the localized string. |
| Returns | Description |
| string | localized string with injected arguments. |
t(message: string, args: Record<string, string | number | boolean>): string
| Parameter | Description |
|---|---|
| message: string | The message to localize. Supports named templating where strings like |
| args: Record<string, string | number | boolean> | The arguments to be used in the localized string. The name of the key in the record is used to match the template placeholder in the localized string. |
| Returns | Description |
| string | localized string with injected arguments. |
t(options: {args: Array<string | number | boolean> | Record<string, string | number | boolean>, comment: string | string[], message: string}): string
| Parameter | Description |
|---|---|
| options: {args: Array<string | number | boolean> | Record<string, string | number | boolean>, comment: string | string[], message: string} | The options to use when localizing the message. |
| Returns | Description |
| string | localized string with injected arguments. |
languages
Events
onDidChangeDiagnostics: Event<DiagnosticChangeEvent>
Functions
createDiagnosticCollection(name?: string): DiagnosticCollection
| Parameter | Description |
|---|---|
| name?: string | The name of the collection. |
| Returns | Description |
| DiagnosticCollection | A new diagnostic collection. |
createLanguageStatusItem(id: string, selector: DocumentSelector): LanguageStatusItem
| Parameter | Description |
|---|---|
| id: string | The identifier of the item. |
| selector: DocumentSelector | The document selector that defines for what editors the item shows. |
| Returns | Description |
| LanguageStatusItem | A new language status item. |
getDiagnostics(resource: Uri): Diagnostic[]
| Parameter | Description |
|---|---|
| resource: Uri | A resource |
| Returns | Description |
| Diagnostic[] | An array of diagnostics objects or an empty array. |
getDiagnostics(): Array<[Uri, Diagnostic[]]>
| Parameter | Description |
|---|---|
| Returns | Description |
| Array<[Uri, Diagnostic[]]> | An array of uri-diagnostics tuples or an empty array. |
getLanguages(): Thenable<string[]>
| Parameter | Description |
|---|---|
| Returns | Description |
| Thenable<string[]> | Promise resolving to an array of identifier strings. |
match(selector: DocumentSelector, document: TextDocument): number
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A document selector. |
| document: TextDocument | A text document. |
| Returns | Description |
| number | A number |
registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: CallHierarchyProvider | A call hierarchy provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerCodeActionsProvider(selector: DocumentSelector, provider: CodeActionProvider<CodeAction>, metadata?: CodeActionProviderMetadata): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: CodeActionProvider<CodeAction> | A code action provider. |
| metadata?: CodeActionProviderMetadata | Metadata about the kind of code actions the provider provides. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerCodeLensProvider(selector: DocumentSelector, provider: CodeLensProvider<CodeLens>): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: CodeLensProvider<CodeLens> | A code lens provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentColorProvider | A color provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerCompletionItemProvider(selector: DocumentSelector, provider: CompletionItemProvider<CompletionItem>, ...triggerCharacters: string[]): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: CompletionItemProvider<CompletionItem> | A completion provider. |
| ...triggerCharacters: string[] | Trigger completion when the user types one of the characters. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDeclarationProvider(selector: DocumentSelector, provider: DeclarationProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DeclarationProvider | A declaration provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DefinitionProvider | A definition provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentDropEditProvider(selector: DocumentSelector, provider: DocumentDropEditProvider<DocumentDropEdit>, metadata?: DocumentDropEditProviderMetadata): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider applies to. |
| provider: DocumentDropEditProvider<DocumentDropEdit> | A drop provider. |
| metadata?: DocumentDropEditProviderMetadata | Additional metadata about the provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when disposed of. |
registerDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentFormattingEditProvider | A document formatting edit provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentHighlightProvider | A document highlight provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider<DocumentLink>): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentLinkProvider<DocumentLink> | A document link provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider<DocumentPasteEdit>, metadata: DocumentPasteProviderMetadata): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider applies to. |
| provider: DocumentPasteEditProvider<DocumentPasteEdit> | A paste editor provider. |
| metadata: DocumentPasteProviderMetadata | Additional metadata about the provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when disposed of. |
registerDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentRangeFormattingEditProvider | A document range formatting edit provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentRangeSemanticTokensProvider(selector: DocumentSelector, provider: DocumentRangeSemanticTokensProvider, legend: SemanticTokensLegend): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentRangeSemanticTokensProvider | A document range semantic tokens provider. |
| legend: SemanticTokensLegend | |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentSemanticTokensProvider(selector: DocumentSelector, provider: DocumentSemanticTokensProvider, legend: SemanticTokensLegend): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentSemanticTokensProvider | A document semantic tokens provider. |
| legend: SemanticTokensLegend | |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerDocumentSymbolProvider(selector: DocumentSelector, provider: DocumentSymbolProvider, metaData?: DocumentSymbolProviderMetadata): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: DocumentSymbolProvider | A document symbol provider. |
| metaData?: DocumentSymbolProviderMetadata | metadata about the provider |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerEvaluatableExpressionProvider(selector: DocumentSelector, provider: EvaluatableExpressionProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: EvaluatableExpressionProvider | An evaluatable expression provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: FoldingRangeProvider | A folding range provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: HoverProvider | A hover provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: ImplementationProvider | An implementation provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerInlayHintsProvider(selector: DocumentSelector, provider: InlayHintsProvider<InlayHint>): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: InlayHintsProvider<InlayHint> | An inlay hints provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerInlineCompletionItemProvider(selector: DocumentSelector, provider: InlineCompletionItemProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: InlineCompletionItemProvider | An inline completion provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerInlineValuesProvider(selector: DocumentSelector, provider: InlineValuesProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: InlineValuesProvider | An inline values provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerLinkedEditingRangeProvider(selector: DocumentSelector, provider: LinkedEditingRangeProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: LinkedEditingRangeProvider | A linked editing range provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerOnTypeFormattingEditProvider(selector: DocumentSelector, provider: OnTypeFormattingEditProvider, firstTriggerCharacter: string, ...moreTriggerCharacter: string[]): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: OnTypeFormattingEditProvider | An on type formatting edit provider. |
| firstTriggerCharacter: string | A character on which formatting should be triggered, like |
| ...moreTriggerCharacter: string[] | More trigger characters. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerReferenceProvider(selector: DocumentSelector, provider: ReferenceProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: ReferenceProvider | A reference provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerRenameProvider(selector: DocumentSelector, provider: RenameProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: RenameProvider | A rename provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: SelectionRangeProvider | A selection range provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: SignatureHelpProvider | A signature help provider. |
| ...triggerCharacters: string[] | Trigger signature help when the user types one of the characters, like |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, metadata: SignatureHelpProviderMetadata): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: SignatureHelpProvider | A signature help provider. |
| metadata: SignatureHelpProviderMetadata | Information about the provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: TypeDefinitionProvider | A type definition provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerTypeHierarchyProvider(selector: DocumentSelector, provider: TypeHierarchyProvider): Disposable
| Parameter | Description |
|---|---|
| selector: DocumentSelector | A selector that defines the documents this provider is applicable to. |
| provider: TypeHierarchyProvider | A type hierarchy provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerWorkspaceSymbolProvider(provider: WorkspaceSymbolProvider<SymbolInformation>): Disposable
| Parameter | Description |
|---|---|
| provider: WorkspaceSymbolProvider<SymbolInformation> | A workspace symbol provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
setLanguageConfiguration(language: string, configuration: LanguageConfiguration): Disposable
| Parameter | Description |
|---|---|
| language: string | A language identifier like |
| configuration: LanguageConfiguration | Language configuration. |
| Returns | Description |
| Disposable | A Disposable that unsets this configuration. |
setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>
| Parameter | Description |
|---|---|
| document: TextDocument | The document which language is to be changed |
| languageId: string | The new language identifier. |
| Returns | Description |
| Thenable<TextDocument> | A thenable that resolves with the updated document. |
lm
Variables
tools: readonly LanguageModelToolInformation[]
Events
onDidChangeChatModels: Event<void>
Functions
invokeTool(name: string, options: LanguageModelToolInvocationOptions<object>, token?: CancellationToken): Thenable<LanguageModelToolResult>
| Parameter | Description |
|---|---|
| name: string | The name of the tool to call. |
| options: LanguageModelToolInvocationOptions<object> | The options to use when invoking the tool. |
| token?: CancellationToken | A cancellation token. See CancellationTokenSource for how to create one. |
| Returns | Description |
| Thenable<LanguageModelToolResult> | The result of the tool invocation. |
registerLanguageModelChatProvider(vendor: string, provider: LanguageModelChatProvider<LanguageModelChatInformation>): Disposable
| Parameter | Description |
|---|---|
| vendor: string | The vendor for this provider. Must be globally unique. An example is |
| provider: LanguageModelChatProvider<LanguageModelChatInformation> | The provider to register |
| Returns | Description |
| Disposable | A disposable that unregisters the provider when disposed |
registerMcpServerDefinitionProvider(id: string, provider: McpServerDefinitionProvider<McpServerDefinition>): Disposable
| Parameter | Description |
|---|---|
| id: string | The ID of the provider, which is unique to the extension. |
| provider: McpServerDefinitionProvider<McpServerDefinition> | The provider to register |
| Returns | Description |
| Disposable | A disposable that unregisters the provider when disposed. |
registerTool<T>(name: string, tool: LanguageModelTool<T>): Disposable
| Parameter | Description |
|---|---|
| name: string | |
| tool: LanguageModelTool<T> | |
| Returns | Description |
| Disposable | A Disposable that unregisters the tool when disposed. |
selectChatModels(selector?: LanguageModelChatSelector): Thenable<LanguageModelChat[]>
| Parameter | Description |
|---|---|
| selector?: LanguageModelChatSelector | A chat model selector. When omitted all chat models are returned. |
| Returns | Description |
| Thenable<LanguageModelChat[]> | An array of chat models, can be empty! |
notebooks
Functions
createNotebookController(id: string, notebookType: string, label: string, handler?: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void>): NotebookController
| Parameter | Description |
|---|---|
| id: string | Identifier of the controller. Must be unique per extension. |
| notebookType: string | A notebook type for which this controller is for. |
| label: string | The label of the controller. |
| handler?: (cells: NotebookCell[], notebook: NotebookDocument, controller: NotebookController) => void | Thenable<void> | The execute-handler of the controller. |
| Returns | Description |
| NotebookController | A new notebook controller. |
createRendererMessaging(rendererId: string): NotebookRendererMessaging
| Parameter | Description |
|---|---|
| rendererId: string | The renderer ID to communicate with |
| Returns | Description |
| NotebookRendererMessaging | A new notebook renderer messaging object. |
registerNotebookCellStatusBarItemProvider(notebookType: string, provider: NotebookCellStatusBarItemProvider): Disposable
| Parameter | Description |
|---|---|
| notebookType: string | The notebook type to register for. |
| provider: NotebookCellStatusBarItemProvider | A cell status bar provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
scm
Variables
inputBox: SourceControlInputBox
Functions
createSourceControl(id: string, label: string, rootUri?: Uri): SourceControl
| Parameter | Description |
|---|---|
| id: string | An |
| label: string | A human-readable string for the source control. E.g.: |
| rootUri?: Uri | An optional Uri of the root of the source control. E.g.: |
| Returns | Description |
| SourceControl | An instance of source control. |
tasks
Variables
taskExecutions: readonly TaskExecution[]
Events
onDidEndTask: Event<TaskEndEvent>
onDidEndTaskProcess: Event<TaskProcessEndEvent>
onDidStartTask: Event<TaskStartEvent>
onDidStartTaskProcess: Event<TaskProcessStartEvent>
Functions
executeTask(task: Task): Thenable<TaskExecution>
| Parameter | Description |
|---|---|
| task: Task | the task to execute |
| Returns | Description |
| Thenable<TaskExecution> | A thenable that resolves to a task execution. |
fetchTasks(filter?: TaskFilter): Thenable<Task[]>
| Parameter | Description |
|---|---|
| filter?: TaskFilter | Optional filter to select tasks of a certain type or version. |
| Returns | Description |
| Thenable<Task[]> | A thenable that resolves to an array of tasks. |
registerTaskProvider(type: string, provider: TaskProvider<Task>): Disposable
| Parameter | Description |
|---|---|
| type: string | The task kind type this provider is registered for. |
| provider: TaskProvider<Task> | A task provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
tests
Functions
createTestController(id: string, label: string): TestController
| Parameter | Description |
|---|---|
| id: string | Identifier for the controller, must be globally unique. |
| label: string | A human-readable label for the controller. |
| Returns | Description |
| TestController | An instance of the TestController. |
window
Variables
activeColorTheme: ColorTheme
activeNotebookEditor: NotebookEditor | undefined
activeTerminal: Terminal | undefined
activeTextEditor: TextEditor | undefined
state: WindowState
tabGroups: TabGroups
terminals: readonly Terminal[]
visibleNotebookEditors: readonly NotebookEditor[]
visibleTextEditors: readonly TextEditor[]
Events
onDidChangeActiveColorTheme: Event<ColorTheme>
onDidChangeActiveNotebookEditor: Event<NotebookEditor | undefined>
onDidChangeActiveTerminal: Event<Terminal | undefined>
onDidChangeActiveTextEditor: Event<TextEditor | undefined>
onDidChangeNotebookEditorSelection: Event<NotebookEditorSelectionChangeEvent>
onDidChangeNotebookEditorVisibleRanges: Event<NotebookEditorVisibleRangesChangeEvent>
onDidChangeTerminalShellIntegration: Event<TerminalShellIntegrationChangeEvent>
onDidChangeTerminalState: Event<Terminal>
onDidChangeTextEditorOptions: Event<TextEditorOptionsChangeEvent>
onDidChangeTextEditorSelection: Event<TextEditorSelectionChangeEvent>
onDidChangeTextEditorViewColumn: Event<TextEditorViewColumnChangeEvent>
onDidChangeTextEditorVisibleRanges: Event<TextEditorVisibleRangesChangeEvent>
onDidChangeVisibleNotebookEditors: Event<readonly NotebookEditor[]>
onDidChangeVisibleTextEditors: Event<readonly TextEditor[]>
onDidChangeWindowState: Event<WindowState>
onDidCloseTerminal: Event<Terminal>
onDidEndTerminalShellExecution: Event<TerminalShellExecutionEndEvent>
onDidOpenTerminal: Event<Terminal>
onDidStartTerminalShellExecution: Event<TerminalShellExecutionStartEvent>
Functions
createInputBox(): InputBox
createOutputChannel(name: string, languageId?: string): OutputChannel
| Parameter | Description |
|---|---|
| name: string | Human-readable string which will be used to represent the channel in the UI. |
| languageId?: string | The identifier of the language associated with the channel. |
| Returns | Description |
| OutputChannel | A new output channel. |
createOutputChannel(name: string, options: {log: true}): LogOutputChannel
| Parameter | Description |
|---|---|
| name: string | Human-readable string which will be used to represent the channel in the UI. |
| options: {log: true} | Options for the log output channel. |
| Returns | Description |
| LogOutputChannel | A new log output channel. |
createQuickPick<T extends QuickPickItem>(): QuickPick<T>
createStatusBarItem(id: string, alignment?: StatusBarAlignment, priority?: number): StatusBarItem
| Parameter | Description |
|---|---|
| id: string | The identifier of the item. Must be unique within the extension. |
| alignment?: StatusBarAlignment | The alignment of the item. |
| priority?: number | The priority of the item. Higher values mean the item should be shown more to the left. |
| Returns | Description |
| StatusBarItem | A new status bar item. |
createStatusBarItem(alignment?: StatusBarAlignment, priority?: number): StatusBarItem
| Parameter | Description |
|---|---|
| alignment?: StatusBarAlignment | The alignment of the item. |
| priority?: number | The priority of the item. Higher values mean the item should be shown more to the left. |
| Returns | Description |
| StatusBarItem | A new status bar item. |
createTerminal(name?: string, shellPath?: string, shellArgs?: string | readonly string[]): Terminal
| Parameter | Description |
|---|---|
| name?: string | Optional human-readable string which will be used to represent the terminal in the UI. |
| shellPath?: string | Optional path to a custom shell executable to be used in the terminal. |
| shellArgs?: string | readonly string[] | Optional args for the custom shell executable. A string can be used on Windows only which allows specifying shell args in command-line format. |
| Returns | Description |
| Terminal | A new Terminal. |
createTerminal(options: TerminalOptions): Terminal
| Parameter | Description |
|---|---|
| options: TerminalOptions | A TerminalOptions object describing the characteristics of the new terminal. |
| Returns | Description |
| Terminal | A new Terminal. |
createTerminal(options: ExtensionTerminalOptions): Terminal
| Parameter | Description |
|---|---|
| options: ExtensionTerminalOptions | An ExtensionTerminalOptions object describing the characteristics of the new terminal. |
| Returns | Description |
| Terminal | A new Terminal. |
createTextEditorDecorationType(options: DecorationRenderOptions): TextEditorDecorationType
| Parameter | Description |
|---|---|
| options: DecorationRenderOptions | Rendering options for the decoration type. |
| Returns | Description |
| TextEditorDecorationType | A new decoration type instance. |
createTreeView<T>(viewId: string, options: TreeViewOptions<T>): TreeView<T>
| Parameter | Description |
|---|---|
| viewId: string | Id of the view contributed using the extension point |
| options: TreeViewOptions<T> | Options for creating the TreeView |
| Returns | Description |
| TreeView<T> | a TreeView. |
createWebviewPanel(viewType: string, title: string, showOptions: ViewColumn | {preserveFocus: boolean, viewColumn: ViewColumn}, options?: WebviewPanelOptions & WebviewOptions): WebviewPanel
| Parameter | Description |
|---|---|
| viewType: string | Identifies the type of the webview panel. |
| title: string | Title of the panel. |
| showOptions: ViewColumn | {preserveFocus: boolean, viewColumn: ViewColumn} | Where to show the webview in the editor. If preserveFocus is set, the new webview will not take focus. |
| options?: WebviewPanelOptions & WebviewOptions | Settings for the new panel. |
| Returns | Description |
| WebviewPanel | New webview panel. |
registerCustomEditorProvider(viewType: string, provider: CustomTextEditorProvider | CustomReadonlyEditorProvider<CustomDocument> | CustomEditorProvider<CustomDocument>, options?: {supportsMultipleEditorsPerDocument: boolean, webviewOptions: WebviewPanelOptions}): Disposable
| Parameter | Description |
|---|---|
| viewType: string | Unique identifier for the custom editor provider. This should match the |
| provider: CustomTextEditorProvider | CustomReadonlyEditorProvider<CustomDocument> | CustomEditorProvider<CustomDocument> | Provider that resolves custom editors. |
| options?: {supportsMultipleEditorsPerDocument: boolean, webviewOptions: WebviewPanelOptions} | Options for the provider. |
| Returns | Description |
| Disposable | Disposable that unregisters the provider. |
registerFileDecorationProvider(provider: FileDecorationProvider): Disposable
| Parameter | Description |
|---|---|
| provider: FileDecorationProvider | |
| Returns | Description |
| Disposable | A Disposable that unregisters the provider. |
registerTerminalLinkProvider(provider: TerminalLinkProvider<TerminalLink>): Disposable
| Parameter | Description |
|---|---|
| provider: TerminalLinkProvider<TerminalLink> | The provider that provides the terminal links. |
| Returns | Description |
| Disposable | Disposable that unregisters the provider. |
registerTerminalProfileProvider(id: string, provider: TerminalProfileProvider): Disposable
| Parameter | Description |
|---|---|
| id: string | The ID of the contributed terminal profile. |
| provider: TerminalProfileProvider | The terminal profile provider. |
| Returns | Description |
| Disposable | A disposable that unregisters the provider. |
registerTreeDataProvider<T>(viewId: string, treeDataProvider: TreeDataProvider<T>): Disposable
| Parameter | Description |
|---|---|
| viewId: string | Id of the view contributed using the extension point |
| treeDataProvider: TreeDataProvider<T> | A TreeDataProvider that provides tree data for the view |
| Returns | Description |
| Disposable | A disposable that unregisters the TreeDataProvider. |
registerUriHandler(handler: UriHandler): Disposable
| Parameter | Description |
|---|---|
| handler: UriHandler | The uri handler to register for this extension. |
| Returns | Description |
| Disposable | A disposable that unregisters the handler. |
registerWebviewPanelSerializer(viewType: string, serializer: WebviewPanelSerializer<unknown>): Disposable
| Parameter | Description |
|---|---|
| viewType: string | Type of the webview panel that can be serialized. |
| serializer: WebviewPanelSerializer<unknown> | Webview serializer. |
| Returns | Description |
| Disposable | A disposable that unregisters the serializer. |
registerWebviewViewProvider(viewId: string, provider: WebviewViewProvider, options?: {webviewOptions: {retainContextWhenHidden: boolean}}): Disposable
| Parameter | Description |
|---|---|
| viewId: string | Unique id of the view. This should match the |
| provider: WebviewViewProvider | Provider for the webview views. |
| options?: {webviewOptions: {retainContextWhenHidden: boolean}} | |
| Returns | Description |
| Disposable | Disposable that unregisters the provider. |
setStatusBarMessage(text: string, hideAfterTimeout: number): Disposable
| Parameter | Description |
|---|---|
| text: string | The message to show, supports icon substitution as in status bar items. |
| hideAfterTimeout: number | Timeout in milliseconds after which the message will be disposed. |
| Returns | Description |
| Disposable | A disposable which hides the status bar message. |
setStatusBarMessage(text: string, hideWhenDone: Thenable<any>): Disposable
| Parameter | Description |
|---|---|
| text: string | The message to show, supports icon substitution as in status bar items. |
| hideWhenDone: Thenable<any> | Thenable on which completion (resolve or reject) the message will be disposed. |
| Returns | Description |
| Disposable | A disposable which hides the status bar message. |
setStatusBarMessage(text: string): Disposable
| Parameter | Description |
|---|---|
| text: string | The message to show, supports icon substitution as in status bar items. |
| Returns | Description |
| Disposable | A disposable which hides the status bar message. |
showErrorMessage<T extends string>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showErrorMessage<T extends string>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showErrorMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showErrorMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showInformationMessage<T extends string>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showInformationMessage<T extends string>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showInformationMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showInformationMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showInputBox(options?: InputBoxOptions, token?: CancellationToken): Thenable<string | undefined>
| Parameter | Description |
|---|---|
| options?: InputBoxOptions | Configures the behavior of the input box. |
| token?: CancellationToken | A token that can be used to signal cancellation. |
| Returns | Description |
| Thenable<string | undefined> | A thenable that resolves to a string the user provided or to |
showNotebookDocument(document: NotebookDocument, options?: NotebookDocumentShowOptions): Thenable<NotebookEditor>
| Parameter | Description |
|---|---|
| document: NotebookDocument | A text document to be shown. |
| options?: NotebookDocumentShowOptions | Editor options to configure the behavior of showing the notebook editor. |
| Returns | Description |
| Thenable<NotebookEditor> | A promise that resolves to an notebook editor. |
showOpenDialog(options?: OpenDialogOptions): Thenable<Uri[] | undefined>
| Parameter | Description |
|---|---|
| options?: OpenDialogOptions | Options that control the dialog. |
| Returns | Description |
| Thenable<Uri[] | undefined> | A promise that resolves to the selected resources or |
showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options: QuickPickOptions & {canPickMany: true}, token?: CancellationToken): Thenable<string[] | undefined>
| Parameter | Description |
|---|---|
| items: readonly string[] | Thenable<readonly string[]> | An array of strings, or a promise that resolves to an array of strings. |
| options: QuickPickOptions & {canPickMany: true} | Configures the behavior of the selection list. |
| token?: CancellationToken | A token that can be used to signal cancellation. |
| Returns | Description |
| Thenable<string[] | undefined> | A thenable that resolves to the selected items or |
showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>
| Parameter | Description |
|---|---|
| items: readonly string[] | Thenable<readonly string[]> | An array of strings, or a promise that resolves to an array of strings. |
| options?: QuickPickOptions | Configures the behavior of the selection list. |
| token?: CancellationToken | A token that can be used to signal cancellation. |
| Returns | Description |
| Thenable<string | undefined> | A thenable that resolves to the selected string or |
showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions & {canPickMany: true}, token?: CancellationToken): Thenable<T[] | undefined>
| Parameter | Description |
|---|---|
| items: readonly T[] | Thenable<readonly T[]> | An array of items, or a promise that resolves to an array of items. |
| options: QuickPickOptions & {canPickMany: true} | Configures the behavior of the selection list. |
| token?: CancellationToken | A token that can be used to signal cancellation. |
| Returns | Description |
| Thenable<T[] | undefined> | A thenable that resolves to the selected items or |
showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| items: readonly T[] | Thenable<readonly T[]> | An array of items, or a promise that resolves to an array of items. |
| options?: QuickPickOptions | Configures the behavior of the selection list. |
| token?: CancellationToken | A token that can be used to signal cancellation. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showSaveDialog(options?: SaveDialogOptions): Thenable<Uri | undefined>
| Parameter | Description |
|---|---|
| options?: SaveDialogOptions | Options that control the dialog. |
| Returns | Description |
| Thenable<Uri | undefined> | A promise that resolves to the selected resource or |
showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable<TextEditor>
| Parameter | Description |
|---|---|
| document: TextDocument | A text document to be shown. |
| column?: ViewColumn | A view column in which the editor should be shown. The default is the active. Columns that do not exist will be created as needed up to the maximum of ViewColumn.Nine. Use ViewColumn.Beside to open the editor to the side of the currently active one. |
| preserveFocus?: boolean | When |
| Returns | Description |
| Thenable<TextEditor> | A promise that resolves to an editor. |
showTextDocument(document: TextDocument, options?: TextDocumentShowOptions): Thenable<TextEditor>
| Parameter | Description |
|---|---|
| document: TextDocument | A text document to be shown. |
| options?: TextDocumentShowOptions | Editor options to configure the behavior of showing the editor. |
| Returns | Description |
| Thenable<TextEditor> | A promise that resolves to an editor. |
showTextDocument(uri: Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>
| Parameter | Description |
|---|---|
| uri: Uri | A resource identifier. |
| options?: TextDocumentShowOptions | Editor options to configure the behavior of showing the editor. |
| Returns | Description |
| Thenable<TextEditor> | A promise that resolves to an editor. |
showWarningMessage<T extends string>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showWarningMessage<T extends string>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showWarningMessage<T extends MessageItem>(message: string, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showWarningMessage<T extends MessageItem>(message: string, options: MessageOptions, ...items: T[]): Thenable<T | undefined>
| Parameter | Description |
|---|---|
| message: string | The message to show. |
| options: MessageOptions | Configures the behaviour of the message. |
| ...items: T[] | A set of items that will be rendered as actions in the message. |
| Returns | Description |
| Thenable<T | undefined> | A thenable that resolves to the selected item or |
showWorkspaceFolderPick(options?: WorkspaceFolderPickOptions): Thenable<WorkspaceFolder | undefined>
| Parameter | Description |
|---|---|
| options?: WorkspaceFolderPickOptions | Configures the behavior of the workspace folder list. |
| Returns | Description |
| Thenable<WorkspaceFolder | undefined> | A promise that resolves to the workspace folder or |
withProgress<R>(options: ProgressOptions, task: (progress: Progress<{increment: number, message: string}>, token: CancellationToken) => Thenable<R>): Thenable<R>
| Parameter | Description |
|---|---|
| options: ProgressOptions | A ProgressOptions-object describing the options to use for showing progress, like its location |
| task: (progress: Progress<{increment: number, message: string}>, token: CancellationToken) => Thenable<R> | A callback returning a promise. Progress state can be reported with the provided Progress-object. To report discrete progress, use To monitor if the operation has been cancelled by the user, use the provided CancellationToken.
Note that currently only |
| Returns | Description |
| Thenable<R> | The thenable the task-callback returned. |
withScmProgress<R>(task: (progress: Progress<number>) => Thenable<R>): Thenable<R>
| Parameter | Description |
|---|---|
| task: (progress: Progress<number>) => Thenable<R> | A callback returning a promise. Progress increments can be reported with the provided Progress-object. |
| Returns | Description |
| Thenable<R> | The thenable the task did return. |
workspace
Variables
fs: FileSystem
notebookDocuments: readonly NotebookDocument[]
textDocuments: readonly TextDocument[]
workspaceFile: Uri | undefined
workspaceFolders: readonly WorkspaceFolder[] | undefined
Events
onDidChangeConfiguration: Event<ConfigurationChangeEvent>
onDidChangeNotebookDocument: Event<NotebookDocumentChangeEvent>
onDidChangeTextDocument: Event<TextDocumentChangeEvent>
onDidChangeWorkspaceFolders: Event<WorkspaceFoldersChangeEvent>
onDidCloseNotebookDocument: Event<NotebookDocument>
onDidCloseTextDocument: Event<TextDocument>
onDidCreateFiles: Event<FileCreateEvent>
onDidDeleteFiles: Event<FileDeleteEvent>
onDidGrantWorkspaceTrust: Event<void>
onDidOpenNotebookDocument: Event<NotebookDocument>
onDidOpenTextDocument: Event<TextDocument>
onDidRenameFiles: Event<FileRenameEvent>
onDidSaveNotebookDocument: Event<NotebookDocument>
onDidSaveTextDocument: Event<TextDocument>
onWillCreateFiles: Event<FileWillCreateEvent>
onWillDeleteFiles: Event<FileWillDeleteEvent>
onWillRenameFiles: Event<FileWillRenameEvent>
onWillSaveNotebookDocument: Event<NotebookDocumentWillSaveEvent>
onWillSaveTextDocument: Event<TextDocumentWillSaveEvent>
Functions
applyEdit(edit: WorkspaceEdit, metadata?: WorkspaceEditMetadata): Thenable<boolean>
| Parameter | Description |
|---|---|
| edit: WorkspaceEdit | A workspace edit. |
| metadata?: WorkspaceEditMetadata | Optional metadata for the edit. |
| Returns | Description |
| Thenable<boolean> | A thenable that resolves when the edit could be applied. |
asRelativePath(pathOrUri: string | Uri, includeWorkspaceFolder?: boolean): string
| Parameter | Description |
|---|---|
| pathOrUri: string | Uri | A path or uri. When a uri is given its fsPath is used. |
| includeWorkspaceFolder?: boolean | When |
| Returns | Description |
| string | A path relative to the root or the input. |
createFileSystemWatcher(globPattern: GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher
| Parameter | Description |
|---|---|
| globPattern: GlobPattern | A glob pattern that controls which file events the watcher should report. |
| ignoreCreateEvents?: boolean | Ignore when files have been created. |
| ignoreChangeEvents?: boolean | Ignore when files have been changed. |
| ignoreDeleteEvents?: boolean | Ignore when files have been deleted. |
| Returns | Description |
| FileSystemWatcher | A new file system watcher instance. Must be disposed when no longer needed. |
decode(content: Uint8Array): Thenable<string>
| Parameter | Description |
|---|---|
| content: Uint8Array | The text content to decode as a |
| Returns | Description |
| Thenable<string> | A thenable that resolves to the decoded |
decode(content: Uint8Array, options: {encoding: string}): Thenable<string>
| Parameter | Description |
|---|---|
| content: Uint8Array | The text content to decode as a |
| options: {encoding: string} | Additional context for picking the encoding. |
| Returns | Description |
| Thenable<string> | A thenable that resolves to the decoded |
decode(content: Uint8Array, options: {uri: Uri}): Thenable<string>
| Parameter | Description |
|---|---|
| content: Uint8Array | The content to decode as a |
| options: {uri: Uri} | Additional context for picking the encoding. |
| Returns | Description |
| Thenable<string> | A thenable that resolves to the decoded |
encode(content: string): Thenable<Uint8Array>
| Parameter | Description |
|---|---|
| content: string | The content to decode as a |
| Returns | Description |
| Thenable<Uint8Array> | A thenable that resolves to the encoded |
encode(content: string, options: {encoding: string}): Thenable<Uint8Array>
| Parameter | Description |
|---|---|
| content: string | The content to decode as a |
| options: {encoding: string} | Additional context for picking the encoding. |
| Returns | Description |
| Thenable<Uint8Array> | A thenable that resolves to the encoded |
encode(content: string, options: {uri: Uri}): Thenable<Uint8Array>
| Parameter | Description |
|---|---|
| content: string | The content to decode as a |
| options: {uri: Uri} | Additional context for picking the encoding. |
| Returns | Description |
| Thenable<Uint8Array> | A thenable that resolves to the encoded |
findFiles(include: GlobPattern, exclude?: GlobPattern, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>
| Parameter | Description |
|---|---|
| include: GlobPattern | A glob pattern that defines the files to search for. The glob pattern will be matched against the file paths of resulting matches relative to their workspace. Use a relative pattern to restrict the search results to a workspace folder. |
| exclude?: GlobPattern | A glob pattern that defines files and folders to exclude. The glob pattern
will be matched against the file paths of resulting matches relative to their workspace. When |
| maxResults?: number | An upper-bound for the result. |
| token?: CancellationToken | A token that can be used to signal cancellation to the underlying search engine. |
| Returns | Description |
| Thenable<Uri[]> | A thenable that resolves to an array of resource identifiers. Will return no results if no workspace folders are opened. |
getConfiguration(section?: string, scope?: ConfigurationScope): WorkspaceConfiguration
| Parameter | Description |
|---|---|
| section?: string | A dot-separated identifier. |
| scope?: ConfigurationScope | A scope for which the configuration is asked for. |
| Returns | Description |
| WorkspaceConfiguration | The full configuration or a subset. |
getWorkspaceFolder(uri: Uri): WorkspaceFolder | undefined
| Parameter | Description |
|---|---|
| uri: Uri | An uri. |
| Returns | Description |
| WorkspaceFolder | undefined | A workspace folder or |
openNotebookDocument(uri: Uri): Thenable<NotebookDocument>
| Parameter | Description |
|---|---|
| uri: Uri | The resource to open. |
| Returns | Description |
| Thenable<NotebookDocument> | A promise that resolves to a notebook |
openNotebookDocument(notebookType: string, content?: NotebookData): Thenable<NotebookDocument>
| Parameter | Description |
|---|---|
| notebookType: string | The notebook type that should be used. |
| content?: NotebookData | The initial contents of the notebook. |
| Returns | Description |
| Thenable<NotebookDocument> | A promise that resolves to a notebook. |
openTextDocument(uri: Uri, options?: {encoding: string}): Thenable<TextDocument>
| Parameter | Description |
|---|---|
| uri: Uri | Identifies the resource to open. |
| options?: {encoding: string} | |
| Returns | Description |
| Thenable<TextDocument> | A promise that resolves to a document. |
openTextDocument(path: string, options?: {encoding: string}): Thenable<TextDocument>
| Parameter | Description |
|---|---|
| path: string | A path of a file on disk. |
| options?: {encoding: string} | |
| Returns | Description |
| Thenable<TextDocument> | A promise that resolves to a document. |
openTextDocument(options?: {content: string, encoding: string, language: string}): Thenable<TextDocument>
| Parameter | Description |
|---|---|
| options?: {content: string, encoding: string, language: string} | Options to control how the document will be created. |
| Returns | Description |
| Thenable<TextDocument> | A promise that resolves to a document. |
registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: {isCaseSensitive: boolean, isReadonly: boolean | MarkdownString}): Disposable
| Parameter | Description |
|---|---|
| scheme: string | The uri-scheme the provider registers for. |
| provider: FileSystemProvider | The filesystem provider. |
| options?: {isCaseSensitive: boolean, isReadonly: boolean | MarkdownString} | Immutable metadata about the provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerNotebookSerializer(notebookType: string, serializer: NotebookSerializer, options?: NotebookDocumentContentOptions): Disposable
| Parameter | Description |
|---|---|
| notebookType: string | A notebook. |
| serializer: NotebookSerializer | A notebook serializer. |
| options?: NotebookDocumentContentOptions | Optional context options that define what parts of a notebook should be persisted |
| Returns | Description |
| Disposable | A Disposable that unregisters this serializer when being disposed. |
registerTaskProvider(type: string, provider: TaskProvider<Task>): Disposable
| Parameter | Description |
|---|---|
| type: string | The task kind type this provider is registered for. |
| provider: TaskProvider<Task> | A task provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
registerTextDocumentContentProvider(scheme: string, provider: TextDocumentContentProvider): Disposable
| Parameter | Description |
|---|---|
| scheme: string | The uri-scheme to register for. |
| provider: TextDocumentContentProvider | A content provider. |
| Returns | Description |
| Disposable | A Disposable that unregisters this provider when being disposed. |
save(uri: Uri): Thenable<Uri | undefined>
| Parameter | Description |
|---|---|
| uri: Uri | the associated uri for the opened editor to save. |
| Returns | Description |
| Thenable<Uri | undefined> | A thenable that resolves when the save operation has finished. |
saveAll(includeUntitled?: boolean): Thenable<boolean>
| Parameter | Description |
|---|---|
| includeUntitled?: boolean | Also save files that have been created during this session. |
| Returns | Description |
| Thenable<boolean> | A thenable that resolves when the files have been saved. Will return |
saveAs(uri: Uri): Thenable<Uri | undefined>
| Parameter | Description |
|---|---|
| uri: Uri | the associated uri for the opened editor to save as. |
| Returns | Description |
| Thenable<Uri | undefined> | A thenable that resolves when the save-as operation has finished. |
updateWorkspaceFolders(start: number, deleteCount: number, ...workspaceFoldersToAdd: Array<{name: string, uri: Uri}>): boolean
| Parameter | Description |
|---|---|
| start: number | the zero-based location in the list of currently opened workspace folders from which to start deleting workspace folders. |
| deleteCount: number | the optional number of workspace folders to remove. |
| ...workspaceFoldersToAdd: Array<{name: string, uri: Uri}> | the optional variable set of workspace folders to add in place of the deleted ones. Each workspace is identified with a mandatory URI and an optional name. |
| Returns | Description |
| boolean | true if the operation was successfully started and false otherwise if arguments were used that would result in invalid workspace folder state (e.g. 2 folders with the same URI). |
AccessibilityInformation
Properties
AuthenticationForceNewSessionOptions
AuthenticationForceNewSessionOptions: AuthenticationGetSessionPresentationOptions
AuthenticationGetSessionOptions
Properties
account?: AuthenticationSessionAccountInformation
clearSessionPreference?: boolean
createIfNone?: boolean | AuthenticationGetSessionPresentationOptions
forceNewSession?: boolean | AuthenticationGetSessionPresentationOptions
AuthenticationGetSessionPresentationOptions
Properties
AuthenticationProvider
Events
onDidChangeSessions: Event<AuthenticationProviderAuthenticationSessionsChangeEvent>
Methods
createSession(scopes: readonly string[], options: AuthenticationProviderSessionOptions): Thenable<AuthenticationSession>
| Parameter | Description |
|---|---|
| scopes: readonly string[] | A list of scopes, permissions, that the new session should be created with. |
| options: AuthenticationProviderSessionOptions | Additional options for creating a session. |
| Returns | Description |
| Thenable<AuthenticationSession> | A promise that resolves to an authentication session. |
getSessions(scopes: readonly string[], options: AuthenticationProviderSessionOptions): Thenable<AuthenticationSession[]>
| Parameter | Description |
|---|---|
| scopes: readonly string[] | An optional list of scopes. If provided, the sessions returned should match these permissions, otherwise all sessions should be returned. |
| options: AuthenticationProviderSessionOptions | Additional options for getting sessions. |
| Returns | Description |
| Thenable<AuthenticationSession[]> | A promise that resolves to an array of authentication sessions. |
removeSession(sessionId: string): Thenable<void>
| Parameter | Description |
|---|---|
| sessionId: string | The id of the session to remove. |
| Returns | Description |
| Thenable<void> |
AuthenticationProviderAuthenticationSessionsChangeEvent
Properties
added: readonly AuthenticationSession[]
changed: readonly AuthenticationSession[]
removed: readonly AuthenticationSession[]
AuthenticationProviderInformation
Properties
AuthenticationProviderOptions
Properties
supportsMultipleAccounts?: boolean
AuthenticationProviderSessionOptions
Properties
account?: AuthenticationSessionAccountInformation
AuthenticationSession
Properties
account: AuthenticationSessionAccountInformation
AuthenticationSessionAccountInformation
Properties
AuthenticationSessionsChangeEvent
Properties
provider: AuthenticationProviderInformation
AuthenticationWwwAuthenticateRequest
Properties
fallbackScopes?: readonly string[]
AutoClosingPair
Properties
notIn?: SyntaxTokenType[]
BranchCoverage
Constructors
new BranchCoverage(executed: number | boolean, location?: Range | Position, label?: string): BranchCoverage
| Parameter | Description |
|---|---|
| executed: number | boolean | The number of times this branch was executed, or a boolean indicating whether it was executed if the exact count is unknown. If zero or false, the branch will be marked as un-covered. |
| location?: Range | Position | The branch position. |
| label?: string | |
| Returns | Description |
| BranchCoverage |
Properties
Breakpoint
Constructors
new Breakpoint(enabled?: boolean, condition?: string, hitCondition?: string, logMessage?: string): Breakpoint
| Parameter | Description |
|---|---|
| enabled?: boolean | Is breakpoint enabled. |
| condition?: string | Expression for conditional breakpoints |
| hitCondition?: string | Expression that controls how many hits of the breakpoint are ignored |
| logMessage?: string | Log message to display when breakpoint is hit |
| Returns | Description |
| Breakpoint |
Properties
BreakpointsChangeEvent
Properties
added: readonly Breakpoint[]
changed: readonly Breakpoint[]
removed: readonly Breakpoint[]
CallHierarchyIncomingCall
Constructors
new CallHierarchyIncomingCall(item: CallHierarchyItem, fromRanges: Range[]): CallHierarchyIncomingCall
| Parameter | Description |
|---|---|
| item: CallHierarchyItem | The item making the call. |
| fromRanges: Range[] | The ranges at which the calls appear. |
| Returns | Description |
| CallHierarchyIncomingCall |
Properties
from: CallHierarchyItem
fromRanges: Range[]
CallHierarchyItem
Constructors
new CallHierarchyItem(kind: SymbolKind, name: string, detail: string, uri: Uri, range: Range, selectionRange: Range): CallHierarchyItem
| Parameter | Description |
|---|---|
| kind: SymbolKind | |
| name: string | |
| detail: string | |
| uri: Uri | |
| range: Range | |
| selectionRange: Range | |
| Returns | Description |
| CallHierarchyItem |
Properties
kind: SymbolKind
range: Range
selectionRange: Range
tags?: readonly SymbolTag[]
uri: Uri
CallHierarchyOutgoingCall
Constructors
new CallHierarchyOutgoingCall(item: CallHierarchyItem, fromRanges: Range[]): CallHierarchyOutgoingCall
| Parameter | Description |
|---|---|
| item: CallHierarchyItem | The item being called |
| fromRanges: Range[] | The ranges at which the calls appear. |
| Returns | Description |
| CallHierarchyOutgoingCall |
Properties
fromRanges: Range[]
CallHierarchyProvider
Methods
prepareCallHierarchy(document: TextDocument, position: Position, token: CancellationToken): ProviderResult<CallHierarchyItem | CallHierarchyItem[]>
| Parameter | Description |
|---|---|
| document: TextDocument | The document in which the command was invoked. |
| position: Position | The position at which the command was invoked. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<CallHierarchyItem | CallHierarchyItem[]> | One or multiple call hierarchy items or a thenable that resolves to such. The lack of a result can be
signaled by returning |
provideCallHierarchyIncomingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyIncomingCall[]>
| Parameter | Description |
|---|---|
| item: CallHierarchyItem | The hierarchy item for which incoming calls should be computed. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<CallHierarchyIncomingCall[]> | A set of incoming calls or a thenable that resolves to such. The lack of a result can be
signaled by returning |
provideCallHierarchyOutgoingCalls(item: CallHierarchyItem, token: CancellationToken): ProviderResult<CallHierarchyOutgoingCall[]>
| Parameter | Description |
|---|---|
| item: CallHierarchyItem | The hierarchy item for which outgoing calls should be computed. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<CallHierarchyOutgoingCall[]> | A set of outgoing calls or a thenable that resolves to such. The lack of a result can be
signaled by returning |
CancellationError
Constructors
new CancellationError(): CancellationError
| Parameter | Description |
|---|---|
| Returns | Description |
| CancellationError |
CancellationToken
Properties
isCancellationRequested: boolean
onCancellationRequested: Event<any>
CancellationTokenSource
Constructors
new CancellationTokenSource(): CancellationTokenSource
| Parameter | Description |
|---|---|
| Returns | Description |
| CancellationTokenSource |
Properties
token: CancellationToken
Methods
| Parameter | Description |
|---|---|
| Returns | Description |
| void |
| Parameter | Description |
|---|---|
| Returns | Description |
| void |
CharacterPair
CharacterPair: [string, string]
ChatContext
Properties
history: ReadonlyArray<ChatRequestTurn | ChatResponseTurn>
ChatErrorDetails
Properties
ChatFollowup
Properties
ChatFollowupProvider
Methods
provideFollowups(result: ChatResult, context: ChatContext, token: CancellationToken): ProviderResult<ChatFollowup[]>
| Parameter | Description |
|---|---|
| result: ChatResult | This object has the same properties as the result returned from the participant callback, including |
| context: ChatContext | Extra context passed to a participant. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<ChatFollowup[]> |
ChatLanguageModelToolReference
Properties
range?: [start: number, end: number]
ChatParticipant
Events
onDidReceiveFeedback: Event<ChatResultFeedback>
Properties
followupProvider?: ChatFollowupProvider
iconPath?: IconPath
requestHandler: ChatRequestHandler
Methods
| Parameter | Description |
|---|---|
| Returns | Description |
| void |
ChatParticipantToolToken
ChatParticipantToolToken: never
ChatPromptReference
Properties
range?: [start: number, end: number]
ChatRequest
Properties
model: LanguageModelChat
references: readonly ChatPromptReference[]
toolReferences: readonly ChatLanguageModelToolReference[]
ChatRequestHandler
ChatRequestHandler: (request: ChatRequest, context: ChatContext, response: ChatResponseStream, token: CancellationToken) => ProviderResult<ChatResult | void>
ChatRequestTurn
Properties
references: ChatPromptReference[]
toolReferences: readonly ChatLanguageModelToolReference[]
ChatResponseAnchorPart
Constructors
new ChatResponseAnchorPart(value: Uri | Location, title?: string): ChatResponseAnchorPart
| Parameter | Description |
|---|---|
| value: Uri | Location | A uri or location. |
| title?: string | An optional title that is rendered with value. |
| Returns | Description |
| ChatResponseAnchorPart |
Properties
ChatResponseCommandButtonPart
Constructors
new ChatResponseCommandButtonPart(value: Command): ChatResponseCommandButtonPart
| Parameter | Description |
|---|---|
| value: Command | A Command that will be executed when the button is clicked. |
| Returns | Description |
| ChatResponseCommandButtonPart |
Properties
value: Command
ChatResponseFileTree
Properties
children?: ChatResponseFileTree[]
ChatResponseFileTreePart
Constructors
new ChatResponseFileTreePart(value: ChatResponseFileTree[], baseUri: Uri): ChatResponseFileTreePart
| Parameter | Description |
|---|---|
| value: ChatResponseFileTree[] | File tree data. |
| baseUri: Uri | The base uri to which this file tree is relative. |
| Returns | Description |
| ChatResponseFileTreePart |
Properties
baseUri: Uri
value: ChatResponseFileTree[]
ChatResponseMarkdownPart
Constructors
new ChatResponseMarkdownPart(value: string | MarkdownString): ChatResponseMarkdownPart
| Parameter | Description |
|---|---|
| value: string | MarkdownString | A markdown string or a string that should be interpreted as markdown. The boolean form of MarkdownString.isTrusted is NOT supported. |
| Returns | Description |
| ChatResponseMarkdownPart |
Properties
value: MarkdownString
ChatResponsePart
ChatResponsePart: ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseProgressPart | ChatResponseReferencePart | ChatResponseCommandButtonPart
ChatResponseProgressPart
Constructors
new ChatResponseProgressPart(value: string): ChatResponseProgressPart
| Parameter | Description |
|---|---|
| value: string | A progress message |
| Returns | Description |
| ChatResponseProgressPart |
Properties
ChatResponseReferencePart
Constructors
new ChatResponseReferencePart(value: Uri | Location, iconPath?: IconPath): ChatResponseReferencePart
| Parameter | Description |
|---|---|
| value: Uri | Location | A uri or location |
| iconPath?: IconPath | Icon for the reference shown in UI |
| Returns | Description |
| ChatResponseReferencePart |
Properties
iconPath?: IconPath
ChatResponseStream
Methods
anchor(value: Uri | Location, title?: string): void
| Parameter | Description |
|---|---|
| value: Uri | Location | A uri or location. |
| title?: string | An optional title that is rendered with value. |
| Returns | Description |
| void |
button(command: Command): void
| Parameter | Description |
|---|---|
| command: Command | A Command that will be executed when the button is clicked. |
| Returns | Description |
| void |
filetree(value: ChatResponseFileTree[], baseUri: Uri): void
| Parameter | Description |
|---|---|
| value: ChatResponseFileTree[] | File tree data. |
| baseUri: Uri | The base uri to which this file tree is relative. |
| Returns | Description |
| void |
markdown(value: string | MarkdownString): void
| Parameter | Description |
|---|---|
| value: string | MarkdownString | A markdown string or a string that should be interpreted as markdown. The boolean form of MarkdownString.isTrusted is NOT supported. |
| Returns | Description |
| void |
| Parameter | Description |
|---|---|
| value: string | A progress message |
| Returns | Description |
| void |
push(part: ChatResponsePart): void
| Parameter | Description |
|---|---|
| part: ChatResponsePart | A response part, rendered or metadata |
| Returns | Description |
| void |
reference(value: Uri | Location, iconPath?: IconPath): void
| Parameter | Description |
|---|---|
| value: Uri | Location | A uri or location |
| iconPath?: IconPath | Icon for the reference shown in UI |
| Returns | Description |
| void |
ChatResponseTurn
Properties
response: ReadonlyArray<ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>
result: ChatResult
ChatResult
Properties
errorDetails?: ChatErrorDetails
ChatResultFeedback
Properties
kind: ChatResultFeedbackKind
result: ChatResult
ChatResultFeedbackKind
Enumeration Members
Clipboard
Methods
| Parameter | Description |
|---|---|
| Returns | Description |
| Thenable<string> | A thenable that resolves to a string. |
writeText(value: string): Thenable<void>
| Parameter | Description |
|---|---|
| value: string | |
| Returns | Description |
| Thenable<void> | A thenable that resolves when writing happened. |
CodeAction
Constructors
new CodeAction(title: string, kind?: CodeActionKind): CodeAction
| Parameter | Description |
|---|---|
| title: string | The title of the code action. |
| kind?: CodeActionKind | The kind of the code action. |
| Returns | Description |
| CodeAction |
Properties
command?: Command
diagnostics?: Diagnostic[]
| Parameter | Description |
|---|---|
| reason: string | Human readable description of why the code action is currently disabled. This is displayed in the code actions UI. |
edit?: WorkspaceEdit
kind?: CodeActionKind
CodeActionContext
Properties
diagnostics: readonly Diagnostic[]
only: CodeActionKind
triggerKind: CodeActionTriggerKind
CodeActionKind
Static
Empty: CodeActionKind
Notebook: CodeActionKind
QuickFix: CodeActionKind
Refactor: CodeActionKind
RefactorExtract: CodeActionKind
RefactorInline: CodeActionKind
RefactorMove: CodeActionKind
RefactorRewrite: CodeActionKind
Source: CodeActionKind
SourceFixAll: CodeActionKind
SourceOrganizeImports: CodeActionKind
Constructors
new CodeActionKind(value: string): CodeActionKind
| Parameter | Description |
|---|---|
| value: string | The value of the kind, such as |
| Returns | Description |
| CodeActionKind |
Properties
Methods
append(parts: string): CodeActionKind
| Parameter | Description |
|---|---|
| parts: string | |
| Returns | Description |
| CodeActionKind |
contains(other: CodeActionKind): boolean
| Parameter | Description |
|---|---|
| other: CodeActionKind | Kind to check. |
| Returns | Description |
| boolean |
intersects(other: CodeActionKind): boolean
| Parameter | Description |
|---|---|
| other: CodeActionKind | Kind to check. |
| Returns | Description |
| boolean |
CodeActionProvider<T>
Methods
provideCodeActions(document: TextDocument, range: Range | Selection, context: CodeActionContext, token: CancellationToken): ProviderResult<Array<Command | T>>
| Parameter | Description |
|---|---|
| document: TextDocument | The document in which the command was invoked. |
| range: Range | Selection | The selector or range for which the command was invoked. This will always be a selection if the actions are being requested in the currently active editor. |
| context: CodeActionContext | Provides additional information about what code actions are being requested. You can use this to see what specific type of code actions are being requested by the editor in order to return more relevant actions and avoid returning irrelevant code actions that the editor will discard. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<Array<Command | T>> | An array of code actions, such as quick fixes or refactorings. The lack of a result can be signaled
by returning We also support returning |
resolveCodeAction(codeAction: T, token: CancellationToken): ProviderResult<T>
| Parameter | Description |
|---|---|
| codeAction: T | A code action. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<T> | The resolved code action or a thenable that resolves to such. It is OK to return the given
|
CodeActionProviderMetadata
Properties
documentation?: ReadonlyArray<{command: Command, kind: CodeActionKind}>
providedCodeActionKinds?: readonly CodeActionKind[]
CodeActionTriggerKind
Enumeration Members
CodeLens
Constructors
new CodeLens(range: Range, command?: Command): CodeLens
| Parameter | Description |
|---|---|
| range: Range | The range to which this code lens applies. |
| command?: Command | The command associated to this code lens. |
| Returns | Description |
| CodeLens |
Properties
command?: Command
range: Range
CodeLensProvider<T>
Events
onDidChangeCodeLenses?: Event<void>
Methods
provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult<T[]>
| Parameter | Description |
|---|---|
| document: TextDocument | The document in which the command was invoked. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<T[]> | An array of code lenses or a thenable that resolves to such. The lack of a result can be
signaled by returning |
resolveCodeLens(codeLens: T, token: CancellationToken): ProviderResult<T>
| Parameter | Description |
|---|---|
| codeLens: T | Code lens that must be resolved. |
| token: CancellationToken | A cancellation token. |
| Returns | Description |
| ProviderResult<T> | The given, resolved code lens or thenable that resolves to such. |
Color
Constructors
new Color(red: number, green: number, blue: number, alpha: number): Color
| Parameter | Description |
|---|---|
| red: number | The red component. |
| green: number | The green component. |
| blue: number | The blue component. |
| alpha: number | The alpha component. |
| Returns | Description |
| Color |
Properties
ColorInformation
Constructors
new ColorInformation(range: Range, color: Color): ColorInformation
| Parameter | Description |
|---|---|
| range: Range | The range the color appears in. Must not be empty. |
| color: Color | The value of the color. |
| Returns | Description |
| ColorInformation |
Properties
color: Color
range: Range
ColorPresentation
Constructors
new ColorPresentation(label: string): ColorPresentation
| Parameter | Description |
|---|---|
| label: string | The label of this color presentation. |
| Returns | Description |
| ColorPresentation |
Properties
additionalTextEdits?: TextEdit[]
textEdit?: TextEdit
ColorTheme
Properties
kind: ColorThemeKind
ColorThemeKind
Enumeration Members
Command
Properties
Properties
author: CommentAuthorInformation
body: string | MarkdownString
mode: CommentMode
reactions?: CommentReaction[]
Properties
iconPath?: Uri
Properties
commentingRangeProvider?: CommentingRangeProvider
options?: CommentOptions
reactionHandler?: (comment: Comment, reaction: CommentReaction) => Thenable<void>
| Parameter | Description |
|---|---|
| comment: Comment | |
| reaction: CommentReaction | |
| Returns | Description |
| Thenable<void> |
Methods
createCommentThread(uri: Uri, range: Range, comments: readonly Comment[]): CommentThread
| Parameter | Description |
|---|---|
| uri: Uri | The uri of the document the thread has been created on. |
| range: Range | The range the comment thread is located within the document. |
| comments: readonly Comment[] | The ordered comments of the thread. |
| Returns | Description |
| CommentThread |
| Parameter | Description |
|---|---|
| Returns | Description |
| void |
Methods
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[] | CommentingRanges>
| Parameter | Description |
|---|---|
| document: TextDocument | |
| token: CancellationToken | |
| Returns | Description |
| ProviderResult<Range[] | CommentingRanges> |
Properties
ranges?: Range[]
Enumeration Members
Properties
Properties
iconPath: string | Uri
Properties
thread: CommentThread
Properties
blockComment?: CharacterPair
lineComment?: string | LineCommentRule
Properties
canReply: boolean | CommentAuthorInformation
collapsibleState: CommentThreadCollapsibleState
comments: readonly Comment[]
range: Range
state?: CommentThreadState
uri: Uri
Methods
| Parameter | Description |
|---|---|
| Returns | Description |
| void |
Enumeration Members
Enumeration Members
CompletionContext
Properties
triggerKind: CompletionTriggerKind
CompletionItem
Constructors
new CompletionItem(label: string | CompletionItemLabel, kind?: CompletionItemKind): CompletionItem
| Parameter | Description |
|---|---|
| label: string | CompletionItemLabel | The label of the completion. |
| kind?: CompletionItemKind | The kind of the completion. |
| Returns | Description |
| CompletionItem |
Properties
additionalTextEdits?: TextEdit[]
command?: Command
documentation?: string | MarkdownString
insertText?: string | SnippetString
kind?: CompletionItemKind
label: string | CompletionItemLabel
range?: Range | {inserting: Range, replacing: Range}
tags?: readonly CompletionItemTag[]
textEdit?: TextEdit