File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/vs/workbench/contrib/chat/browser/actions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,11 @@ async function withChatView(accessor: ServicesAccessor): Promise<IChatWidget | u
6363 const viewsService = accessor . get ( IViewsService ) ;
6464 const chatWidgetService = accessor . get ( IChatWidgetService ) ;
6565
66- if ( chatWidgetService . lastFocusedWidget ) {
67- return chatWidgetService . lastFocusedWidget ;
66+ const lastFocusedWidget = chatWidgetService . lastFocusedWidget ;
67+ if ( ! lastFocusedWidget || lastFocusedWidget . location === ChatAgentLocation . Panel ) {
68+ return showChatView ( viewsService ) ; // only show chat view if we either have no chat view or its located in view container
6869 }
69- return showChatView ( viewsService ) ;
70+ return lastFocusedWidget ;
7071}
7172
7273abstract class AttachResourceAction extends Action2 {
You can’t perform that action at this time.
0 commit comments