Skip to content

Commit 6f28a61

Browse files
authored
polish chat terminal title style when expanded (#280395)
fixes #280393
1 parent ccb6e6b commit 6f28a61

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
padding: 5px 0px;
142142
}
143143

144-
.chat-terminal-content-title.expanded {
144+
.chat-terminal-content-part .chat-terminal-content-title.chat-terminal-content-title-no-bottom-radius {
145145
border-bottom-left-radius: 0px;
146146
border-bottom-right-radius: 0px;
147147
border-bottom: 0;

src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart
191191

192192
private readonly _actionBar: ActionBar;
193193

194+
private readonly _titleElement: HTMLElement;
194195
private readonly _outputView: ChatTerminalToolOutputSection;
195196
private readonly _terminalOutputContextKey: IContextKey<boolean>;
196197
private _terminalSessionRegistration: IDisposable | undefined;
@@ -256,6 +257,7 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart
256257
]),
257258
h('.chat-terminal-content-message@message')
258259
]);
260+
this._titleElement = elements.title;
259261

260262
const command = terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
261263
this._terminalOutputContextKey = ChatContextKeys.inChatTerminalToolOutput.bindTo(this._contextKeyService);
@@ -542,9 +544,11 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart
542544

543545
private async _toggleOutput(expanded: boolean): Promise<boolean> {
544546
const didChange = await this._outputView.toggle(expanded);
545-
this._showOutputAction.value?.syncPresentation(this._outputView.isExpanded);
547+
const isExpanded = this._outputView.isExpanded;
548+
this._titleElement.classList.toggle('chat-terminal-content-title-no-bottom-radius', isExpanded);
549+
this._showOutputAction.value?.syncPresentation(isExpanded);
546550
if (didChange) {
547-
expandedStateByInvocation.set(this.toolInvocation, this._outputView.isExpanded);
551+
expandedStateByInvocation.set(this.toolInvocation, isExpanded);
548552
}
549553
return didChange;
550554
}

0 commit comments

Comments
 (0)