mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Update readme and proposed api
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
# Commenting API Example
|
||||
|
||||
This sample shows
|
||||
|
||||
- How to create a comment controller.
|
||||
- How to support comment thread creation for documents.
|
||||
- How to update comment actions dynamically.
|
||||
|
||||

|
||||
61
comment-sample/src/typings/vscode.proposed.d.ts
vendored
61
comment-sample/src/typings/vscode.proposed.d.ts
vendored
@ -123,37 +123,6 @@ declare module 'vscode' {
|
||||
*/
|
||||
userIconPath?: Uri;
|
||||
|
||||
/**
|
||||
* @deprecated Use userIconPath instead. The avatar src of the user who created the comment
|
||||
*/
|
||||
gravatar?: string;
|
||||
|
||||
/**
|
||||
* Whether the current user has permission to edit the comment.
|
||||
*
|
||||
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
|
||||
* if it is provided by a `DocumentCommentProvider` and no `editComment` method is given.
|
||||
*
|
||||
* DEPRECATED, use editCommand
|
||||
*/
|
||||
canEdit?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the current user has permission to delete the comment.
|
||||
*
|
||||
* This will be treated as false if the comment is provided by a `WorkspaceCommentProvider`, or
|
||||
* if it is provided by a `DocumentCommentProvider` and no `deleteComment` method is given.
|
||||
*
|
||||
* DEPRECATED, use deleteCommand
|
||||
*/
|
||||
canDelete?: boolean;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* The command to be executed if the comment is selected in the Comments Panel
|
||||
*/
|
||||
command?: Command;
|
||||
|
||||
/**
|
||||
* The command to be executed if the comment is selected in the Comments Panel
|
||||
*/
|
||||
@ -168,26 +137,6 @@ declare module 'vscode' {
|
||||
* The command to be executed when users try to delete the comment
|
||||
*/
|
||||
deleteCommand?: Command;
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*/
|
||||
isDraft?: boolean;
|
||||
|
||||
/**
|
||||
* Proposed Comment Reaction
|
||||
*/
|
||||
commentReactions?: CommentReaction[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Comment Reactions
|
||||
*/
|
||||
interface CommentReaction {
|
||||
readonly label?: string;
|
||||
readonly iconPath?: string | Uri;
|
||||
count?: number;
|
||||
readonly hasReacted?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@ -201,11 +150,6 @@ declare module 'vscode' {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface CommentReactionProvider {
|
||||
availableReactions: CommentReaction[];
|
||||
toggleReaction?(document: TextDocument, comment: Comment, reaction: CommentReaction): Promise<void>;
|
||||
}
|
||||
|
||||
export interface CommentingRangeProvider {
|
||||
/**
|
||||
* Provide a list of ranges which allow new comment threads creation or null for a given document
|
||||
@ -253,11 +197,6 @@ declare module 'vscode' {
|
||||
*/
|
||||
emptyCommentThreadFactory?: EmptyCommentThreadFactory;
|
||||
|
||||
/**
|
||||
* Optional reaction provider
|
||||
*/
|
||||
reactionProvider?: CommentReactionProvider;
|
||||
|
||||
/**
|
||||
* Dispose this comment controller.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user