@@ -44,7 +44,7 @@ import { ToggleTitleBarConfigAction } from '../../../../browser/parts/titlebar/t
4444import { ActiveEditorContext , IsCompactTitleBarContext } from '../../../../common/contextkeys.js' ;
4545import { IWorkbenchContribution } from '../../../../common/contributions.js' ;
4646import { IViewDescriptorService , ViewContainerLocation } from '../../../../common/views.js' ;
47- import { IEditorGroupsService } from '../../../../services/editor/common/editorGroupsService.js' ;
47+ import { GroupDirection , IEditorGroupsService } from '../../../../services/editor/common/editorGroupsService.js' ;
4848import { ACTIVE_GROUP , AUX_WINDOW_GROUP , IEditorService } from '../../../../services/editor/common/editorService.js' ;
4949import { IHostService } from '../../../../services/host/browser/host.js' ;
5050import { IWorkbenchLayoutService , Parts } from '../../../../services/layout/browser/layoutService.js' ;
@@ -909,7 +909,7 @@ export function registerChatActions() {
909909 super ( {
910910 id : `workbench.action.chat.newChatInNewWindow` ,
911911 title : localize2 ( 'chatSessions.openNewChatInNewWindow' , 'Open New Chat in New Window' ) ,
912- f1 : true ,
912+ f1 : false ,
913913 category : CHAT_CATEGORY ,
914914 precondition : ChatContextKeys . enabled ,
915915 menu : {
@@ -938,7 +938,7 @@ export function registerChatActions() {
938938 super ( {
939939 id : `workbench.action.chat.newChatInNewMaximizedWindow` ,
940940 title : localize2 ( 'chatSessions.openNewChatInNewMaximizedWindow' , 'Open New Chat in Maximized Window' ) ,
941- f1 : true ,
941+ f1 : false ,
942942 category : CHAT_CATEGORY ,
943943 precondition : ChatContextKeys . enabled ,
944944 menu : {
@@ -967,7 +967,7 @@ export function registerChatActions() {
967967 super ( {
968968 id : `workbench.action.chat.newChatInSideBar` ,
969969 title : localize2 ( 'chatSessions.openNewChatInSideBar' , 'Open New Chat in Side Bar' ) ,
970- f1 : true ,
970+ f1 : false ,
971971 category : CHAT_CATEGORY ,
972972 precondition : ChatContextKeys . enabled ,
973973 menu : {
@@ -998,6 +998,39 @@ export function registerChatActions() {
998998 }
999999 } ) ;
10001000
1001+ registerAction2 ( class OpenChatInNewEditorGroupAction extends Action2 {
1002+ constructor ( ) {
1003+ super ( {
1004+ id : 'workbench.action.chat.openInNewEditorGroup' ,
1005+ title : localize2 ( 'chat.openInNewEditorGroup.label' , "Open Chat in New Editor Group" ) ,
1006+ category : CHAT_CATEGORY ,
1007+ precondition : ChatContextKeys . enabled ,
1008+ f1 : false ,
1009+ menu : {
1010+ id : MenuId . ViewTitle ,
1011+ group : 'submenu' ,
1012+ order : 1 ,
1013+ when : ContextKeyExpr . equals ( 'view' , `${ VIEWLET_ID } .local` ) ,
1014+ }
1015+ } ) ;
1016+ }
1017+
1018+ async run ( accessor : ServicesAccessor , ...args : any [ ] ) {
1019+ const editorService = accessor . get ( IEditorService ) ;
1020+ const editorGroupService = accessor . get ( IEditorGroupsService ) ;
1021+
1022+ // Create a new editor group to the right
1023+ const newGroup = editorGroupService . addGroup ( editorGroupService . activeGroup , GroupDirection . RIGHT ) ;
1024+ editorGroupService . activateGroup ( newGroup ) ;
1025+
1026+ // Open a new chat editor in the new group
1027+ await editorService . openEditor (
1028+ { resource : ChatEditorInput . getNewEditorUri ( ) , options : { pinned : true } } ,
1029+ newGroup . id
1030+ ) ;
1031+ }
1032+ } ) ;
1033+
10011034 registerAction2 ( class ChatAddAction extends Action2 {
10021035 constructor ( ) {
10031036 super ( {
0 commit comments