Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,13 @@ export class ChatTerminalToolProgressPart extends BaseChatToolInvocationSubPart
() => this._terminalData.terminalCommandOutput,
() => this._commandText,
() => this._terminalData.terminalTheme,
!!this._terminalData.terminalToolSessionId,
));
elements.container.append(this._outputView.domNode);
// Only append the output section if there's a terminal session or stored output;
// display-only invocations with no output don't need the output area at all
if (this._terminalData.terminalToolSessionId || this._terminalData.terminalCommandOutput) {
elements.container.append(this._outputView.domNode);
}
this._register(this._outputView.onDidFocus(() => this._handleOutputFocus()));
this._register(this._outputView.onDidBlur(e => this._handleOutputBlur(e)));
this._register(toDisposable(() => this._handleDispose()));
Expand Down Expand Up @@ -1039,6 +1044,7 @@ class ChatTerminalToolOutputSection extends Disposable {
private readonly _getTerminalCommandOutput: () => IChatTerminalToolInvocationData['terminalCommandOutput'] | undefined,
private readonly _getCommandText: () => string,
private readonly _getStoredTheme: () => IChatTerminalToolInvocationData['terminalTheme'] | undefined,
private readonly _hasTerminalSession: boolean,
@IAccessibleViewService private readonly _accessibleViewService: IAccessibleViewService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@ITerminalConfigurationService private readonly _terminalConfigurationService: ITerminalConfigurationService,
Expand Down Expand Up @@ -1219,6 +1225,10 @@ class ChatTerminalToolOutputSection extends Disposable {
return;
}

if (!this._hasTerminalSession) {
return;
}

this._renderUnavailableMessage(liveTerminalInstance);
}

Expand Down
Loading