@@ -110,11 +110,9 @@ abstract class NavigateAction extends Action2 {
110
110
111
111
abstract class AcceptDiscardAction extends Action2 {
112
112
113
- constructor ( readonly accept : boolean ) {
113
+ constructor ( id : string , readonly accept : boolean ) {
114
114
super ( {
115
- id : accept
116
- ? 'chatEditor.action.accept'
117
- : 'chatEditor.action.reject' ,
115
+ id,
118
116
title : accept
119
117
? localize2 ( 'accept' , 'Accept Chat Edit' )
120
118
: localize2 ( 'discard' , 'Discard Chat Edit' ) ,
@@ -168,6 +166,24 @@ abstract class AcceptDiscardAction extends Action2 {
168
166
}
169
167
}
170
168
169
+ export class AcceptAction extends AcceptDiscardAction {
170
+
171
+ static readonly ID = 'chatEditor.action.accept' ;
172
+
173
+ constructor ( ) {
174
+ super ( AcceptAction . ID , true ) ;
175
+ }
176
+ }
177
+
178
+ export class RejectAction extends AcceptDiscardAction {
179
+
180
+ static readonly ID = 'chatEditor.action.reject' ;
181
+
182
+ constructor ( ) {
183
+ super ( RejectAction . ID , false ) ;
184
+ }
185
+ }
186
+
171
187
class UndoHunkAction extends EditorAction2 {
172
188
constructor ( ) {
173
189
super ( {
@@ -218,8 +234,8 @@ class OpenDiffFromHunkAction extends EditorAction2 {
218
234
export function registerChatEditorActions ( ) {
219
235
registerAction2 ( class NextAction extends NavigateAction { constructor ( ) { super ( true ) ; } } ) ;
220
236
registerAction2 ( class PrevAction extends NavigateAction { constructor ( ) { super ( false ) ; } } ) ;
221
- registerAction2 ( class AcceptAction extends AcceptDiscardAction { constructor ( ) { super ( true ) ; } } ) ;
222
- registerAction2 ( class RejectAction extends AcceptDiscardAction { constructor ( ) { super ( false ) ; } } ) ;
237
+ registerAction2 ( AcceptAction ) ;
238
+ registerAction2 ( RejectAction ) ;
223
239
registerAction2 ( UndoHunkAction ) ;
224
240
registerAction2 ( OpenDiffFromHunkAction ) ;
225
241
}
0 commit comments