Skip to content

Create New Project design improvements#4964

Open
gavin-aguiar wants to merge 12 commits intomicrosoft:mainfrom
gavin-aguiar:gaaguiar/getting_started
Open

Create New Project design improvements#4964
gavin-aguiar wants to merge 12 commits intomicrosoft:mainfrom
gavin-aguiar:gaaguiar/getting_started

Conversation

@gavin-aguiar
Copy link
Copy Markdown
Contributor

Summary

This PR introduces a set of features for the Azure Functions VS Code extension focused on the "Create New Project" and "Run Function App" experiences. All new features are gated behind an opt-in setting (azureFunctions.enableTemplateGallery) and do not affect the existing default experience.


Features

1. Template Gallery (Webview)

A new rich, visual project creation experience that replaces the multi-step Quick Pick wizard with a searchable, filterable template gallery.

  • Rich card-based UI with language badges, category tags, and featured template highlights (accent border + star icon)
  • Filter by language (Python, .NET, TypeScript, JavaScript, Java, Go, PowerShell) and use case (Web APIs, Event Processing, AI & ML, etc.)
  • Full-text search across template names, descriptions, and tags
  • AI-powered generation via "Generate with Copilot" mode — describe what you want and get a project scaffold
  • Opt-in: Enable via azureFunctions.enableTemplateGallery: true in settings

How to enable:

  1. Open Command Palette → Preferences: Open Settings (JSON)
  2. Add "azureFunctions.enableTemplateGallery": true
  3. Run Azure Functions: Create New Project... to see the gallery

Gallery Discovery from Classic Wizard

Even without the setting enabled, users can discover the gallery via a "Browse Template Gallery..." option at the bottom of the classic language selection Quick Pick.

image image

2. Run Function App — Smart Pre-Start Steps

The ▶ Run Function App button now performs runtime-specific setup before launching func start:

Runtime Pre-start steps
Python Create .venv if missing → pip install -r requirements.txtfunc start (with venv activated via pseudoterminal)
Node.js (JS/TS) npm installnpm run build (if build script exists) → func start
.NET dotnet buildfunc start
Other func start directly

Key technical detail: Python projects use a pseudoterminal to prevent the VS Code Python extension from injecting its own venv activation into the running func start process.

Runtime detection: Reads FUNCTIONS_WORKER_RUNTIME from local.settings.json. Falls back to heuristic detection (package.json → Node, requirements.txt → Python, .csproj/.fsproj → .NET) when the setting is missing.

Project root resolution: Walks upward from the active file's directory to find host.json, supporting projects where source files are in subdirectories (e.g., src/index.ts).


3. Template Gallery UI Details

Featured Templates

Popular templates are highlighted with an accent left-border and a gold star icon.

Language Filter Chips

Color-coded filter chips with language-specific colors. Order: All → Python → .NET → TypeScript → JavaScript → Java → Go → PowerShell.


4. Additional Features (in this branch)

  • Smart Deploy (src/commands/deploy/SmartDeploy.ts) — Intelligent deployment with pre-deploy validation
  • Function App Validator (src/commands/validateFunctionApp/FunctionAppValidator.ts) — Project validation checks
  • Copilot Skill Files (resources/skills/) — Contextual guidance for Copilot-assisted development
  • Backup Template Manifest (resources/backupProjectTemplates/manifest.json) — Offline fallback for template metadata

New Settings

Setting Type Default Description
azureFunctions.enableTemplateGallery boolean false Enable the new Template Gallery experience for Create New Project

New Commands

Command Description
azureFunctions.runFunctionApp Smart Run Function App with runtime-specific setup

Files Changed

27 files changed (+7,141 / -19)

New files:

  • src/commands/createNewProject/TemplateGalleryPanel.ts — Webview panel controller
  • src/commands/createNewProject/CloneTemplateStep.ts — Template cloning wizard step
  • src/commands/createNewProject/PostCloneStep.ts — Post-clone setup step
  • src/commands/createNewProject/StartingPointStep.ts — Template vs scratch wizard step
  • src/commands/createNewProject/TemplateListStep.ts — Template list wizard step
  • src/commands/runFunctionApp/RunFunctionApp.ts — Smart Run Function App command
  • src/commands/deploy/SmartDeploy.ts — Smart deployment logic
  • src/commands/validateFunctionApp/FunctionAppValidator.ts — Project validator
  • src/templates/projectTemplates/IProjectTemplate.ts — Template type definitions
  • src/templates/projectTemplates/ProjectTemplateProvider.ts — Template data provider
  • resources/webviews/templateGallery/ — Webview HTML, JS, CSS
  • resources/backupProjectTemplates/manifest.json — Offline template manifest
  • resources/skills/ — Copilot skill files

Modified files:

  • src/commands/createNewProject/createNewProject.ts — Feature flag branching
  • src/commands/createNewProject/NewProjectLanguageStep.ts — Gallery discovery option
  • src/commands/createNewProject/IProjectWizardContext.ts — Extended context interface
  • src/commands/registerCommands.ts — New command registrations
  • src/extension.ts — Extension activation
  • src/extensionVariables.ts — Extension variables
  • src/vsCodeConfig/verifyInitForVSCode.ts — VS Code config verification
  • src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts — Activation config check
  • package.json — Settings, commands, menus, version
  • package.nls.json — Localization strings

Copilot AI review requested due to automatic review settings April 7, 2026 23:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new opt-in “Create New Project” template gallery (webview + template manifest provider) and introduces smarter local workflows (Run Function App pre-start steps, Copilot-based validation, and Smart Deploy) to improve project creation, run, validate, and deploy experiences in the Azure Functions VS Code extension.

Changes:

  • Added a template-gallery-driven project creation flow (webview UI + remote/bundled manifest provider + clone/copy steps).
  • Added new commands: Run Function App (runtime-aware setup), Validate Function App (Copilot + diagnostics), and Smart Deploy (AZD-aware routing).
  • Improved activation/init behavior by detecting and persisting the project language model when missing.

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts Detects and persists projectLanguageModel during activation when missing.
src/vsCodeConfig/verifyInitForVSCode.ts Detects and persists projectLanguageModel during init verification when missing.
src/templates/projectTemplates/ProjectTemplateProvider.ts Fetches/merges/caches template manifests and filters templates by language/model.
src/templates/projectTemplates/IProjectTemplate.ts Defines template/manifest types used by the template gallery and wizard flow.
src/extensionVariables.ts Adds a shared diagnostic collection handle to extension globals.
src/extension.ts Initializes and disposes the Azure Functions diagnostic collection on activation.
src/commands/validateFunctionApp/FunctionAppValidator.ts Implements Copilot-based project validation and publishes results as VS Code diagnostics.
src/commands/runFunctionApp/RunFunctionApp.ts Adds runtime-aware “Run Function App” behavior (venv/npm/dotnet build + func start).
src/commands/registerCommands.ts Registers new commands (validate, smart deploy, run function app).
src/commands/deploy/SmartDeploy.ts Adds deploy routing logic (AZD-aware) while delegating to existing deploy where appropriate.
src/commands/createNewProject/TemplateListStep.ts Adds Quick Pick template selection (category-grouped) for the wizard template flow.
src/commands/createNewProject/TemplateGalleryPanel.ts Implements the template gallery webview controller, template cloning, and AI project creation.
src/commands/createNewProject/StartingPointStep.ts Adds “template vs scratch” starting point step to the classic wizard flow.
src/commands/createNewProject/PostCloneStep.ts Adds post-clone analysis (Bicep/README detection) and follow-up notifications.
src/commands/createNewProject/NewProjectLanguageStep.ts Adds a “Browse Template Gallery…” discovery option in the classic language picker.
src/commands/createNewProject/IProjectWizardContext.ts Extends wizard context with template-flow-specific properties.
src/commands/createNewProject/createNewProject.ts Branches between classic wizard and new gallery flow based on an opt-in setting.
src/commands/createNewProject/CloneTemplateStep.ts Adds a wizard execute step to clone/copy a template repo (including sparse checkout).
resources/webviews/templateGallery/styles.css Adds styling for the template gallery and AI generation UI.
resources/webviews/templateGallery/main.js Implements template gallery filtering, selection, and AI-generation UX in the webview.
resources/webviews/templateGallery/index.html Static template gallery HTML used as a webview resource.
resources/skills/functionapp.md Adds common (all runtimes) validator “skill” rules/prompting schema.
resources/skills/python.md Adds Python-specific validator rules/prompting guidance.
resources/backupProjectTemplates/manifest.json Adds an offline fallback template manifest.
package.json Contributes new commands/menus and new project template settings; adds codicons dependency.
package.nls.json Adds localized strings for new commands and project template settings.
package-lock.json Updates lockfile for new dependency additions and version bump.
.vscodeignore Ensures codicons assets are packaged for the webview.

Comment thread src/templates/projectTemplates/ProjectTemplateProvider.ts
Comment thread src/templates/projectTemplates/ProjectTemplateProvider.ts
Comment thread src/templates/projectTemplates/ProjectTemplateProvider.ts Outdated
Comment thread resources/webviews/templateGallery/styles.css Outdated
Comment thread src/commands/createNewProject/TemplateGalleryPanel.ts
Comment thread src/commands/createNewProject/StartingPointStep.ts Outdated
Comment thread src/commands/deploy/SmartDeploy.ts
Comment thread package.json
Comment thread src/templates/projectTemplates/ProjectTemplateProvider.ts
Comment thread src/commands/validateFunctionApp/FunctionAppValidator.ts Outdated
@gavin-aguiar gavin-aguiar marked this pull request as ready for review April 13, 2026 18:35
@gavin-aguiar gavin-aguiar requested a review from a team as a code owner April 13, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants