From ec746197907d97d4eae4efbc63aaca3755707400 Mon Sep 17 00:00:00 2001 From: Remi Schnekenburger Date: Tue, 6 Dec 2022 10:08:39 +0100 Subject: [PATCH] Add timestamp on comment creation --- comment-sample/package.json | 1 - comment-sample/src/extension.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/comment-sample/package.json b/comment-sample/package.json index 26b2e1acb..3df41e819 100644 --- a/comment-sample/package.json +++ b/comment-sample/package.json @@ -3,7 +3,6 @@ "displayName": "Comment API Sample", "description": "Comment API Sample", "version": "0.0.1", - "publisher": "vscode-samples", "private": true, "license": "MIT", "repository": { diff --git a/comment-sample/src/extension.ts b/comment-sample/src/extension.ts index 385b7f999..93540afa0 100644 --- a/comment-sample/src/extension.ts +++ b/comment-sample/src/extension.ts @@ -13,10 +13,12 @@ class NoteComment implements vscode.Comment { public mode: vscode.CommentMode, public author: vscode.CommentAuthorInformation, public parent?: vscode.CommentThread, - public contextValue?: string + public contextValue?: string, + public timeStamp?: Date ) { this.id = ++commentId; this.savedBody = this.body; + this.timeStamp = new Date(); } }