From ddbcb6cfae2f191a6edfba722a885ac78bdcf876 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sat, 22 Mar 2025 23:04:55 -0700 Subject: [PATCH] Fix bad chat input layout after adding context that wraps (#244351) From #244327 --- src/vs/workbench/contrib/chat/browser/chatInputPart.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts index 38fa74e6002..4cf63a6cc1e 100644 --- a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts @@ -1031,7 +1031,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge private renderAttachedContext() { const container = this.attachedContextContainer; - const oldHeight = container.offsetHeight; + // Note- can't measure attachedContextContainer, because it has `display: contents`, so measure the parent to check for height changes + const oldHeight = this.attachmentsContainer.offsetHeight; const store = new DisposableStore(); this.attachedContextDisposables.value = store; @@ -1075,7 +1076,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge })); } - if (oldHeight !== container.offsetHeight) { + if (oldHeight !== this.attachmentsContainer.offsetHeight) { this._onDidChangeHeight.fire(); } }