File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/vs/workbench/contrib/chat/browser/chatEditing Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,6 @@ registerAction2(class RemoveAction extends Action2 {
340
340
item = widget ?. getFocus ( ) ;
341
341
}
342
342
343
-
344
343
if ( ! item ) {
345
344
return ;
346
345
}
@@ -426,6 +425,11 @@ registerAction2(class EditAction extends Action2 {
426
425
f1 : false ,
427
426
category : CHAT_CATEGORY ,
428
427
icon : Codicon . edit ,
428
+ keybinding : {
429
+ primary : KeyCode . Enter ,
430
+ when : ContextKeyExpr . and ( ChatContextKeys . inChatSession , EditorContextKeys . textInputFocus . negate ( ) ) ,
431
+ weight : KeybindingWeight . WorkbenchContrib ,
432
+ } ,
429
433
menu : [
430
434
{
431
435
id : MenuId . ChatMessageTitle ,
@@ -439,15 +443,16 @@ registerAction2(class EditAction extends Action2 {
439
443
440
444
async run ( accessor : ServicesAccessor , ...args : any [ ] ) {
441
445
let item : ChatTreeItem | undefined = args [ 0 ] ;
442
- if ( ! item ) {
443
- return ;
444
- }
445
446
const chatWidgetService = accessor . get ( IChatWidgetService ) ;
446
447
const widget = chatWidgetService . lastFocusedWidget ;
447
448
if ( ! isResponseVM ( item ) && ! isRequestVM ( item ) ) {
448
449
item = widget ?. getFocus ( ) ;
449
450
}
450
451
452
+ if ( ! item ) {
453
+ return ;
454
+ }
455
+
451
456
if ( isRequestVM ( item ) ) {
452
457
widget ?. startEditing ( item . id ) ;
453
458
}
You can’t perform that action at this time.
0 commit comments