@codingame/monaco-vscode-comments-service-override 3.2.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-comments-service-override",
3
- "version": "3.2.3",
3
+ "version": "4.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,6 +18,6 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@3.2.3"
21
+ "vscode": "npm:@codingame/monaco-vscode-api@4.0.0"
22
22
  }
23
23
  }
@@ -10,10 +10,13 @@ import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/co
10
10
  import { NumberBadge, IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity';
11
11
  import { COMMENTS_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer';
12
12
  import { CommentThreadState } from 'vscode/vscode/vs/editor/common/languages';
13
- import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
13
+ import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
14
14
  import { CONTEXT_KEY_HAS_COMMENTS, CONTEXT_KEY_SOME_COMMENTS_EXPANDED } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsView';
15
15
  import { ViewAction } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
16
16
  import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
17
+ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
18
+ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
19
+ import { revealCommentThread } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsController';
17
20
 
18
21
  registerAction2(class Collapse extends ViewAction {
19
22
  constructor() {
@@ -63,6 +66,30 @@ registerAction2(class Expand extends ViewAction {
63
66
  view.expandAll();
64
67
  }
65
68
  });
69
+ registerAction2(class Reply extends Action2 {
70
+ constructor() {
71
+ super({
72
+ id: 'comments.reply',
73
+ title: ( localizeWithPath(
74
+ 'vs/workbench/contrib/comments/browser/comments.contribution',
75
+ 'reply',
76
+ "Reply"
77
+ )),
78
+ icon: Codicon.reply,
79
+ menu: {
80
+ id: MenuId.CommentsViewThreadActions,
81
+ order: 100,
82
+ when: ( ContextKeyExpr.equals('canReply', true))
83
+ },
84
+ });
85
+ }
86
+ run(accessor, marshalledCommentThread) {
87
+ const commentService = accessor.get(ICommentService);
88
+ const editorService = accessor.get(IEditorService);
89
+ const uriIdentityService = accessor.get(IUriIdentityService);
90
+ revealCommentThread(commentService, editorService, uriIdentityService, marshalledCommentThread.thread, marshalledCommentThread.thread.comments[marshalledCommentThread.thread.comments.length - 1], true);
91
+ }
92
+ });
66
93
  ( Registry.as(Extensions.Configuration)).registerConfiguration({
67
94
  id: 'comments',
68
95
  order: 20,