Comment detail should be timestamp

Part of #139524
This commit is contained in:
Alex Ross
2022-01-21 13:20:39 +01:00
parent 12c80bb2ee
commit 8b27820fb2
6 changed files with 29 additions and 37 deletions

View File

@@ -618,18 +618,16 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
const iconPath = vscodeComment.author && vscodeComment.author.iconPath ? vscodeComment.author.iconPath.toString() : undefined;
if (vscodeComment.detail) {
if (vscodeComment.timestamp) {
checkProposedApiEnabled(thread.extensionDescription, 'commentTimestamp');
}
let detail: { $mid: MarshalledId.Date, source: any } | string | undefined;
if (vscodeComment.detail && (typeof vscodeComment.detail !== 'string')) {
detail = {
source: vscodeComment.detail,
let timestamp: { $mid: MarshalledId.Date, source: any } | undefined;
if (vscodeComment.timestamp) {
timestamp = {
source: vscodeComment.timestamp,
$mid: MarshalledId.Date
};
} else {
detail = vscodeComment.detail;
}
return {
@@ -641,7 +639,7 @@ export function createExtHostComments(mainContext: IMainContext, commands: ExtHo
userIconPath: iconPath,
label: vscodeComment.label,
commentReactions: vscodeComment.reactions ? vscodeComment.reactions.map(reaction => convertToReaction(reaction)) : undefined,
detail: detail
timestamp
};
}