mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Add comment reactors to comment reactions (#201132)
Add comment reactors proposal Part of #201131
This commit is contained in:
@@ -673,6 +673,10 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
|
||||
checkProposedApiEnabled(extension, 'commentsDraftState');
|
||||
}
|
||||
|
||||
if (vscodeComment.reactions?.some(reaction => reaction.reactors !== undefined)) {
|
||||
checkProposedApiEnabled(extension, 'commentReactor');
|
||||
}
|
||||
|
||||
return {
|
||||
mode: vscodeComment.mode,
|
||||
contextValue: vscodeComment.contextValue,
|
||||
@@ -693,6 +697,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
|
||||
iconPath: reaction.iconPath ? extHostTypeConverter.pathOrURIToURI(reaction.iconPath) : undefined,
|
||||
count: reaction.count,
|
||||
hasReacted: reaction.authorHasReacted,
|
||||
reactors: reaction.reactors
|
||||
};
|
||||
}
|
||||
|
||||
@@ -701,7 +706,8 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
|
||||
label: reaction.label || '',
|
||||
count: reaction.count || 0,
|
||||
iconPath: reaction.iconPath ? URI.revive(reaction.iconPath) : '',
|
||||
authorHasReacted: reaction.hasReacted || false
|
||||
authorHasReacted: reaction.hasReacted || false,
|
||||
reactors: reaction.reactors
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user