@codingame/monaco-vscode-comments-service-override 13.1.7 → 14.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 +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.js +2 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +28 -15
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibleView.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsEditorContribution.js +27 -30
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsInputContentProvider.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-comments-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - comments service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "
|
|
20
|
-
"@codingame/monaco-vscode-9ee79c1a-3f03-568b-8eac-b02513a98b68-common": "
|
|
21
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "
|
|
22
|
-
"@codingame/monaco-vscode-api": "
|
|
23
|
-
"@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common": "
|
|
18
|
+
"@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common": "14.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-9ee79c1a-3f03-568b-8eac-b02513a98b68-common": "14.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-api": "14.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common": "14.0.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"module": "index.js",
|
|
@@ -7,7 +7,7 @@ import { Range, IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/com
|
|
|
7
7
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
8
8
|
import { ICommentThreadChangedEvent } from "@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common/vscode/vs/workbench/contrib/comments/common/commentModel";
|
|
9
9
|
import { CommentMenus } from "./commentMenus.js";
|
|
10
|
-
import { ICellRange } from "@codingame/monaco-vscode-
|
|
10
|
+
import { ICellRange } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRange";
|
|
11
11
|
import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service";
|
|
12
12
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
13
13
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
@@ -106,6 +106,7 @@ export declare class CommentService extends Disposable implements ICommentServic
|
|
|
106
106
|
private _commentMenus;
|
|
107
107
|
private _isCommentingEnabled;
|
|
108
108
|
private _workspaceHasCommenting;
|
|
109
|
+
private _commentingEnabled;
|
|
109
110
|
private _continueOnComments;
|
|
110
111
|
private _continueOnCommentProviders;
|
|
111
112
|
private readonly _commentsModel;
|
|
@@ -61,6 +61,7 @@ let CommentService = class CommentService extends Disposable {
|
|
|
61
61
|
this._handleConfiguration();
|
|
62
62
|
this._handleZenMode();
|
|
63
63
|
this._workspaceHasCommenting = CommentContextKeys.WorkspaceHasCommenting.bindTo(contextKeyService);
|
|
64
|
+
this._commentingEnabled = CommentContextKeys.commentingEnabled.bindTo(contextKeyService);
|
|
64
65
|
const storageListener = this._register(( new DisposableStore()));
|
|
65
66
|
const storageEvent = Event.debounce(this.storageService.onDidChangeValue(StorageScope.WORKSPACE, CONTINUE_ON_COMMENTS, storageListener), (last, event) => last?.external ? last : event, 500);
|
|
66
67
|
storageListener.add(storageEvent(v => {
|
|
@@ -140,6 +141,7 @@ let CommentService = class CommentService extends Disposable {
|
|
|
140
141
|
enableCommenting(enable) {
|
|
141
142
|
if (enable !== this._isCommentingEnabled) {
|
|
142
143
|
this._isCommentingEnabled = enable;
|
|
144
|
+
this._commentingEnabled.set(enable);
|
|
143
145
|
this._onDidChangeCommentingEnabled.fire(enable);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
@@ -33,7 +33,7 @@ registerAction2(class Collapse extends ViewAction {
|
|
|
33
33
|
super({
|
|
34
34
|
viewId: COMMENTS_VIEW_ID,
|
|
35
35
|
id: 'comments.collapse',
|
|
36
|
-
title: ( localize(
|
|
36
|
+
title: ( localize(4973, "Collapse All")),
|
|
37
37
|
f1: false,
|
|
38
38
|
icon: Codicon.collapseAll,
|
|
39
39
|
menu: {
|
|
@@ -53,7 +53,7 @@ registerAction2(class Expand extends ViewAction {
|
|
|
53
53
|
super({
|
|
54
54
|
viewId: COMMENTS_VIEW_ID,
|
|
55
55
|
id: 'comments.expand',
|
|
56
|
-
title: ( localize(
|
|
56
|
+
title: ( localize(4974, "Expand All")),
|
|
57
57
|
f1: false,
|
|
58
58
|
icon: Codicon.expandAll,
|
|
59
59
|
menu: {
|
|
@@ -72,7 +72,7 @@ registerAction2(class Reply extends Action2 {
|
|
|
72
72
|
constructor() {
|
|
73
73
|
super({
|
|
74
74
|
id: 'comments.reply',
|
|
75
|
-
title: ( localize(
|
|
75
|
+
title: ( localize(4975, "Reply")),
|
|
76
76
|
icon: Codicon.reply,
|
|
77
77
|
precondition: ( ContextKeyExpr.equals('canReply', true)),
|
|
78
78
|
menu: [{
|
|
@@ -95,34 +95,34 @@ registerAction2(class Reply extends Action2 {
|
|
|
95
95
|
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
96
96
|
id: 'comments',
|
|
97
97
|
order: 20,
|
|
98
|
-
title: ( localize(
|
|
98
|
+
title: ( localize(4976, "Comments")),
|
|
99
99
|
type: 'object',
|
|
100
100
|
properties: {
|
|
101
101
|
'comments.openPanel': {
|
|
102
102
|
enum: ['neverOpen', 'openOnSessionStart', 'openOnSessionStartWithComments'],
|
|
103
103
|
default: 'openOnSessionStartWithComments',
|
|
104
|
-
description: ( localize(
|
|
104
|
+
description: ( localize(4977, "Controls when the comments panel should open.")),
|
|
105
105
|
restricted: false,
|
|
106
|
-
markdownDeprecationMessage: ( localize(
|
|
106
|
+
markdownDeprecationMessage: ( localize(4978, "This setting is deprecated in favor of `comments.openView`."))
|
|
107
107
|
},
|
|
108
108
|
'comments.openView': {
|
|
109
109
|
enum: ['never', 'file', 'firstFile', 'firstFileUnresolved'],
|
|
110
|
-
enumDescriptions: [( localize(
|
|
111
|
-
|
|
110
|
+
enumDescriptions: [( localize(4979, "The comments view will never be opened.")), ( localize(4980, "The comments view will open when a file with comments is active.")), ( localize(
|
|
111
|
+
4981,
|
|
112
112
|
"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."
|
|
113
113
|
)), ( localize(
|
|
114
|
-
|
|
114
|
+
4982,
|
|
115
115
|
"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."
|
|
116
116
|
))],
|
|
117
117
|
default: 'firstFile',
|
|
118
|
-
description: ( localize(
|
|
118
|
+
description: ( localize(4983, "Controls when the comments view should open.")),
|
|
119
119
|
restricted: false
|
|
120
120
|
},
|
|
121
121
|
'comments.useRelativeTime': {
|
|
122
122
|
type: 'boolean',
|
|
123
123
|
default: true,
|
|
124
124
|
description: ( localize(
|
|
125
|
-
|
|
125
|
+
4984,
|
|
126
126
|
"Determines if relative time will be used in comment timestamps (ex. '1 day ago')."
|
|
127
127
|
))
|
|
128
128
|
},
|
|
@@ -130,22 +130,35 @@ registerAction2(class Reply extends Action2 {
|
|
|
130
130
|
type: 'boolean',
|
|
131
131
|
default: true,
|
|
132
132
|
description: ( localize(
|
|
133
|
-
|
|
133
|
+
4985,
|
|
134
134
|
"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."
|
|
135
135
|
))
|
|
136
136
|
},
|
|
137
137
|
'comments.maxHeight': {
|
|
138
138
|
type: 'boolean',
|
|
139
139
|
default: true,
|
|
140
|
-
description: ( localize(
|
|
140
|
+
description: ( localize(4986, "Controls whether the comments widget scrolls or expands."))
|
|
141
141
|
},
|
|
142
142
|
'comments.collapseOnResolve': {
|
|
143
143
|
type: 'boolean',
|
|
144
144
|
default: true,
|
|
145
145
|
description: ( localize(
|
|
146
|
-
|
|
146
|
+
4987,
|
|
147
147
|
"Controls whether the comment thread should collapse when the thread is resolved."
|
|
148
148
|
))
|
|
149
|
+
},
|
|
150
|
+
'comments.thread.confirmOnCollapse': {
|
|
151
|
+
type: 'string',
|
|
152
|
+
enum: ['whenHasUnsubmittedComments', 'never'],
|
|
153
|
+
enumDescriptions: [( localize(
|
|
154
|
+
4988,
|
|
155
|
+
"Show a confirmation dialog when collapsing a comment thread with unsubmitted comments."
|
|
156
|
+
)), ( localize(4989, "Never show a confirmation dialog when collapsing a comment thread."))],
|
|
157
|
+
default: 'whenHasUnsubmittedComments',
|
|
158
|
+
description: ( localize(
|
|
159
|
+
4990,
|
|
160
|
+
"Controls whether a confirmation dialog is shown when collapsing a comment thread."
|
|
161
|
+
))
|
|
149
162
|
}
|
|
150
163
|
}
|
|
151
164
|
});
|
|
@@ -184,7 +197,7 @@ let UnresolvedCommentsBadge = class UnresolvedCommentsBadge extends Disposable {
|
|
|
184
197
|
return;
|
|
185
198
|
}
|
|
186
199
|
this.totalUnresolved = unresolved;
|
|
187
|
-
const message = ( localize(
|
|
200
|
+
const message = ( localize(4991, '{0} Unresolved Comments', this.totalUnresolved));
|
|
188
201
|
this.activity.value = this.activityService.showViewActivity(COMMENTS_VIEW_ID, { badge: ( new NumberBadge(this.totalUnresolved, () => message)) });
|
|
189
202
|
}
|
|
190
203
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions";
|
|
3
3
|
import { AccessibleViewProviderId, AccessibleViewType, IAccessibleViewContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
4
|
-
import {
|
|
4
|
+
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
5
5
|
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
6
6
|
import { CommentsMenus } from "@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer";
|
|
7
7
|
import { CommentsPanel } from "@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common/vscode/vs/workbench/contrib/comments/browser/commentsView";
|
|
8
8
|
import { ICommentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/comments/browser/commentService.service";
|
|
9
9
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
10
10
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
11
|
-
export declare class CommentsAccessibleView extends Disposable implements
|
|
11
|
+
export declare class CommentsAccessibleView extends Disposable implements IAccessibleViewImplementation {
|
|
12
12
|
readonly priority = 90;
|
|
13
13
|
readonly name = "comment";
|
|
14
14
|
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").RawContextKey<boolean>;
|
|
@@ -16,7 +16,7 @@ export declare class CommentsAccessibleView extends Disposable implements IAcces
|
|
|
16
16
|
getProvider(accessor: ServicesAccessor): CommentsAccessibleContentProvider | undefined;
|
|
17
17
|
constructor();
|
|
18
18
|
}
|
|
19
|
-
export declare class CommentThreadAccessibleView extends Disposable implements
|
|
19
|
+
export declare class CommentThreadAccessibleView extends Disposable implements IAccessibleViewImplementation {
|
|
20
20
|
readonly priority = 85;
|
|
21
21
|
readonly name = "commentThread";
|
|
22
22
|
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").RawContextKey<boolean>;
|
|
@@ -23,6 +23,7 @@ import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monac
|
|
|
23
23
|
import { CommentsInputContentProvider } from './commentsInputContentProvider.js';
|
|
24
24
|
import { AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
25
25
|
import { CommentWidgetFocus } from '@codingame/monaco-vscode-eb7d5efd-2e60-59f8-9ba4-9a8ae8cb2957-common/vscode/vs/workbench/contrib/comments/browser/commentThreadZoneWidget';
|
|
26
|
+
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
26
27
|
|
|
27
28
|
registerEditorContribution(ID, CommentController, EditorContributionInstantiation.AfterFirstRender);
|
|
28
29
|
registerWorkbenchContribution2(CommentsInputContentProvider.ID, CommentsInputContentProvider, WorkbenchPhase.BlockRestore);
|
|
@@ -63,11 +64,11 @@ registerAction2(class extends Action2 {
|
|
|
63
64
|
super({
|
|
64
65
|
id: CommentCommandId.NextCommentedRange,
|
|
65
66
|
title: {
|
|
66
|
-
value: ( localize(
|
|
67
|
+
value: ( localize(5012, "Go to Next Commented Range")),
|
|
67
68
|
original: 'Go to Next Commented Range'
|
|
68
69
|
},
|
|
69
70
|
category: {
|
|
70
|
-
value: ( localize(
|
|
71
|
+
value: ( localize(5013, "Comments")),
|
|
71
72
|
original: 'Comments'
|
|
72
73
|
},
|
|
73
74
|
menu: [{
|
|
@@ -98,11 +99,11 @@ registerAction2(class extends Action2 {
|
|
|
98
99
|
super({
|
|
99
100
|
id: CommentCommandId.PreviousCommentedRange,
|
|
100
101
|
title: {
|
|
101
|
-
value: ( localize(
|
|
102
|
+
value: ( localize(5014, "Go to Previous Commented Range")),
|
|
102
103
|
original: 'Go to Previous Commented Range'
|
|
103
104
|
},
|
|
104
105
|
category: {
|
|
105
|
-
value: ( localize(
|
|
106
|
+
value: ( localize(5013, "Comments")),
|
|
106
107
|
original: 'Comments'
|
|
107
108
|
},
|
|
108
109
|
menu: [{
|
|
@@ -133,11 +134,11 @@ registerAction2(class extends Action2 {
|
|
|
133
134
|
super({
|
|
134
135
|
id: CommentCommandId.NextRange,
|
|
135
136
|
title: {
|
|
136
|
-
value: ( localize(
|
|
137
|
+
value: ( localize(5015, "Go to Next Commenting Range")),
|
|
137
138
|
original: 'Go to Next Commenting Range'
|
|
138
139
|
},
|
|
139
140
|
category: {
|
|
140
|
-
value: ( localize(
|
|
141
|
+
value: ( localize(5013, "Comments")),
|
|
141
142
|
original: 'Comments'
|
|
142
143
|
},
|
|
143
144
|
menu: [{
|
|
@@ -168,11 +169,11 @@ registerAction2(class extends Action2 {
|
|
|
168
169
|
super({
|
|
169
170
|
id: CommentCommandId.PreviousRange,
|
|
170
171
|
title: {
|
|
171
|
-
value: ( localize(
|
|
172
|
+
value: ( localize(5016, "Go to Previous Commenting Range")),
|
|
172
173
|
original: 'Go to Previous Commenting Range'
|
|
173
174
|
},
|
|
174
175
|
category: {
|
|
175
|
-
value: ( localize(
|
|
176
|
+
value: ( localize(5013, "Comments")),
|
|
176
177
|
original: 'Comments'
|
|
177
178
|
},
|
|
178
179
|
menu: [{
|
|
@@ -203,11 +204,11 @@ registerAction2(class extends Action2 {
|
|
|
203
204
|
super({
|
|
204
205
|
id: CommentCommandId.ToggleCommenting,
|
|
205
206
|
title: {
|
|
206
|
-
value: ( localize(
|
|
207
|
+
value: ( localize(5017, "Toggle Editor Commenting")),
|
|
207
208
|
original: 'Toggle Editor Commenting'
|
|
208
209
|
},
|
|
209
210
|
category: {
|
|
210
|
-
value: ( localize(
|
|
211
|
+
value: ( localize(5013, "Comments")),
|
|
211
212
|
original: 'Comments'
|
|
212
213
|
},
|
|
213
214
|
menu: [{
|
|
@@ -227,11 +228,11 @@ registerAction2(class extends Action2 {
|
|
|
227
228
|
super({
|
|
228
229
|
id: CommentCommandId.Add,
|
|
229
230
|
title: {
|
|
230
|
-
value: ( localize(
|
|
231
|
+
value: ( localize(5018, "Add Comment on Current Selection")),
|
|
231
232
|
original: 'Add Comment on Current Selection'
|
|
232
233
|
},
|
|
233
234
|
category: {
|
|
234
|
-
value: ( localize(
|
|
235
|
+
value: ( localize(5013, "Comments")),
|
|
235
236
|
original: 'Comments'
|
|
236
237
|
},
|
|
237
238
|
menu: [{
|
|
@@ -261,13 +262,7 @@ registerAction2(class extends Action2 {
|
|
|
261
262
|
args.range.endColumn
|
|
262
263
|
))
|
|
263
264
|
: (args?.fileComment ? undefined : activeEditor.getSelection());
|
|
264
|
-
|
|
265
|
-
try {
|
|
266
|
-
await controller.addOrToggleCommentAtLine(position, undefined);
|
|
267
|
-
}
|
|
268
|
-
catch (e) {
|
|
269
|
-
notificationService.error(( localize(4876, "The cursor must be within a commenting range to add a comment")));
|
|
270
|
-
}
|
|
265
|
+
await controller.addOrToggleCommentAtLine(position, undefined);
|
|
271
266
|
}
|
|
272
267
|
});
|
|
273
268
|
registerAction2(class extends Action2 {
|
|
@@ -275,11 +270,11 @@ registerAction2(class extends Action2 {
|
|
|
275
270
|
super({
|
|
276
271
|
id: CommentCommandId.FocusCommentOnCurrentLine,
|
|
277
272
|
title: {
|
|
278
|
-
value: ( localize(
|
|
273
|
+
value: ( localize(5019, "Focus Comment on Current Line")),
|
|
279
274
|
original: 'Focus Comment on Current Line'
|
|
280
275
|
},
|
|
281
276
|
category: {
|
|
282
|
-
value: ( localize(
|
|
277
|
+
value: ( localize(5013, "Comments")),
|
|
283
278
|
original: 'Comments'
|
|
284
279
|
},
|
|
285
280
|
f1: true,
|
|
@@ -311,7 +306,7 @@ registerAction2(class extends Action2 {
|
|
|
311
306
|
error = true;
|
|
312
307
|
}
|
|
313
308
|
if (error) {
|
|
314
|
-
notificationService.error(( localize(
|
|
309
|
+
notificationService.error(( localize(5020, "The cursor must be on a line with a comment to focus the comment")));
|
|
315
310
|
}
|
|
316
311
|
}
|
|
317
312
|
});
|
|
@@ -320,11 +315,11 @@ registerAction2(class extends Action2 {
|
|
|
320
315
|
super({
|
|
321
316
|
id: CommentCommandId.CollapseAll,
|
|
322
317
|
title: {
|
|
323
|
-
value: ( localize(
|
|
318
|
+
value: ( localize(5021, "Collapse All Comments")),
|
|
324
319
|
original: 'Collapse All Comments'
|
|
325
320
|
},
|
|
326
321
|
category: {
|
|
327
|
-
value: ( localize(
|
|
322
|
+
value: ( localize(5013, "Comments")),
|
|
328
323
|
original: 'Comments'
|
|
329
324
|
},
|
|
330
325
|
menu: [{
|
|
@@ -342,11 +337,11 @@ registerAction2(class extends Action2 {
|
|
|
342
337
|
super({
|
|
343
338
|
id: CommentCommandId.ExpandAll,
|
|
344
339
|
title: {
|
|
345
|
-
value: ( localize(
|
|
340
|
+
value: ( localize(5022, "Expand All Comments")),
|
|
346
341
|
original: 'Expand All Comments'
|
|
347
342
|
},
|
|
348
343
|
category: {
|
|
349
|
-
value: ( localize(
|
|
344
|
+
value: ( localize(5013, "Comments")),
|
|
350
345
|
original: 'Comments'
|
|
351
346
|
},
|
|
352
347
|
menu: [{
|
|
@@ -364,11 +359,11 @@ registerAction2(class extends Action2 {
|
|
|
364
359
|
super({
|
|
365
360
|
id: CommentCommandId.ExpandUnresolved,
|
|
366
361
|
title: {
|
|
367
|
-
value: ( localize(
|
|
362
|
+
value: ( localize(5023, "Expand Unresolved Comments")),
|
|
368
363
|
original: 'Expand Unresolved Comments'
|
|
369
364
|
},
|
|
370
365
|
category: {
|
|
371
|
-
value: ( localize(
|
|
366
|
+
value: ( localize(5013, "Comments")),
|
|
372
367
|
original: 'Comments'
|
|
373
368
|
},
|
|
374
369
|
menu: [{
|
|
@@ -399,8 +394,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
399
394
|
primary: KeyCode.Escape,
|
|
400
395
|
secondary: [KeyMod.Shift | KeyCode.Escape],
|
|
401
396
|
when: ( ContextKeyExpr.or(ctxCommentEditorFocused, CommentContextKeys.commentFocused)),
|
|
402
|
-
handler: (accessor, args) => {
|
|
397
|
+
handler: async (accessor, args) => {
|
|
403
398
|
const activeCodeEditor = accessor.get(ICodeEditorService).getFocusedCodeEditor();
|
|
399
|
+
const keybindingService = accessor.get(IKeybindingService);
|
|
400
|
+
await keybindingService.enableKeybindingHoldMode(CommentCommandId.Hide);
|
|
404
401
|
if (activeCodeEditor instanceof SimpleCommentEditor) {
|
|
405
402
|
activeCodeEditor.getParentThread().collapse();
|
|
406
403
|
}
|
|
@@ -425,7 +422,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
425
422
|
error = true;
|
|
426
423
|
}
|
|
427
424
|
if (error) {
|
|
428
|
-
notificationService.error(( localize(
|
|
425
|
+
notificationService.error(( localize(5020, "The cursor must be on a line with a comment to focus the comment")));
|
|
429
426
|
}
|
|
430
427
|
}
|
|
431
428
|
}
|
|
@@ -7,7 +7,7 @@ import { ScrollType } from '@codingame/monaco-vscode-api/vscode/vs/editor/common
|
|
|
7
7
|
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language';
|
|
8
8
|
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model';
|
|
9
9
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
10
|
-
import { applyTextEditorOptions } from '@codingame/monaco-vscode-
|
|
10
|
+
import { applyTextEditorOptions } from '@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common/vscode/vs/workbench/common/editor/editorOptions';
|
|
11
11
|
import { SimpleCommentEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/comments/browser/simpleCommentEditor';
|
|
12
12
|
|
|
13
13
|
let CommentsInputContentProvider = class CommentsInputContentProvider extends Disposable {
|