Skip to content

Commit 21d13f4

Browse files
authored
fix: avoid extra gaps between attachments in chat input part (microsoft#242497)
1 parent c7a5cfe commit 21d13f4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
993993

994994
const attachments = [...this.attachmentModel.attachments.entries()];
995995
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+
996998
if (!attachments.length) {
997999
this._indexOfLastAttachedContextDeletedWithKeyboard = -1;
9981000
}
@@ -1411,6 +1413,8 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
14111413

14121414
async renderChatRelatedFiles(chatEditingSession: IChatEditingSession, anchor: HTMLElement) {
14131415
dom.clearNode(anchor);
1416+
dom.setVisibility(Boolean(chatEditingSession.workingSet.size), anchor);
1417+
14141418
const hoverDelegate = getDefaultHoverDelegate('element');
14151419
for (const [uri, metadata] of chatEditingSession.workingSet) {
14161420
if (metadata.state !== WorkingSetEntryState.Suggested) {

src/vs/workbench/contrib/chat/browser/media/chat.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ have to be updated for changes to the rules above, or to support more deeply nes
700700
flex-wrap: wrap;
701701
align-items: center;
702702
gap: 4px;
703-
width: 100%;
703+
max-width: 100%;
704704
}
705705

706706
.chat-related-files .monaco-button-dropdown .monaco-text-button {
@@ -1193,7 +1193,7 @@ have to be updated for changes to the rules above, or to support more deeply nes
11931193
flex-wrap: wrap;
11941194
cursor: default;
11951195
gap: 4px;
1196-
width: 100%;
1196+
max-width: 100%;
11971197
}
11981198

11991199
.interactive-session .interactive-input-part.compact .chat-attached-context {

0 commit comments

Comments
 (0)