mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
Merge pull request #306454 from microsoft/copilot/marvellous-marmot
sessions: fix welcome page chat input collapsing on first keystroke
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user