Add API proposal to reveal a comment thread (#214251)

Fixes #167253
This commit is contained in:
Alex Ross
2024-06-04 10:00:49 -07:00
committed by GitHub
parent aef8e26d88
commit 04a79b6ea6
9 changed files with 81 additions and 4 deletions

View File

@@ -465,6 +465,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
set label(value: string | undefined) { that.label = value; },
get state(): vscode.CommentThreadState | { resolved?: vscode.CommentThreadState; applicability?: vscode.CommentThreadApplicability } | undefined { return that.state; },
set state(value: vscode.CommentThreadState | { resolved?: vscode.CommentThreadState; applicability?: vscode.CommentThreadApplicability }) { that.state = value; },
reveal: (options?: vscode.CommentThreadRevealOptions) => that.reveal(options),
dispose: () => {
that.dispose();
}
@@ -548,6 +549,11 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
return;
}
async reveal(options?: vscode.CommentThreadRevealOptions): Promise<void> {
checkProposedApiEnabled(this.extensionDescription, 'commentReveal');
return proxy.$revealCommentThread(this._commentControllerHandle, this.handle, { preserveFocus: false, focusReply: false, ...options });
}
dispose() {
this._isDiposed = true;
this._acceptInputDisposables.dispose();