Skip to content

Commit 5b48163

Browse files
authored
chat - consistent aux window treatment (#278563)
1 parent b9963ba commit 5b48163

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ export function registerChatActions() {
11271127
resource: ChatEditorInput.getNewEditorUri(),
11281128
options: {
11291129
pinned: true,
1130-
auxiliary: { compact: false }
1130+
auxiliary: { compact: true, bounds: { width: 800, height: 640 } }
11311131
}
11321132
}, AUX_WINDOW_GROUP);
11331133
}

src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,19 @@ async function executeMoveToAction(accessor: ServicesAccessor, moveTo: MoveToNew
115115
const widgetService = accessor.get(IChatWidgetService);
116116
const editorService = accessor.get(IEditorService);
117117

118+
const auxiliary = { compact: true, bounds: { width: 800, height: 640 } };
119+
118120
const widget = (sessionResource ? widgetService.getWidgetBySessionResource(sessionResource) : undefined)
119121
?? widgetService.lastFocusedWidget;
120122
if (!widget || !widget.viewModel || widget.location !== ChatAgentLocation.Chat) {
121-
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true, auxiliary: { compact: true, bounds: { width: 640, height: 640 } } } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
123+
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true, auxiliary } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
122124
return;
123125
}
124126

125127
const existingWidget = widgetService.getWidgetBySessionResource(widget.viewModel.sessionResource);
126128
if (!existingWidget) {
127129
// Do NOT attempt to open a session that isn't already open since we cannot guarantee its state.
128-
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true, auxiliary: { compact: true, bounds: { width: 640, height: 640 } } } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
130+
await editorService.openEditor({ resource: ChatEditorInput.getNewEditorUri(), options: { pinned: true, auxiliary } }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
129131
return;
130132
}
131133

@@ -135,7 +137,7 @@ async function executeMoveToAction(accessor: ServicesAccessor, moveTo: MoveToNew
135137

136138
await widget.clear();
137139

138-
const options: IChatEditorOptions = { pinned: true, viewState, auxiliary: { compact: true, bounds: { width: 640, height: 640 } } };
140+
const options: IChatEditorOptions = { pinned: true, viewState, auxiliary };
139141
await editorService.openEditor({ resource: resourceToOpen, options }, moveTo === MoveToNewLocation.Window ? AUX_WINDOW_GROUP : ACTIVE_GROUP);
140142
}
141143

src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ export class OpenChatSessionInNewWindowAction extends Action2 {
192192
} else {
193193
const options: IChatEditorOptions = {
194194
ignoreInView: true,
195+
auxiliary: { compact: true, bounds: { width: 800, height: 640 } }
195196
};
196197
await editorService.openEditor({
197198
resource: uri,
198199
options,
199200
}, AUX_WINDOW_GROUP);
200201
}
201-
202202
}
203203
}
204204

0 commit comments

Comments
 (0)