@@ -42,6 +42,7 @@ export interface INewEditSessionActionContext {
42
42
}
43
43
44
44
export function registerNewChatActions ( ) {
45
+ // This action was previously used for the editor gutter toolbar, but now ACTION_ID_NEW_CHAT is also used for that scenario
45
46
registerAction2 ( class NewChatEditorAction extends Action2 {
46
47
constructor ( ) {
47
48
super ( {
@@ -50,12 +51,6 @@ export function registerNewChatActions() {
50
51
icon : Codicon . plus ,
51
52
f1 : false ,
52
53
precondition : ChatContextKeys . enabled ,
53
- menu : [ MenuId . EditorTitle , MenuId . CompactWindowEditorTitle ] . map ( id => ( {
54
- id,
55
- group : 'navigation' ,
56
- when : ActiveEditorContext . isEqualTo ( ChatEditorInput . EditorID ) ,
57
- order : 1
58
- } ) )
59
54
} ) ;
60
55
}
61
56
async run ( accessor : ServicesAccessor , ...args : any [ ] ) {
@@ -73,16 +68,24 @@ export function registerNewChatActions() {
73
68
icon : Codicon . plus ,
74
69
precondition : ContextKeyExpr . and ( ChatContextKeys . enabled ) ,
75
70
f1 : true ,
76
- menu : [ {
77
- id : MenuId . ChatContext ,
78
- group : 'z_clear'
79
- } ,
80
- {
81
- id : MenuId . ViewTitle ,
82
- when : ContextKeyExpr . equals ( 'view' , ChatViewId ) ,
83
- group : 'navigation' ,
84
- order : - 1
85
- } ] ,
71
+ menu : [
72
+ {
73
+ id : MenuId . ChatContext ,
74
+ group : 'z_clear'
75
+ } ,
76
+ {
77
+ id : MenuId . ViewTitle ,
78
+ when : ContextKeyExpr . equals ( 'view' , ChatViewId ) ,
79
+ group : 'navigation' ,
80
+ order : - 1
81
+ } ,
82
+ ...[ MenuId . EditorTitle , MenuId . CompactWindowEditorTitle ] . map ( id => ( {
83
+ id,
84
+ group : 'navigation' ,
85
+ when : ActiveEditorContext . isEqualTo ( ChatEditorInput . EditorID ) ,
86
+ order : 1
87
+ } ) )
88
+ ] ,
86
89
keybinding : {
87
90
weight : KeybindingWeight . WorkbenchContrib + 1 ,
88
91
primary : KeyMod . CtrlCmd | KeyCode . KeyN ,
0 commit comments