mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
render pending comment
This commit is contained in:
@@ -1037,6 +1037,9 @@ export interface ExtHostCommentsShape {
|
||||
$replyToCommentThread(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Thenable<modes.CommentThread>;
|
||||
$editComment(handle: number, document: UriComponents, comment: modes.Comment, text: string): Thenable<void>;
|
||||
$deleteComment(handle: number, document: UriComponents, comment: modes.Comment): Thenable<void>;
|
||||
$startDraft(handle: number): Thenable<void>;
|
||||
$deleteDraft(handle: number): Thenable<void>;
|
||||
$finishDraft(handle: number): Thenable<void>;
|
||||
$getStartDraftLabel(handle: number): Thenable<string>;
|
||||
$provideWorkspaceComments(handle: number): Thenable<modes.CommentThread[]>;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,27 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
});
|
||||
}
|
||||
|
||||
$startDraft(handle: number): Thenable<void> {
|
||||
const provider = this._documentProviders.get(handle);
|
||||
return asThenable(() => {
|
||||
return provider.startDraft(CancellationToken.None);
|
||||
});
|
||||
}
|
||||
|
||||
$deleteDraft(handle: number): Thenable<void> {
|
||||
const provider = this._documentProviders.get(handle);
|
||||
return asThenable(() => {
|
||||
return provider.deleteDraft(CancellationToken.None);
|
||||
});
|
||||
}
|
||||
|
||||
$finishDraft(handle: number): Thenable<void> {
|
||||
const provider = this._documentProviders.get(handle);
|
||||
return asThenable(() => {
|
||||
return provider.finishDraft(CancellationToken.None);
|
||||
});
|
||||
}
|
||||
|
||||
$getStartDraftLabel(handle: number): Thenable<string> {
|
||||
const provider = this._documentProviders.get(handle);
|
||||
return asThenable(() => {
|
||||
@@ -209,7 +230,8 @@ function convertFromComment(comment: modes.Comment): vscode.Comment {
|
||||
userName: comment.userName,
|
||||
userIconPath: userIconPath,
|
||||
canEdit: comment.canEdit,
|
||||
canDelete: comment.canDelete
|
||||
canDelete: comment.canDelete,
|
||||
isDraft: comment.isDraft
|
||||
};
|
||||
}
|
||||
|
||||
@@ -224,6 +246,7 @@ function convertToComment(provider: vscode.DocumentCommentProvider | vscode.Work
|
||||
userIconPath: iconPath,
|
||||
canEdit: canEdit,
|
||||
canDelete: canDelete,
|
||||
command: vscodeComment.command ? commandsConverter.toInternal(vscodeComment.command) : null
|
||||
command: vscodeComment.command ? commandsConverter.toInternal(vscodeComment.command) : null,
|
||||
isDraft: vscodeComment.isDraft
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user