提交 f6545699 编写于 作者: D Daniel Imms

Document link handler API

上级 71b34ebc
...@@ -1114,13 +1114,19 @@ declare module 'vscode' { ...@@ -1114,13 +1114,19 @@ declare module 'vscode' {
//#region Terminal link handlers https://github.com/microsoft/vscode/issues/91606 //#region Terminal link handlers https://github.com/microsoft/vscode/issues/91606
export namespace window { export namespace window {
/**
* Register a [TerminalLinkHandler](#TerminalLinkHandler) that can be used to intercept and
* handle links that are activated within terminals.
*/
export function registerTerminalLinkHandler(handler: TerminalLinkHandler): Disposable; export function registerTerminalLinkHandler(handler: TerminalLinkHandler): Disposable;
} }
export interface TerminalLinkHandler { export interface TerminalLinkHandler {
/** /**
* @return true when the link was handled (and should not be considered by * Handles a link that is activated within the terminal.
* other providers including the default), false when the link was not handled. *
* @return Whether the link was handled, the link was handled this link will not be
* considered by any other extension or by the default built-in link handler.
*/ */
handleLink(terminal: Terminal, link: string): ProviderResult<boolean>; handleLink(terminal: Terminal, link: string): ProviderResult<boolean>;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册