fix: don't try to move chat editing session to a chat editor (#237362)

pull/237365/head^2
Joyce Er 2025-01-06 11:44:04 -08:00 committed by GitHub
parent abe43ed1d5
commit 069a3c1ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ import { IEditorGroupsService } from '../../../../services/editor/common/editorG
import { ACTIVE_GROUP, AUX_WINDOW_GROUP, IEditorService } from '../../../../services/editor/common/editorService.js';
import { IViewsService } from '../../../../services/views/common/viewsService.js';
import { isChatViewTitleActionContext } from '../../common/chatActions.js';
import { ChatAgentLocation } from '../../common/chatAgents.js';
enum MoveToNewLocation {
Editor = 'Editor',
@ -99,7 +100,7 @@ async function executeMoveToAction(accessor: ServicesAccessor, moveTo: MoveToNew
const widget = (_sessionId ? widgetService.getWidgetBySessionId(_sessionId) : undefined)
?? widgetService.lastFocusedWidget;
if (!widget || !('viewId' in widget.viewContext)) {
if (!widget || widget.location !== ChatAgentLocation.Panel) {
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
return;
}