mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-06 07:35:52 +01:00
* Agent sessions: make room for chat input when space is limited (fix #281053) * cleanup * fix * cleanup
This commit is contained in:
@@ -473,6 +473,8 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
||||
|
||||
//#region Chat Control
|
||||
|
||||
private static readonly MIN_CHAT_WIDGET_HEIGHT = 120;
|
||||
|
||||
private _widget!: ChatWidget;
|
||||
get widget(): ChatWidget { return this._widget; }
|
||||
|
||||
@@ -779,9 +781,15 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
||||
}
|
||||
|
||||
// Ensure visibility is in sync before we layout
|
||||
this.updateSessionsControlVisibility();
|
||||
const { visible: sessionsContainerVisible } = this.updateSessionsControlVisibility();
|
||||
if (!sessionsContainerVisible) {
|
||||
return { heightReduction: 0, widthReduction: 0 };
|
||||
}
|
||||
|
||||
const availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight - this.sessionsLinkContainer.offsetHeight;
|
||||
let availableSessionsHeight = height - this.sessionsTitleContainer.offsetHeight - this.sessionsLinkContainer.offsetHeight;
|
||||
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
||||
availableSessionsHeight -= ChatViewPane.MIN_CHAT_WIDGET_HEIGHT; // always reserve some space for chat input
|
||||
}
|
||||
|
||||
// Show as sidebar
|
||||
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.SideBySide) {
|
||||
|
||||
Reference in New Issue
Block a user