@codingame/monaco-vscode-comments-service-override 4.5.0 → 4.5.2

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/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default } from './comments.js';
1
+ export { default } from 'vscode/service-override/comments';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-comments-service-override",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
30
30
  }
31
31
  }
@@ -253,7 +253,7 @@ let CommentService = class CommentService extends Disposable {
253
253
  return commentController.toggleReaction(resource, thread, comment, reaction, CancellationToken.None);
254
254
  }
255
255
  else {
256
- throw new Error('Not supported');
256
+ throw ( new Error('Not supported'));
257
257
  }
258
258
  }
259
259
  hasReactionHandler(uniqueOwner) {
@@ -20,22 +20,22 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
20
20
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
21
21
  import { revealCommentThread } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsController';
22
22
 
23
+ const _moduleId = "vs/workbench/contrib/comments/browser/comments.contribution";
23
24
  registerAction2(class Collapse extends ViewAction {
24
25
  constructor() {
25
26
  super({
26
27
  viewId: COMMENTS_VIEW_ID,
27
28
  id: 'comments.collapse',
28
- title: ( localizeWithPath(
29
- 'vs/workbench/contrib/comments/browser/comments.contribution',
30
- 'collapseAll',
31
- "Collapse All"
32
- )),
29
+ title: ( localizeWithPath(_moduleId, 0, "Collapse All")),
33
30
  f1: false,
34
31
  icon: Codicon.collapseAll,
35
32
  menu: {
36
33
  id: MenuId.ViewTitle,
37
34
  group: 'navigation',
38
- when: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)), CONTEXT_KEY_HAS_COMMENTS)), CONTEXT_KEY_SOME_COMMENTS_EXPANDED)),
35
+ when: ( (ContextKeyExpr.and( (ContextKeyExpr.and(
36
+ (ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)),
37
+ CONTEXT_KEY_HAS_COMMENTS
38
+ )), CONTEXT_KEY_SOME_COMMENTS_EXPANDED))),
39
39
  order: 100
40
40
  }
41
41
  });
@@ -49,17 +49,16 @@ registerAction2(class Expand extends ViewAction {
49
49
  super({
50
50
  viewId: COMMENTS_VIEW_ID,
51
51
  id: 'comments.expand',
52
- title: ( localizeWithPath(
53
- 'vs/workbench/contrib/comments/browser/comments.contribution',
54
- 'expandAll',
55
- "Expand All"
56
- )),
52
+ title: ( localizeWithPath(_moduleId, 1, "Expand All")),
57
53
  f1: false,
58
54
  icon: Codicon.expandAll,
59
55
  menu: {
60
56
  id: MenuId.ViewTitle,
61
57
  group: 'navigation',
62
- when: ( ContextKeyExpr.and(( ContextKeyExpr.and(( ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)), CONTEXT_KEY_HAS_COMMENTS)), ContextKeyExpr.not(CONTEXT_KEY_SOME_COMMENTS_EXPANDED.key))),
58
+ when: ( (ContextKeyExpr.and( (ContextKeyExpr.and(
59
+ (ContextKeyExpr.equals('view', COMMENTS_VIEW_ID)),
60
+ CONTEXT_KEY_HAS_COMMENTS
61
+ )), ContextKeyExpr.not(CONTEXT_KEY_SOME_COMMENTS_EXPANDED.key)))),
63
62
  order: 100
64
63
  }
65
64
  });
@@ -72,16 +71,12 @@ registerAction2(class Reply extends Action2 {
72
71
  constructor() {
73
72
  super({
74
73
  id: 'comments.reply',
75
- title: ( localizeWithPath(
76
- 'vs/workbench/contrib/comments/browser/comments.contribution',
77
- 'reply',
78
- "Reply"
79
- )),
74
+ title: ( localizeWithPath(_moduleId, 2, "Reply")),
80
75
  icon: Codicon.reply,
81
76
  menu: {
82
77
  id: MenuId.CommentsViewThreadActions,
83
78
  order: 100,
84
- when: ( ContextKeyExpr.equals('canReply', true))
79
+ when: ( (ContextKeyExpr.equals('canReply', true)))
85
80
  },
86
81
  });
87
82
  }
@@ -92,64 +87,48 @@ registerAction2(class Reply extends Action2 {
92
87
  revealCommentThread(commentService, editorService, uriIdentityService, marshalledCommentThread.thread, marshalledCommentThread.thread.comments[marshalledCommentThread.thread.comments.length - 1], true);
93
88
  }
94
89
  });
95
- ( Registry.as(Extensions.Configuration)).registerConfiguration({
90
+ ( (Registry.as(Extensions.Configuration))).registerConfiguration({
96
91
  id: 'comments',
97
92
  order: 20,
98
- title: ( localizeWithPath(
99
- 'vs/workbench/contrib/comments/browser/comments.contribution',
100
- 'commentsConfigurationTitle',
101
- "Comments"
102
- )),
93
+ title: ( localizeWithPath(_moduleId, 3, "Comments")),
103
94
  type: 'object',
104
95
  properties: {
105
96
  'comments.openPanel': {
106
97
  enum: ['neverOpen', 'openOnSessionStart', 'openOnSessionStartWithComments'],
107
98
  default: 'openOnSessionStartWithComments',
108
- description: ( localizeWithPath(
109
- 'vs/workbench/contrib/comments/browser/comments.contribution',
110
- 'openComments',
111
- "Controls when the comments panel should open."
112
- )),
99
+ description: ( localizeWithPath(_moduleId, 4, "Controls when the comments panel should open.")),
113
100
  restricted: false,
114
101
  markdownDeprecationMessage: ( localizeWithPath(
115
- 'vs/workbench/contrib/comments/browser/comments.contribution',
116
- 'comments.openPanel.deprecated',
102
+ _moduleId,
103
+ 5,
117
104
  "This setting is deprecated in favor of `comments.openView`."
118
105
  ))
119
106
  },
120
107
  'comments.openView': {
121
108
  enum: ['never', 'file', 'firstFile', 'firstFileUnresolved'],
122
- enumDescriptions: [( localizeWithPath(
123
- 'vs/workbench/contrib/comments/browser/comments.contribution',
124
- 'comments.openView.never',
125
- "The comments view will never be opened."
126
- )), ( localizeWithPath(
127
- 'vs/workbench/contrib/comments/browser/comments.contribution',
128
- 'comments.openView.file',
109
+ enumDescriptions: [( localizeWithPath(_moduleId, 6, "The comments view will never be opened.")), ( localizeWithPath(
110
+ _moduleId,
111
+ 7,
129
112
  "The comments view will open when a file with comments is active."
130
113
  )), ( localizeWithPath(
131
- 'vs/workbench/contrib/comments/browser/comments.contribution',
132
- 'comments.openView.firstFile',
114
+ _moduleId,
115
+ 8,
133
116
  "If the comments view has not been opened yet during this session it will open the first time during a session that a file with comments is active."
134
117
  )), ( localizeWithPath(
135
- 'vs/workbench/contrib/comments/browser/comments.contribution',
136
- 'comments.openView.firstFileUnresolved',
118
+ _moduleId,
119
+ 9,
137
120
  "If the comments view has not been opened yet during this session and the comment is not resolved, it will open the first time during a session that a file with comments is active."
138
121
  ))],
139
122
  default: 'firstFile',
140
- description: ( localizeWithPath(
141
- 'vs/workbench/contrib/comments/browser/comments.contribution',
142
- 'comments.openView',
143
- "Controls when the comments view should open."
144
- )),
123
+ description: ( localizeWithPath(_moduleId, 10, "Controls when the comments view should open.")),
145
124
  restricted: false
146
125
  },
147
126
  'comments.useRelativeTime': {
148
127
  type: 'boolean',
149
128
  default: true,
150
129
  description: ( localizeWithPath(
151
- 'vs/workbench/contrib/comments/browser/comments.contribution',
152
- 'useRelativeTime',
130
+ _moduleId,
131
+ 11,
153
132
  "Determines if relative time will be used in comment timestamps (ex. '1 day ago')."
154
133
  ))
155
134
  },
@@ -157,26 +136,22 @@ registerAction2(class Reply extends Action2 {
157
136
  type: 'boolean',
158
137
  default: true,
159
138
  description: ( localizeWithPath(
160
- 'vs/workbench/contrib/comments/browser/comments.contribution',
161
- 'comments.visible',
139
+ _moduleId,
140
+ 12,
162
141
  "Controls the visibility of the comments bar and comment threads in editors that have commenting ranges and comments. Comments are still accessible via the Comments view and will cause commenting to be toggled on in the same way running the command \"Comments: Toggle Editor Commenting\" toggles comments."
163
142
  ))
164
143
  },
165
144
  'comments.maxHeight': {
166
145
  type: 'boolean',
167
146
  default: true,
168
- description: ( localizeWithPath(
169
- 'vs/workbench/contrib/comments/browser/comments.contribution',
170
- 'comments.maxHeight',
171
- "Controls whether the comments widget scrolls or expands."
172
- ))
147
+ description: ( localizeWithPath(_moduleId, 13, "Controls whether the comments widget scrolls or expands."))
173
148
  },
174
149
  'comments.collapseOnResolve': {
175
150
  type: 'boolean',
176
151
  default: true,
177
152
  description: ( localizeWithPath(
178
- 'vs/workbench/contrib/comments/browser/comments.contribution',
179
- 'collapseOnResolve',
153
+ _moduleId,
154
+ 14,
180
155
  "Controls whether the comment thread should collapse when the thread is resolved."
181
156
  ))
182
157
  }
@@ -187,7 +162,7 @@ let UnresolvedCommentsBadge = class UnresolvedCommentsBadge extends Disposable {
187
162
  super();
188
163
  this._commentService = _commentService;
189
164
  this.activityService = activityService;
190
- this.activity = this._register(( new MutableDisposable()));
165
+ this.activity = this._register(( (new MutableDisposable())));
191
166
  this.totalUnresolved = 0;
192
167
  this._register(this._commentService.onDidSetAllCommentThreads(this.onAllCommentsChanged, this));
193
168
  this._register(this._commentService.onDidUpdateCommentThreads(this.onCommentsUpdated, this));
@@ -217,19 +192,14 @@ let UnresolvedCommentsBadge = class UnresolvedCommentsBadge extends Disposable {
217
192
  return;
218
193
  }
219
194
  this.totalUnresolved = unresolved;
220
- const message = ( localizeWithPath(
221
- 'vs/workbench/contrib/comments/browser/comments.contribution',
222
- 'totalUnresolvedComments',
223
- '{0} Unresolved Comments',
224
- this.totalUnresolved
225
- ));
226
- this.activity.value = this.activityService.showViewActivity(COMMENTS_VIEW_ID, { badge: ( new NumberBadge(this.totalUnresolved, () => message)) });
195
+ const message = ( localizeWithPath(_moduleId, 15, '{0} Unresolved Comments', this.totalUnresolved));
196
+ this.activity.value = this.activityService.showViewActivity(COMMENTS_VIEW_ID, { badge: ( (new NumberBadge(this.totalUnresolved, () => message))) });
227
197
  }
228
198
  };
229
- UnresolvedCommentsBadge = ( __decorate([
230
- ( __param(0, ICommentService)),
231
- ( __param(1, IActivityService))
232
- ], UnresolvedCommentsBadge));
233
- ( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(UnresolvedCommentsBadge, 4 );
199
+ UnresolvedCommentsBadge = ( (__decorate([
200
+ ( (__param(0, ICommentService))),
201
+ ( (__param(1, IActivityService)))
202
+ ], UnresolvedCommentsBadge)));
203
+ ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(UnresolvedCommentsBadge, 4 );
234
204
 
235
205
  export { UnresolvedCommentsBadge };
@@ -19,6 +19,7 @@ import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/ac
19
19
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
20
20
  import { accessibilityHelpIsShown, accessibleViewCurrentProviderId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
21
21
 
22
+ const _moduleId = "vs/workbench/contrib/comments/browser/commentsEditorContribution";
22
23
  registerEditorContribution(ID, CommentController, 1 );
23
24
  KeybindingsRegistry.registerCommandAndKeybindingRule({
24
25
  id: "editor.action.nextCommentThreadAction" ,
@@ -65,18 +66,21 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
65
66
  }
66
67
  controller.nextCommentingRange();
67
68
  },
68
- when: ( ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, ( ContextKeyExpr.or(EditorContextKeys.focus, CommentContextKeys.commentFocused, ( ContextKeyExpr.and(accessibilityHelpIsShown, ( accessibleViewCurrentProviderId.isEqualTo("comments" )))))))),
69
+ when: ( (ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, (ContextKeyExpr.or(
70
+ EditorContextKeys.focus,
71
+ CommentContextKeys.commentFocused,
72
+ (ContextKeyExpr.and(
73
+ accessibilityHelpIsShown,
74
+ (accessibleViewCurrentProviderId.isEqualTo("comments" ))
75
+ ))
76
+ ))))),
69
77
  primary: KeyChord(2048 | 41 , 2048 | 512 | 18 ),
70
78
  weight: 100
71
79
  });
72
80
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
73
81
  command: {
74
82
  id: "editor.action.nextCommentingRange" ,
75
- title: ( localizeWithPath(
76
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
77
- 'comments.nextCommentingRange',
78
- "Go to Next Commenting Range"
79
- )),
83
+ title: ( localizeWithPath(_moduleId, 0, "Go to Next Commenting Range")),
80
84
  category: 'Comments',
81
85
  },
82
86
  when: CommentContextKeys.activeEditorHasCommentingRange
@@ -94,18 +98,21 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
94
98
  }
95
99
  controller.previousCommentingRange();
96
100
  },
97
- when: ( ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, ( ContextKeyExpr.or(EditorContextKeys.focus, CommentContextKeys.commentFocused, ( ContextKeyExpr.and(accessibilityHelpIsShown, ( accessibleViewCurrentProviderId.isEqualTo("comments" )))))))),
101
+ when: ( (ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, (ContextKeyExpr.or(
102
+ EditorContextKeys.focus,
103
+ CommentContextKeys.commentFocused,
104
+ (ContextKeyExpr.and(
105
+ accessibilityHelpIsShown,
106
+ (accessibleViewCurrentProviderId.isEqualTo("comments" ))
107
+ ))
108
+ ))))),
98
109
  primary: KeyChord(2048 | 41 , 2048 | 512 | 16 ),
99
110
  weight: 100
100
111
  });
101
112
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
102
113
  command: {
103
114
  id: "editor.action.previousCommentingRange" ,
104
- title: ( localizeWithPath(
105
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
106
- 'comments.previousCommentingRange',
107
- "Go to Previous Commenting Range"
108
- )),
115
+ title: ( localizeWithPath(_moduleId, 1, "Go to Previous Commenting Range")),
109
116
  category: 'Comments',
110
117
  },
111
118
  when: CommentContextKeys.activeEditorHasCommentingRange
@@ -121,11 +128,7 @@ CommandsRegistry.registerCommand({
121
128
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
122
129
  command: {
123
130
  id: "workbench.action.toggleCommenting" ,
124
- title: ( localizeWithPath(
125
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
126
- 'comments.toggleCommenting',
127
- "Toggle Editor Commenting"
128
- )),
131
+ title: ( localizeWithPath(_moduleId, 2, "Toggle Editor Commenting")),
129
132
  category: 'Comments',
130
133
  },
131
134
  when: CommentContextKeys.WorkspaceHasCommenting
@@ -141,12 +144,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
141
144
  if (!controller) {
142
145
  return Promise.resolve();
143
146
  }
144
- const position = args?.range ? ( new Range(
147
+ const position = args?.range ? ( (new Range(
145
148
  args.range.startLineNumber,
146
149
  args.range.startLineNumber,
147
150
  args.range.endLineNumber,
148
151
  args.range.endColumn
149
- ))
152
+ )))
150
153
  : (args?.fileComment ? undefined : activeEditor.getSelection());
151
154
  const notificationService = accessor.get(INotificationService);
152
155
  try {
@@ -154,8 +157,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
154
157
  }
155
158
  catch (e) {
156
159
  notificationService.error(( localizeWithPath(
157
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
158
- 'comments.addCommand.error',
160
+ _moduleId,
161
+ 3,
159
162
  "The cursor must be within a commenting range to add a comment"
160
163
  )));
161
164
  }
@@ -166,11 +169,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
166
169
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
167
170
  command: {
168
171
  id: "workbench.action.addComment" ,
169
- title: ( localizeWithPath(
170
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
171
- 'comments.addCommand',
172
- "Add Comment on Current Selection"
173
- )),
172
+ title: ( localizeWithPath(_moduleId, 4, "Add Comment on Current Selection")),
174
173
  category: 'Comments'
175
174
  },
176
175
  when: CommentContextKeys.activeCursorHasCommentingRange
@@ -184,11 +183,7 @@ CommandsRegistry.registerCommand({
184
183
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
185
184
  command: {
186
185
  id: "workbench.action.collapseAllComments" ,
187
- title: ( localizeWithPath(
188
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
189
- 'comments.collapseAll',
190
- "Collapse All Comments"
191
- )),
186
+ title: ( localizeWithPath(_moduleId, 5, "Collapse All Comments")),
192
187
  category: 'Comments'
193
188
  },
194
189
  when: CommentContextKeys.WorkspaceHasCommenting
@@ -202,11 +197,7 @@ CommandsRegistry.registerCommand({
202
197
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
203
198
  command: {
204
199
  id: "workbench.action.expandAllComments" ,
205
- title: ( localizeWithPath(
206
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
207
- 'comments.expandAll',
208
- "Expand All Comments"
209
- )),
200
+ title: ( localizeWithPath(_moduleId, 6, "Expand All Comments")),
210
201
  category: 'Comments'
211
202
  },
212
203
  when: CommentContextKeys.WorkspaceHasCommenting
@@ -220,11 +211,7 @@ CommandsRegistry.registerCommand({
220
211
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
221
212
  command: {
222
213
  id: "workbench.action.expandUnresolvedComments" ,
223
- title: ( localizeWithPath(
224
- 'vs/workbench/contrib/comments/browser/commentsEditorContribution',
225
- 'comments.expandUnresolved',
226
- "Expand Unresolved Comments"
227
- )),
214
+ title: ( localizeWithPath(_moduleId, 7, "Expand Unresolved Comments")),
228
215
  category: 'Comments'
229
216
  },
230
217
  when: CommentContextKeys.WorkspaceHasCommenting
package/comments.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { IEditorOverrideServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
2
-
3
- declare function getServiceOverride(): IEditorOverrideServices;
4
-
5
- export { getServiceOverride as default };