3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { Codicon } from 'vs/base/common/codicons' ;
7
6
import { localize } from 'vs/nls' ;
8
7
import { Action2 , IAction2Options , MenuId , registerAction2 } from 'vs/platform/actions/common/actions' ;
9
8
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
@@ -28,14 +27,12 @@ const getMoveToEditorChatActionDescriptorForViewTitle = (viewId: string, provide
28
27
original : 'Open In Editor'
29
28
} ,
30
29
category : CHAT_CATEGORY ,
31
- icon : Codicon . arrowLeft ,
32
30
precondition : CONTEXT_PROVIDER_EXISTS ,
33
31
f1 : false ,
34
32
viewId,
35
33
menu : {
36
34
id : MenuId . ViewTitle ,
37
- when : ContextKeyExpr . and ( ContextKeyExpr . equals ( 'view' , viewId ) , ContextKeyExpr . deserialize ( 'config.chat.experimental.moveIcons' ) ) ,
38
- group : 'navigation' ,
35
+ when : ContextKeyExpr . and ( ContextKeyExpr . equals ( 'view' , viewId ) ) ,
39
36
order : 0
40
37
} ,
41
38
} ) ;
@@ -66,15 +63,13 @@ const getMoveToSidebarChatActionDescriptorForViewTitle = (viewId: string, provid
66
63
original : 'Open In Sidebar'
67
64
} ,
68
65
category : CHAT_CATEGORY ,
69
- icon : Codicon . arrowRight ,
70
66
precondition : CONTEXT_PROVIDER_EXISTS ,
71
- f1 : false , // TODO
67
+ f1 : false ,
72
68
viewId,
73
69
menu : [ {
74
70
id : MenuId . EditorTitle ,
75
- group : 'navigation' ,
76
71
order : 0 ,
77
- when : ContextKeyExpr . and ( ActiveEditorContext . isEqualTo ( ChatEditorInput . EditorID ) , ContextKeyExpr . deserialize ( 'config.chat.experimental.moveIcons' ) ) ,
72
+ when : ContextKeyExpr . and ( ActiveEditorContext . isEqualTo ( ChatEditorInput . EditorID ) ) ,
78
73
} ]
79
74
} ) ;
80
75
@@ -135,9 +130,10 @@ export function registerMoveActions() {
135
130
return ;
136
131
}
137
132
133
+ const sessionId = viewModel . sessionId ;
138
134
const view = await viewService . openView ( widget . viewContext . viewId ) as ChatViewPane ;
139
- await editorService . openEditor ( { resource : ChatEditorInput . getNewEditorUri ( ) , options : < IChatEditorOptions > { target : { sessionId : viewModel . sessionId } , pinned : true } } ) ;
140
135
view . clear ( ) ;
136
+ await editorService . openEditor ( { resource : ChatEditorInput . getNewEditorUri ( ) , options : < IChatEditorOptions > { target : { sessionId : sessionId } , pinned : true } } ) ;
141
137
}
142
138
} ) ;
143
139
@@ -151,7 +147,12 @@ export function registerMoveActions() {
151
147
} ,
152
148
category : CHAT_CATEGORY ,
153
149
precondition : CONTEXT_PROVIDER_EXISTS ,
154
- f1 : true
150
+ f1 : true ,
151
+ menu : [ {
152
+ id : MenuId . EditorTitle ,
153
+ order : 0 ,
154
+ when : ContextKeyExpr . and ( ActiveEditorContext . isEqualTo ( ChatEditorInput . EditorID ) ) ,
155
+ } ]
155
156
} ) ;
156
157
}
157
158
0 commit comments