agent sessions - more tweaks to sizing for side by side (#286491)

This commit is contained in:
Benjamin Pasero
2026-01-08 09:40:47 +01:00
committed by GitHub
parent 5107de3a4a
commit 2893b0ec8a

View File

@@ -732,7 +732,8 @@ abstract class UpdateChatViewWidthAction extends Action2 {
let currentSize = layoutService.getSize(part);
const chatViewDefaultWidth = 300;
const sideBySideMinWidth = (chatViewDefaultWidth * 2) + 1; // account for possible theme border
const sessionsViewDefaultWidth = chatViewDefaultWidth;
const sideBySideMinWidth = chatViewDefaultWidth + sessionsViewDefaultWidth + 1; // account for possible theme border
if (
(newOrientation === AgentSessionsViewerOrientation.SideBySide && currentSize.width >= sideBySideMinWidth) || // already wide enough to show side by side
@@ -750,7 +751,7 @@ abstract class UpdateChatViewWidthAction extends Action2 {
if (newOrientation === AgentSessionsViewerOrientation.SideBySide) {
newWidth = Math.max(sideBySideMinWidth, lastWidthForOrientation || Math.round(layoutService.mainContainerDimension.width / 2));
} else {
newWidth = lastWidthForOrientation || chatViewDefaultWidth;
newWidth = lastWidthForOrientation || Math.max(chatViewDefaultWidth, currentSize.width - sessionsViewDefaultWidth);
}
layoutService.setSize(part, { width: newWidth, height: currentSize.height });