Skip to content

Commit 1b22d60

Browse files
authored
Avoid setting a negative padding on the chat welcome view container (microsoft#229996)
The layout here is a bit weird to avoid shifting when followups appear. If the followups wrap, then the layout is messed up because negative padding is not allowed. I might try to simplify this for next month. Fix microsoft/vscode-copilot#8749
1 parent 03442d1 commit 1b22d60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ export class ChatWidget extends Disposable implements IChatWidget {
963963
this.tree.getHTMLElement().style.height = `${listHeight}px`;
964964

965965
// Push the welcome message down so it doesn't change position when followups appear
966-
const followupsOffset = 100 - this.inputPart.followupsHeight;
966+
const followupsOffset = Math.max(100 - this.inputPart.followupsHeight, 0);
967967
this.welcomeMessageContainer.style.height = `${listHeight - followupsOffset}px`;
968968
this.welcomeMessageContainer.style.paddingBottom = `${followupsOffset}px`;
969969
this.renderer.layout(width);

0 commit comments

Comments
 (0)