@codingame/monaco-vscode-comments-service-override 5.3.0 → 6.0.1

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": "5.3.0",
3
+ "version": "6.0.1",
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@5.3.0"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@6.0.1"
30
30
  }
31
31
  }
@@ -9,6 +9,7 @@ import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/lay
9
9
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
10
10
  import { COMMENTS_SECTION } from 'vscode/vscode/vs/workbench/contrib/comments/common/commentsConfiguration';
11
11
  import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
12
+ import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
12
13
  import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
13
14
  import { CommentContextKeys } from 'vscode/vscode/vs/workbench/contrib/comments/common/commentContextKeys';
14
15
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
@@ -60,12 +61,12 @@ let CommentService = class CommentService extends Disposable {
60
61
  this._handleZenMode();
61
62
  this._workspaceHasCommenting = CommentContextKeys.WorkspaceHasCommenting.bindTo(contextKeyService);
62
63
  const storageListener = this._register(( new DisposableStore()));
63
- const storageEvent = Event.debounce(this.storageService.onDidChangeValue(1 , CONTINUE_ON_COMMENTS, storageListener), (last, event) => last?.external ? last : event, 500);
64
+ const storageEvent = Event.debounce(this.storageService.onDidChangeValue(StorageScope.WORKSPACE, CONTINUE_ON_COMMENTS, storageListener), (last, event) => last?.external ? last : event, 500);
64
65
  storageListener.add(storageEvent(v => {
65
66
  if (!v.external) {
66
67
  return;
67
68
  }
68
- const commentsToRestore = this.storageService.getObject(CONTINUE_ON_COMMENTS, 1 );
69
+ const commentsToRestore = this.storageService.getObject(CONTINUE_ON_COMMENTS, StorageScope.WORKSPACE);
69
70
  if (!commentsToRestore) {
70
71
  return;
71
72
  }
@@ -201,12 +202,12 @@ let CommentService = class CommentService extends Disposable {
201
202
  getCommentController(uniqueOwner) {
202
203
  return this._commentControls.get(uniqueOwner);
203
204
  }
204
- async createCommentThreadTemplate(uniqueOwner, resource, range) {
205
+ async createCommentThreadTemplate(uniqueOwner, resource, range, editorId) {
205
206
  const commentController = this._commentControls.get(uniqueOwner);
206
207
  if (!commentController) {
207
208
  return;
208
209
  }
209
- return commentController.createCommentThreadTemplate(resource, range);
210
+ return commentController.createCommentThreadTemplate(resource, range, editorId);
210
211
  }
211
212
  async updateCommentThreadTemplate(uniqueOwner, threadHandle, range) {
212
213
  const commentController = this._commentControls.get(uniqueOwner);
@@ -309,7 +310,7 @@ let CommentService = class CommentService extends Disposable {
309
310
  commentsToSave.push(...pendingComments);
310
311
  }
311
312
  this.logService.debug(`Comments: URIs of continue on comments to add to storage ${( commentsToSave.map(thread => ( thread.uri.toString()))).join(', ')}.`);
312
- this.storageService.store(CONTINUE_ON_COMMENTS, commentsToSave, 1 , 0 );
313
+ this.storageService.store(CONTINUE_ON_COMMENTS, commentsToSave, StorageScope.WORKSPACE, StorageTarget.USER);
313
314
  }
314
315
  removeContinueOnComment(pendingComment) {
315
316
  const pendingComments = this._continueOnComments.get(pendingComment.uniqueOwner);
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
3
4
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
4
5
  import './commentsEditorContribution.js';
5
6
  import './commentService.js';
@@ -12,6 +13,7 @@ import { NumberBadge } from 'vscode/vscode/vs/workbench/services/activity/common
12
13
  import { IActivityService } from 'vscode/vscode/vs/workbench/services/activity/common/activity.service';
13
14
  import { COMMENTS_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer';
14
15
  import { CommentThreadState } from 'vscode/vscode/vs/editor/common/languages';
16
+ import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
15
17
  import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
16
18
  import { CONTEXT_KEY_HAS_COMMENTS, CONTEXT_KEY_SOME_COMMENTS_EXPANDED } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsView';
17
19
  import { ViewAction } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
@@ -20,6 +22,10 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
20
22
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
21
23
  import { revealCommentThread } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsController';
22
24
  import { accessibleViewIsShown, accessibleViewCurrentProviderId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
25
+ import { AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
26
+ import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
27
+ import { CommentsAccessibleView } from './commentsAccessibleView.js';
28
+ import { CommentsAccessibilityHelp } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsAccessibility';
23
29
 
24
30
  const _moduleId = "vs/workbench/contrib/comments/browser/comments.contribution";
25
31
  registerAction2(class Collapse extends ViewAction {
@@ -81,10 +87,10 @@ registerAction2(class Reply extends Action2 {
81
87
  },
82
88
  {
83
89
  id: MenuId.AccessibleView,
84
- when: ( (ContextKeyExpr.and(accessibleViewIsShown, (ContextKeyExpr.equals(
85
- accessibleViewCurrentProviderId.key,
86
- "comments"
87
- ))))),
90
+ when: ( (ContextKeyExpr.and(
91
+ accessibleViewIsShown,
92
+ (ContextKeyExpr.equals(accessibleViewCurrentProviderId.key, AccessibleViewProviderId.Comments))
93
+ ))),
88
94
  }]
89
95
  });
90
96
  }
@@ -208,6 +214,8 @@ UnresolvedCommentsBadge = ( (__decorate([
208
214
  ( (__param(0, ICommentService))),
209
215
  ( (__param(1, IActivityService)))
210
216
  ], UnresolvedCommentsBadge)));
211
- ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(UnresolvedCommentsBadge, 4 );
217
+ ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(UnresolvedCommentsBadge, LifecyclePhase.Eventually);
218
+ AccessibleViewRegistry.register(( (new CommentsAccessibleView())));
219
+ AccessibleViewRegistry.register(( (new CommentsAccessibilityHelp())));
212
220
 
213
221
  export { UnresolvedCommentsBadge };
@@ -0,0 +1,80 @@
1
+ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
2
+ import { MarshalledId } from 'vscode/vscode/vs/base/common/marshallingIds';
3
+ import { AccessibleViewProviderId, AccessibleViewType } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
4
+ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.service';
5
+ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
6
+ import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
7
+ import { COMMENTS_VIEW_ID, CommentsMenus } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer';
8
+ import { CONTEXT_KEY_HAS_COMMENTS } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsView';
9
+ import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
10
+
11
+ class CommentsAccessibleView extends Disposable {
12
+ getProvider(accessor) {
13
+ const contextKeyService = accessor.get(IContextKeyService);
14
+ const viewsService = accessor.get(IViewsService);
15
+ const menuService = accessor.get(IMenuService);
16
+ const commentsView = viewsService.getActiveViewWithId(COMMENTS_VIEW_ID);
17
+ if (!commentsView) {
18
+ return;
19
+ }
20
+ const menus = this._register(( new CommentsMenus(menuService)));
21
+ menus.setContextKeyService(contextKeyService);
22
+ function resolveProvider() {
23
+ if (!commentsView) {
24
+ return;
25
+ }
26
+ const commentNode = commentsView.focusedCommentNode;
27
+ const content = commentsView.focusedCommentInfo?.toString();
28
+ if (!commentNode || !content) {
29
+ return;
30
+ }
31
+ const menuActions = [...menus.getResourceContextActions(commentNode)].filter(i => i.enabled);
32
+ const actions = ( menuActions.map(action => {
33
+ return {
34
+ ...action,
35
+ run: () => {
36
+ commentsView.focus();
37
+ action.run({
38
+ thread: commentNode.thread,
39
+ $mid: MarshalledId.CommentThread,
40
+ commentControlHandle: commentNode.controllerHandle,
41
+ commentThreadHandle: commentNode.threadHandle,
42
+ });
43
+ }
44
+ };
45
+ }));
46
+ return {
47
+ id: AccessibleViewProviderId.Notification,
48
+ provideContent: () => {
49
+ return content;
50
+ },
51
+ onClose() {
52
+ commentsView.focus();
53
+ },
54
+ next() {
55
+ commentsView.focus();
56
+ commentsView.focusNextNode();
57
+ resolveProvider();
58
+ },
59
+ previous() {
60
+ commentsView.focus();
61
+ commentsView.focusPreviousNode();
62
+ resolveProvider();
63
+ },
64
+ verbositySettingKey: AccessibilityVerbositySettingId.Comments,
65
+ options: { type: AccessibleViewType.View },
66
+ actions
67
+ };
68
+ }
69
+ return resolveProvider();
70
+ }
71
+ constructor() {
72
+ super();
73
+ this.priority = 90;
74
+ this.name = 'comment';
75
+ this.when = CONTEXT_KEY_HAS_COMMENTS;
76
+ this.type = AccessibleViewType.View;
77
+ }
78
+ }
79
+
80
+ export { CommentsAccessibleView };
@@ -1,11 +1,11 @@
1
- import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
1
+ import { KeyMod, KeyCode, KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
2
2
  import 'vscode/vscode/vs/workbench/contrib/comments/browser/media/review.css';
3
3
  import { isDiffEditor, isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
4
- import { registerEditorContribution } from 'vscode/vscode/vs/editor/browser/editorExtensions';
4
+ import { registerEditorContribution, EditorContributionInstantiation } from 'vscode/vscode/vs/editor/browser/editorExtensions';
5
5
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
6
6
  import { localizeWithPath } from 'vscode/vscode/vs/nls';
7
7
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
8
- import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
8
+ import { KeybindingsRegistry, KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
9
9
  import { ICommentService } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentService.service';
10
10
  import { ctxCommentEditorFocused, SimpleCommentEditor } from 'vscode/vscode/vs/workbench/contrib/comments/browser/simpleCommentEditor';
11
11
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
@@ -18,14 +18,16 @@ import { CommentContextKeys } from 'vscode/vscode/vs/workbench/contrib/comments/
18
18
  import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
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
- import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
21
+ import { CommentCommandId } from 'vscode/vscode/vs/workbench/contrib/comments/common/commentCommandIds';
22
+ import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
22
23
  import { CommentsInputContentProvider } from './commentsInputContentProvider.js';
24
+ import { AccessibleViewProviderId } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
23
25
 
24
26
  const _moduleId = "vs/workbench/contrib/comments/browser/commentsEditorContribution";
25
- registerEditorContribution(ID, CommentController, 1 );
26
- registerWorkbenchContribution2(CommentsInputContentProvider.ID, CommentsInputContentProvider, 2 );
27
+ registerEditorContribution(ID, CommentController, EditorContributionInstantiation.AfterFirstRender);
28
+ registerWorkbenchContribution2(CommentsInputContentProvider.ID, CommentsInputContentProvider, WorkbenchPhase.BlockRestore);
27
29
  KeybindingsRegistry.registerCommandAndKeybindingRule({
28
- id: "editor.action.nextCommentThreadAction" ,
30
+ id: CommentCommandId.NextThread,
29
31
  handler: async (accessor, args) => {
30
32
  const activeEditor = getActiveEditor(accessor);
31
33
  if (!activeEditor) {
@@ -37,11 +39,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
37
39
  }
38
40
  controller.nextCommentThread();
39
41
  },
40
- weight: 100 ,
41
- primary: 512 | 67 ,
42
+ weight: KeybindingWeight.EditorContrib,
43
+ primary: KeyMod.Alt | KeyCode.F9,
42
44
  });
43
45
  KeybindingsRegistry.registerCommandAndKeybindingRule({
44
- id: "editor.action.previousCommentThreadAction" ,
46
+ id: CommentCommandId.PreviousThread,
45
47
  handler: async (accessor, args) => {
46
48
  const activeEditor = getActiveEditor(accessor);
47
49
  if (!activeEditor) {
@@ -53,11 +55,11 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
53
55
  }
54
56
  controller.previousCommentThread();
55
57
  },
56
- weight: 100 ,
57
- primary: 1024 | 512 | 67
58
+ weight: KeybindingWeight.EditorContrib,
59
+ primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F9
58
60
  });
59
61
  KeybindingsRegistry.registerCommandAndKeybindingRule({
60
- id: "editor.action.nextCommentingRange" ,
62
+ id: CommentCommandId.NextRange,
61
63
  handler: async (accessor, args) => {
62
64
  const activeEditor = getActiveEditor(accessor);
63
65
  if (!activeEditor) {
@@ -74,22 +76,22 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
74
76
  CommentContextKeys.commentFocused,
75
77
  (ContextKeyExpr.and(
76
78
  accessibilityHelpIsShown,
77
- (accessibleViewCurrentProviderId.isEqualTo("comments" ))
79
+ (accessibleViewCurrentProviderId.isEqualTo(AccessibleViewProviderId.Comments))
78
80
  ))
79
81
  ))))),
80
- primary: KeyChord(2048 | 41 , 2048 | 512 | 18 ),
81
- weight: 100
82
+ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.DownArrow),
83
+ weight: KeybindingWeight.EditorContrib
82
84
  });
83
85
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
84
86
  command: {
85
- id: "editor.action.nextCommentingRange" ,
87
+ id: CommentCommandId.NextRange,
86
88
  title: ( localizeWithPath(_moduleId, 0, "Go to Next Commenting Range")),
87
89
  category: 'Comments',
88
90
  },
89
91
  when: CommentContextKeys.activeEditorHasCommentingRange
90
92
  });
91
93
  KeybindingsRegistry.registerCommandAndKeybindingRule({
92
- id: "editor.action.previousCommentingRange" ,
94
+ id: CommentCommandId.PreviousRange,
93
95
  handler: async (accessor, args) => {
94
96
  const activeEditor = getActiveEditor(accessor);
95
97
  if (!activeEditor) {
@@ -106,22 +108,22 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
106
108
  CommentContextKeys.commentFocused,
107
109
  (ContextKeyExpr.and(
108
110
  accessibilityHelpIsShown,
109
- (accessibleViewCurrentProviderId.isEqualTo("comments" ))
111
+ (accessibleViewCurrentProviderId.isEqualTo(AccessibleViewProviderId.Comments))
110
112
  ))
111
113
  ))))),
112
- primary: KeyChord(2048 | 41 , 2048 | 512 | 16 ),
113
- weight: 100
114
+ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.UpArrow),
115
+ weight: KeybindingWeight.EditorContrib
114
116
  });
115
117
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
116
118
  command: {
117
- id: "editor.action.previousCommentingRange" ,
119
+ id: CommentCommandId.PreviousRange,
118
120
  title: ( localizeWithPath(_moduleId, 1, "Go to Previous Commenting Range")),
119
121
  category: 'Comments',
120
122
  },
121
123
  when: CommentContextKeys.activeEditorHasCommentingRange
122
124
  });
123
125
  CommandsRegistry.registerCommand({
124
- id: "workbench.action.toggleCommenting" ,
126
+ id: CommentCommandId.ToggleCommenting,
125
127
  handler: (accessor) => {
126
128
  const commentService = accessor.get(ICommentService);
127
129
  const enable = commentService.isCommentingEnabled;
@@ -130,14 +132,14 @@ CommandsRegistry.registerCommand({
130
132
  });
131
133
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
132
134
  command: {
133
- id: "workbench.action.toggleCommenting" ,
135
+ id: CommentCommandId.ToggleCommenting,
134
136
  title: ( localizeWithPath(_moduleId, 2, "Toggle Editor Commenting")),
135
137
  category: 'Comments',
136
138
  },
137
139
  when: CommentContextKeys.WorkspaceHasCommenting
138
140
  });
139
141
  KeybindingsRegistry.registerCommandAndKeybindingRule({
140
- id: "workbench.action.addComment" ,
142
+ id: CommentCommandId.Add,
141
143
  handler: async (accessor, args) => {
142
144
  const activeEditor = getActiveEditor(accessor);
143
145
  if (!activeEditor) {
@@ -166,63 +168,63 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
166
168
  )));
167
169
  }
168
170
  },
169
- weight: 100 ,
170
- primary: KeyChord(2048 | 41 , 2048 | 512 | 33 ),
171
+ weight: KeybindingWeight.EditorContrib,
172
+ primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyC),
171
173
  });
172
174
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
173
175
  command: {
174
- id: "workbench.action.addComment" ,
176
+ id: CommentCommandId.Add,
175
177
  title: ( localizeWithPath(_moduleId, 4, "Add Comment on Current Selection")),
176
178
  category: 'Comments'
177
179
  },
178
180
  when: CommentContextKeys.activeCursorHasCommentingRange
179
181
  });
180
182
  CommandsRegistry.registerCommand({
181
- id: "workbench.action.collapseAllComments" ,
183
+ id: CommentCommandId.CollapseAll,
182
184
  handler: (accessor) => {
183
185
  return getActiveController(accessor)?.collapseAll();
184
186
  }
185
187
  });
186
188
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
187
189
  command: {
188
- id: "workbench.action.collapseAllComments" ,
190
+ id: CommentCommandId.CollapseAll,
189
191
  title: ( localizeWithPath(_moduleId, 5, "Collapse All Comments")),
190
192
  category: 'Comments'
191
193
  },
192
194
  when: CommentContextKeys.WorkspaceHasCommenting
193
195
  });
194
196
  CommandsRegistry.registerCommand({
195
- id: "workbench.action.expandAllComments" ,
197
+ id: CommentCommandId.ExpandAll,
196
198
  handler: (accessor) => {
197
199
  return getActiveController(accessor)?.expandAll();
198
200
  }
199
201
  });
200
202
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
201
203
  command: {
202
- id: "workbench.action.expandAllComments" ,
204
+ id: CommentCommandId.ExpandAll,
203
205
  title: ( localizeWithPath(_moduleId, 6, "Expand All Comments")),
204
206
  category: 'Comments'
205
207
  },
206
208
  when: CommentContextKeys.WorkspaceHasCommenting
207
209
  });
208
210
  CommandsRegistry.registerCommand({
209
- id: "workbench.action.expandUnresolvedComments" ,
211
+ id: CommentCommandId.ExpandUnresolved,
210
212
  handler: (accessor) => {
211
213
  return getActiveController(accessor)?.expandUnresolved();
212
214
  }
213
215
  });
214
216
  MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
215
217
  command: {
216
- id: "workbench.action.expandUnresolvedComments" ,
218
+ id: CommentCommandId.ExpandUnresolved,
217
219
  title: ( localizeWithPath(_moduleId, 7, "Expand Unresolved Comments")),
218
220
  category: 'Comments'
219
221
  },
220
222
  when: CommentContextKeys.WorkspaceHasCommenting
221
223
  });
222
224
  KeybindingsRegistry.registerCommandAndKeybindingRule({
223
- id: "editor.action.submitComment" ,
224
- weight: 100 ,
225
- primary: 2048 | 3 ,
225
+ id: CommentCommandId.Submit,
226
+ weight: KeybindingWeight.EditorContrib,
227
+ primary: KeyMod.CtrlCmd | KeyCode.Enter,
226
228
  when: ctxCommentEditorFocused,
227
229
  handler: (accessor, args) => {
228
230
  const activeCodeEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();
@@ -232,10 +234,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
232
234
  }
233
235
  });
234
236
  KeybindingsRegistry.registerCommandAndKeybindingRule({
235
- id: "workbench.action.hideComment" ,
236
- weight: 100 ,
237
- primary: 9 ,
238
- secondary: [1024 | 9 ],
237
+ id: CommentCommandId.Hide,
238
+ weight: KeybindingWeight.EditorContrib,
239
+ primary: KeyCode.Escape,
240
+ secondary: [KeyMod.Shift | KeyCode.Escape],
239
241
  when: ctxCommentEditorFocused,
240
242
  handler: (accessor, args) => {
241
243
  const activeCodeEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();
@@ -2,6 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
3
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
4
4
  import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
5
+ import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
5
6
  import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
6
7
  import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
7
8
  import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
@@ -23,7 +24,7 @@ let CommentsInputContentProvider = class CommentsInputContentProvider extends Di
23
24
  return null;
24
25
  }
25
26
  if (input.options) {
26
- applyTextEditorOptions(input.options, editor, 1 );
27
+ applyTextEditorOptions(input.options, editor, ScrollType.Immediate);
27
28
  }
28
29
  return editor;
29
30
  }));