mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
edit/delete command
This commit is contained in:
@@ -1097,7 +1097,7 @@ export interface ExtHostProgressShape {
|
||||
export interface ExtHostCommentsShape {
|
||||
$provideDocumentComments(handle: number, document: UriComponents): Promise<modes.CommentInfo>;
|
||||
$createNewCommentThread(handle: number, document: UriComponents, range: IRange, text: string): Promise<modes.CommentThread>;
|
||||
$onActiveCommentWidgetChange(commentControlhandle: number, commentThread: modes.CommentThread, comment: modes.Comment | undefined, input: string): Promise<void>;
|
||||
$onActiveCommentWidgetChange(commentControlhandle: number, commentThread: modes.CommentThread2, comment: modes.Comment | undefined, input: string): Promise<number | undefined>;
|
||||
$onCommentWidgetInputChange(commentControlhandle: number, value: string): Promise<void>;
|
||||
$replyToCommentThread(handle: number, document: UriComponents, range: IRange, commentThread: modes.CommentThread, text: string): Promise<modes.CommentThread>;
|
||||
$editComment(handle: number, document: UriComponents, comment: modes.Comment, text: string): Promise<void>;
|
||||
|
||||
@@ -51,7 +51,7 @@ export class ExtHostComments implements ExtHostCommentsShape {
|
||||
|
||||
if (!commentControl) {
|
||||
return arg;
|
||||
}
|
||||
}
|
||||
|
||||
return commentControl;
|
||||
} else if (arg && arg.$mid === 7) {
|
||||
@@ -347,7 +347,7 @@ export class ExtHostCommentThread implements vscode.CommentThread {
|
||||
this._commentControlHandle,
|
||||
this.handle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export class ExtHostCommentWidget implements vscode.CommentWidget {
|
||||
@@ -498,7 +498,7 @@ function convertFromComment(comment: modes.Comment): vscode.Comment {
|
||||
};
|
||||
}
|
||||
|
||||
function convertToModeComment(vscodeComment: vscode.Comment): modes.Comment {
|
||||
function convertToModeComment(vscodeComment: vscode.Comment, commandsConverter: CommandsConverter): modes.Comment {
|
||||
const iconPath = vscodeComment.userIconPath ? vscodeComment.userIconPath.toString() : vscodeComment.gravatar;
|
||||
|
||||
return {
|
||||
@@ -506,7 +506,9 @@ function convertToModeComment(vscodeComment: vscode.Comment): modes.Comment {
|
||||
body: extHostTypeConverter.MarkdownString.from(vscodeComment.body),
|
||||
userName: vscodeComment.userName,
|
||||
userIconPath: iconPath,
|
||||
isDraft: vscodeComment.isDraft
|
||||
isDraft: vscodeComment.isDraft,
|
||||
editCommand: vscodeComment.editCommand ? commandsConverter.toInternal(vscodeComment.editCommand) : undefined,
|
||||
deleteCommand: vscodeComment.editCommand ? commandsConverter.toInternal(vscodeComment.deleteCommand) : undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user