Skip to content

chat - when setup without dialog is done, show welcome #251230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
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
8 changes: 3 additions & 5 deletions src/vs/workbench/contrib/chat/browser/chatSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ class SetupAgent extends Disposable implements IChatAgentImplementation {
private async doInvokeWithSetup(request: IChatAgentRequest, progress: (part: IChatProgress) => void, chatService: IChatService, languageModelsService: ILanguageModelsService, chatWidgetService: IChatWidgetService, chatAgentService: IChatAgentService, languageModelToolsService: ILanguageModelToolsService): Promise<IChatAgentResult> {
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: CHAT_SETUP_ACTION_ID, from: 'chat' });

const requestModel = chatWidgetService.getWidgetBySessionId(request.sessionId)?.viewModel?.model.getRequests().at(-1);
const widget = chatWidgetService.getWidgetBySessionId(request.sessionId);
const requestModel = widget?.viewModel?.model.getRequests().at(-1);

const setupListener = Event.runAndSubscribe(this.controller.value.onDidChange, (() => {
switch (this.controller.value.step) {
Expand Down Expand Up @@ -422,10 +423,7 @@ class SetupAgent extends Disposable implements IChatAgentImplementation {
if (typeof result?.success === 'boolean') {
if (result.success) {
if (result.dialogSkipped) {
progress({
kind: 'markdownContent',
content: new MarkdownString(localize('copilotSetupSuccess', "Copilot setup finished successfully."))
});
widget?.clear(); // make room for the Chat welcome experience
} else if (requestModel) {
let newRequest = this.replaceAgentInRequestModel(requestModel, chatAgentService); // Replace agent part with the actual Copilot agent...
newRequest = this.replaceToolInRequestModel(newRequest); // ...then replace any tool parts with the actual Copilot tools
Expand Down
Loading