You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no official way through the VS Code API to provide an ID for a comment thread, but it seems like an ID would be the best solution to the following problem:
Let's say I create a comment thread, then add a command to the menu comments/commentThread/context. When this command is executed, my command handler will get a CommentReply as an argument. Now, I would like to do something based on this CommentThread in this CommentReply, but I have no way to correlate that CommentThread back to something that my extension knows how to handle. I could make some hash based on the properties and keep a map of CommentThread to MyCommentThread, but it would make more sense to have a commentThreadId instead.
You could say that I should look at the first Comment in the comments array and use that ID, but it is possible to have a CommentThread without any comments so I don't think that's a good solution.
I'd be happy to be told there's something I'm missing here and that there's a good way to do what I'm looking for instead :)
The text was updated successfully, but these errors were encountered:
@alexr00 I think it makes sense to introduce id for the CommentThread. The CommentThread is an object managed by VS Code so we can generate a GUID as id. Feel free to bring this up in API sync and PR is welcome :)
Currently, there is no official way through the VS Code API to provide an ID for a comment thread, but it seems like an ID would be the best solution to the following problem:
Let's say I create a comment thread, then add a command to the menu
comments/commentThread/context
. When this command is executed, my command handler will get aCommentReply
as an argument. Now, I would like to do something based on thisCommentThread
in thisCommentReply
, but I have no way to correlate thatCommentThread
back to something that my extension knows how to handle. I could make some hash based on the properties and keep a map ofCommentThread
toMyCommentThread
, but it would make more sense to have acommentThreadId
instead.You could say that I should look at the first
Comment
in thecomments
array and use that ID, but it is possible to have aCommentThread
without anycomments
so I don't think that's a good solution.I'd be happy to be told there's something I'm missing here and that there's a good way to do what I'm looking for instead :)
The text was updated successfully, but these errors were encountered: