Add comment reactors to comment reactions (#201132)

Add comment reactors proposal
Part of #201131
This commit is contained in:
Alex Ross
2023-12-18 16:57:34 +01:00
committed by GitHub
parent 60017c39ff
commit 646bb51ab2
6 changed files with 57 additions and 17 deletions

View File

@@ -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
};
}