Skip to content

Commit 8d53e80

Browse files
authored
fix: render chat implicit context widget even if there are no real attachments (microsoft#242574)
1 parent 5a2cf38 commit 8d53e80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
992992
const hoverDelegate = store.add(createInstantHoverDelegate());
993993

994994
const attachments = [...this.attachmentModel.attachments.entries()];
995-
dom.setVisibility(Boolean(attachments.length) || (this.addFilesToolbar && !this.addFilesToolbar.isEmpty()) || Boolean(this.implicitContext?.value) || !this.instructionAttachmentsPart.empty, this.attachmentsContainer);
996-
dom.setVisibility(Boolean(attachments.length), this.attachedContextContainer);
997-
995+
const hasAttachments = Boolean(attachments.length) || Boolean(this.implicitContext?.value) || !this.instructionAttachmentsPart.empty;
996+
dom.setVisibility(Boolean(hasAttachments || (this.addFilesToolbar && !this.addFilesToolbar.isEmpty())), this.attachmentsContainer);
997+
dom.setVisibility(hasAttachments, this.attachedContextContainer);
998998
if (!attachments.length) {
999999
this._indexOfLastAttachedContextDeletedWithKeyboard = -1;
10001000
}

0 commit comments

Comments
 (0)