Skip to content

Commit 5c98072

Browse files
authored
Chat view in broken state if I log out (fix microsoft/vscode-copilot#10300) (microsoft#234086)
1 parent 3413ae9 commit 5c98072

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,15 @@ export class ChatViewWelcomeController extends Disposable {
5757
return;
5858
}
5959

60+
this.enabled = enabled;
6061
this.enabledDisposables.clear();
62+
6163
if (!enabled) {
6264
this.container.classList.toggle('chat-view-welcome-visible', false);
6365
this.renderDisposables.clear();
6466
return;
6567
}
6668

67-
this.enabled = true;
6869
const descriptors = chatViewsWelcomeRegistry.get();
6970
if (descriptors.length) {
7071
this.render(descriptors);

src/vs/workbench/contrib/chat/common/chatServiceImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ export class ChatService extends Disposable implements IChatService {
952952
}
953953

954954
public hasSessions(): boolean {
955-
return !!Object.values(this._persistedSessions);
955+
return Object.values(this._persistedSessions).length > 0;
956956
}
957957

958958
transferChatSession(transferredSessionData: IChatTransferredSessionData, toWorkspace: URI): void {

0 commit comments

Comments
 (0)