Skip to content

Commit 388d8bf

Browse files
osortegaCopilot
andcommitted
Add Agents app banner to welcome page footer
Add a banner button in the welcome page footer that allows users to try out the new Agents app. The banner includes: - A button with the agent icon and 'Try out the new Agents app' label that executes the workbench.action.openAgentsWindow command - A 'Learn more' link that opens code.visualstudio.com - Telemetry logging for both actions - CSS styling for the banner with proper theming integration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 47a6692 commit 388d8bf

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ export class GettingStartedPage extends EditorPane {
491491
}
492492
break;
493493
}
494+
case 'openAgentsWindow': {
495+
this.commandService.executeCommand('workbench.action.openAgentsWindow');
496+
break;
497+
}
494498
case 'openLink': {
495499
this.openerService.open(argument);
496500
break;
@@ -931,7 +935,27 @@ export class GettingStartedPage extends EditorPane {
931935
const recentList = this.buildRecentlyOpenedList();
932936
const gettingStartedList = this.buildGettingStartedWalkthroughsList();
933937

938+
const learnMoreLink = $('a.learn-more-link', {}, localize('welcomePage.learnMore', "Learn more"));
939+
this.categoriesSlideDisposables.add(addDisposableListener(learnMoreLink, 'click', (e) => {
940+
e.stopPropagation();
941+
e.preventDefault();
942+
this.telemetryService.publicLog2<GettingStartedActionEvent, GettingStartedActionClassification>('gettingStarted.ActionExecuted', { command: 'openAgentsLearnMore', argument: undefined, walkthroughId: this.currentWalkthrough?.id });
943+
this.openerService.open('https://code.visualstudio.com');
944+
}));
945+
946+
const agentsBannerButton = $('button.getting-started-category.agents-banner', {
947+
'x-dispatch': 'openAgentsWindow',
948+
title: localize('welcomePage.tryAgentsApp', "Try out the new Agents app"),
949+
},
950+
$('.main-content', {},
951+
$('.codicon.codicon-agent.icon-widget'),
952+
$('h3.category-title.max-lines-3', {}, localize('welcomePage.tryAgentsAppLabel', "Try out the new Agents app")),
953+
learnMoreLink,
954+
),
955+
);
956+
934957
const footer = $('.footer', {},
958+
agentsBannerButton,
935959
$('p.showOnStartup', {},
936960
showOnStartupCheckbox.domNode,
937961
showOnStartupLabel,

src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,33 @@
916916
margin: 0;
917917
}
918918

919+
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories > .gettingStartedCategoriesContainer > .footer > .agents-banner {
920+
padding: 8px 10px;
921+
margin-bottom: 30px;
922+
border-radius: 50px;
923+
display: flex;
924+
align-items: center;
925+
justify-content: center;
926+
width: auto;
927+
}
928+
929+
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories > .gettingStartedCategoriesContainer > .footer > .agents-banner .main-content {
930+
display: flex;
931+
align-items: center;
932+
justify-content: center;
933+
}
934+
935+
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories > .gettingStartedCategoriesContainer > .footer > .agents-banner .learn-more-link {
936+
margin-left: 10px;
937+
color: var(--vscode-textLink-foreground);
938+
cursor: pointer;
939+
text-decoration: var(--text-link-decoration);
940+
}
941+
942+
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories > .gettingStartedCategoriesContainer > .footer > .agents-banner .learn-more-link:hover {
943+
color: var(--vscode-textLink-activeForeground);
944+
}
945+
919946
.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlideCategories > .gettingStartedCategoriesContainer .index-list.start-container {
920947
min-height: 156px;
921948
margin-bottom: 16px;

0 commit comments

Comments
 (0)