Merge pull request #306454 from microsoft/copilot/marvellous-marmot

sessions: fix welcome page chat input collapsing on first keystroke
This commit is contained in:
Osvaldo Ortega
2026-03-30 14:04:59 -07:00
committed by GitHub

View File

@@ -65,6 +65,11 @@ const configurationKey = 'workbench.startupEditor';
const MAX_SESSIONS = 6;
const MAX_REPO_PICKS = 10;
const MAX_WALKTHROUGHS = 10;
const WELCOME_CHAT_INPUT_LAYOUT_HEIGHT = 150;
const WELCOME_CHAT_INPUT_RESERVED_LIST_HEIGHT = 50;
const WELCOME_CHAT_INPUT_RESERVED_CHROME_HEIGHT = 72;
// Mirror ChatWidget's compact-surface sizing so the hidden list reservation and input chrome do not collapse the editor.
const WELCOME_CHAT_INPUT_MAX_HEIGHT_OVERRIDE = WELCOME_CHAT_INPUT_LAYOUT_HEIGHT + WELCOME_CHAT_INPUT_RESERVED_LIST_HEIGHT + WELCOME_CHAT_INPUT_RESERVED_CHROME_HEIGHT;
/**
* - visibleDurationMs: Do they close it right away or leave it open (#3)
@@ -804,9 +809,8 @@ export class AgentSessionsWelcomePage extends EditorPane {
}
const chatWidth = Math.min(800, this.lastDimension.width - 80);
// Use a reasonable height for the input part - the CSS will hide the list area
const inputHeight = 150;
this.chatWidget.layout(inputHeight, chatWidth);
this.chatWidget.setInputPartMaxHeightOverride(WELCOME_CHAT_INPUT_MAX_HEIGHT_OVERRIDE);
this.chatWidget.layout(WELCOME_CHAT_INPUT_LAYOUT_HEIGHT, chatWidth);
}
private layoutSessionsControl(): void {