Skip to content

Commit

Permalink
Show welcome view if chat participant is registered (#229007)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyaus committed Sep 19, 2024
1 parent 88056f2 commit 8d1bb84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/contrib/chat/browser/chatViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { CHAT_PROVIDER_ID } from '../common/chatParticipantContribTypes.js';
import { ChatModelInitState, IChatModel } from '../common/chatModel.js';
import { IChatService } from '../common/chatService.js';
import { IChatViewTitleActionContext } from './actions/chatActions.js';
import { CONTEXT_CHAT_PANEL_PARTICIPANT_REGISTERED } from '../common/chatContextKeys.js';

interface IViewPaneState extends IChatViewState {
sessionId?: string;
Expand Down Expand Up @@ -120,7 +121,8 @@ export class ChatViewPane extends ViewPane {
}

const noPersistedSessions = !this.chatService.hasSessions();
return this.didUnregisterProvider || !this._widget?.viewModel && (noPersistedSessions || this.didProviderRegistrationFail);
const chatParticipantRegistered = this.contextKeyService.contextMatchesRules(CONTEXT_CHAT_PANEL_PARTICIPANT_REGISTERED);
return this.didUnregisterProvider || !this._widget?.viewModel && (noPersistedSessions || this.didProviderRegistrationFail) || chatParticipantRegistered;
}

private getSessionId() {
Expand Down

0 comments on commit 8d1bb84

Please sign in to comment.