chat: fix bad wrapping of new tool UI (#247782)

Fixes #247778
This commit is contained in:
Connor Peet
2025-04-29 14:31:19 -07:00
committed by GitHub
parent 8624e1936d
commit 7dd1f0558c
2 changed files with 14 additions and 3 deletions

View File

@@ -87,8 +87,10 @@ export class ChatCollapsibleInputOutputContentPart extends Disposable {
super();
const elements = dom.h('.chat-confirmation-widget@root', [
dom.h('.chat-confirmation-widget-title.expandable@title', [
dom.h('.chat-confirmation-widget-title.expandable@titleContainer', [
dom.h('.chat-confirmation-widget-expando@expando'),
dom.h('.chat-confirmation-widget-title-inner@title'),
dom.h('.chat-confirmation-widget-title-icon@icon'),
]),
dom.h('.chat-confirmation-widget-message@message'),
]);
@@ -112,7 +114,7 @@ export class ChatCollapsibleInputOutputContentPart extends Disposable {
? ThemeIcon.asCSSSelector(Codicon.check)
: ThemeIcon.asCSSSelector(ThemeIcon.modify(Codicon.loading, 'spin'))
);
elements.title.appendChild(check.root);
elements.icon.appendChild(check.root);
const expanded = this._expanded = observableValue(this, initiallyExpanded);
const btn = this._register(new Button(elements.expando, {}));
@@ -133,7 +135,7 @@ export class ChatCollapsibleInputOutputContentPart extends Disposable {
};
this._register(btn.onDidClick(toggle));
this._register(dom.addDisposableListener(elements.title, dom.EventType.CLICK, toggle));
this._register(dom.addDisposableListener(elements.titleContainer, dom.EventType.CLICK, toggle));
elements.message.appendChild(this.createMessageContents());
}

View File

@@ -36,6 +36,15 @@
background: var(--vscode-toolbar-hoverBackground);
}
.chat-confirmation-widget .chat-confirmation-widget-title-inner {
flex-grow: 1;
flex-basis: 0;
}
.chat-confirmation-widget .chat-confirmation-widget-title-icon {
line-height: 0;
}
.chat-confirmation-widget .chat-confirmation-widget-title p,
.chat-confirmation-widget .chat-confirmation-widget-title .rendered-markdown {
display: inline;