mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
Switch chat view immediately when clicking cloud session (#290191)
Just detect this loading state with no model and don't show the sessions control in that scenario Fix #289904
This commit is contained in:
@@ -784,14 +784,12 @@ export class ChatWidget extends Disposable implements IChatWidget {
|
||||
* Updates the DOM visibility of welcome view and chat list immediately
|
||||
*/
|
||||
private updateChatViewVisibility(): void {
|
||||
if (!this.viewModel) {
|
||||
return;
|
||||
if (this.viewModel) {
|
||||
const numItems = this.viewModel.getItems().length;
|
||||
dom.setVisibility(numItems === 0, this.welcomeMessageContainer);
|
||||
dom.setVisibility(numItems !== 0, this.listContainer);
|
||||
}
|
||||
|
||||
const numItems = this.viewModel.getItems().length;
|
||||
dom.setVisibility(numItems === 0, this.welcomeMessageContainer);
|
||||
dom.setVisibility(numItems !== 0, this.listContainer);
|
||||
|
||||
this._onDidChangeEmptyState.fire();
|
||||
}
|
||||
|
||||
|
||||
@@ -461,9 +461,9 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
|
||||
// Sessions control: stacked
|
||||
if (this.sessionsViewerOrientation === AgentSessionsViewerOrientation.Stacked) {
|
||||
newSessionsContainerVisible =
|
||||
!!this.chatEntitlementService.sentiment.installed && // chat is installed (otherwise make room for terms and welcome)
|
||||
(!this._widget || this._widget?.isEmpty()) && // chat widget empty
|
||||
!this.welcomeController?.isShowingWelcome.get(); // welcome not showing
|
||||
!!this.chatEntitlementService.sentiment.installed && // chat is installed (otherwise make room for terms and welcome)
|
||||
(!this._widget || (this._widget.isEmpty() && !!this._widget.viewModel)) && // chat widget empty (but not when model is loading)
|
||||
!this.welcomeController?.isShowingWelcome.get(); // welcome not showing
|
||||
}
|
||||
|
||||
// Sessions control: sidebar
|
||||
|
||||
Reference in New Issue
Block a user