@@ -21,7 +21,7 @@ import { IListService } from '../../../../../platform/list/browser/listService.j
21
21
import { GroupsOrder , IEditorGroupsService } from '../../../../services/editor/common/editorGroupsService.js' ;
22
22
import { IEditorService } from '../../../../services/editor/common/editorService.js' ;
23
23
import { ChatAgentLocation } from '../../common/chatAgents.js' ;
24
- import { CONTEXT_CHAT_LOCATION , CONTEXT_CHAT_REQUEST_IN_PROGRESS , CONTEXT_IN_CHAT_INPUT , CONTEXT_IN_CHAT_SESSION , CONTEXT_ITEM_ID , CONTEXT_LAST_ITEM_ID , CONTEXT_REQUEST , CONTEXT_RESPONSE } from '../../common/chatContextKeys.js' ;
24
+ import { CONTEXT_CHAT_INPUT_HAS_TEXT , CONTEXT_CHAT_LOCATION , CONTEXT_CHAT_REQUEST_IN_PROGRESS , CONTEXT_IN_CHAT_INPUT , CONTEXT_IN_CHAT_SESSION , CONTEXT_ITEM_ID , CONTEXT_LAST_ITEM_ID , CONTEXT_REQUEST , CONTEXT_RESPONSE } from '../../common/chatContextKeys.js' ;
25
25
import { applyingChatEditsContextKey , CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME , chatEditingResourceContextKey , chatEditingWidgetFileStateContextKey , decidedChatEditingResourceContextKey , hasAppliedChatEditsContextKey , hasUndecidedChatEditingResourceContextKey , IChatEditingService , IChatEditingSession , isChatRequestCheckpointed , WorkingSetEntryState } from '../../common/chatEditingService.js' ;
26
26
import { IChatService } from '../../common/chatService.js' ;
27
27
import { isRequestVM , isResponseVM } from '../../common/chatViewModel.js' ;
@@ -181,6 +181,11 @@ export class ChatEditingAcceptAllAction extends Action2 {
181
181
icon : Codicon . check ,
182
182
tooltip : localize ( 'acceptAllEdits' , 'Accept All Edits' ) ,
183
183
precondition : ContextKeyExpr . and ( CONTEXT_CHAT_REQUEST_IN_PROGRESS . negate ( ) , hasUndecidedChatEditingResourceContextKey ) ,
184
+ keybinding : {
185
+ primary : KeyMod . CtrlCmd | KeyCode . Enter ,
186
+ when : ContextKeyExpr . and ( CONTEXT_CHAT_REQUEST_IN_PROGRESS . negate ( ) , hasUndecidedChatEditingResourceContextKey , CONTEXT_CHAT_LOCATION . isEqualTo ( ChatAgentLocation . EditingSession ) , CONTEXT_IN_CHAT_INPUT ) ,
187
+ weight : KeybindingWeight . WorkbenchContrib ,
188
+ } ,
184
189
menu : [
185
190
{
186
191
when : ContextKeyExpr . equals ( 'resourceScheme' , CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME ) ,
@@ -232,6 +237,11 @@ export class ChatEditingDiscardAllAction extends Action2 {
232
237
when : ContextKeyExpr . or ( hasAppliedChatEditsContextKey . negate ( ) , ContextKeyExpr . and ( CONTEXT_CHAT_LOCATION . isEqualTo ( ChatAgentLocation . EditingSession ) , hasUndecidedChatEditingResourceContextKey ) )
233
238
}
234
239
] ,
240
+ keybinding : {
241
+ when : ContextKeyExpr . and ( CONTEXT_CHAT_REQUEST_IN_PROGRESS . negate ( ) , hasUndecidedChatEditingResourceContextKey , CONTEXT_CHAT_LOCATION . isEqualTo ( ChatAgentLocation . EditingSession ) , CONTEXT_IN_CHAT_INPUT , CONTEXT_CHAT_INPUT_HAS_TEXT . negate ( ) ) ,
242
+ weight : KeybindingWeight . WorkbenchContrib ,
243
+ primary : KeyMod . CtrlCmd | KeyCode . Backspace ,
244
+ } ,
235
245
} ) ;
236
246
}
237
247
0 commit comments