Create New Project design improvements#4964
Open
gavin-aguiar wants to merge 12 commits intomicrosoft:mainfrom
Open
Create New Project design improvements#4964gavin-aguiar wants to merge 12 commits intomicrosoft:mainfrom
gavin-aguiar wants to merge 12 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
azureFunctions.enableTemplateGallery: truein settingsHow to enable:
Preferences: Open Settings (JSON)"azureFunctions.enableTemplateGallery": trueAzure Functions: Create New Project...to see the galleryGallery 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.
2. Run Function App — Smart Pre-Start Steps
The ▶ Run Function App button now performs runtime-specific setup before launching
func start:.venvif missing →pip install -r requirements.txt→func start(with venv activated via pseudoterminal)npm install→npm run build(if build script exists) →func startdotnet build→func startfunc startdirectlyKey technical detail: Python projects use a pseudoterminal to prevent the VS Code Python extension from injecting its own venv activation into the running
func startprocess.Runtime detection: Reads
FUNCTIONS_WORKER_RUNTIMEfromlocal.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)
src/commands/deploy/SmartDeploy.ts) — Intelligent deployment with pre-deploy validationsrc/commands/validateFunctionApp/FunctionAppValidator.ts) — Project validation checksresources/skills/) — Contextual guidance for Copilot-assisted developmentresources/backupProjectTemplates/manifest.json) — Offline fallback for template metadataNew Settings
azureFunctions.enableTemplateGallerybooleanfalseNew Commands
azureFunctions.runFunctionAppFiles Changed
27 files changed (+7,141 / -19)
New files:
src/commands/createNewProject/TemplateGalleryPanel.ts— Webview panel controllersrc/commands/createNewProject/CloneTemplateStep.ts— Template cloning wizard stepsrc/commands/createNewProject/PostCloneStep.ts— Post-clone setup stepsrc/commands/createNewProject/StartingPointStep.ts— Template vs scratch wizard stepsrc/commands/createNewProject/TemplateListStep.ts— Template list wizard stepsrc/commands/runFunctionApp/RunFunctionApp.ts— Smart Run Function App commandsrc/commands/deploy/SmartDeploy.ts— Smart deployment logicsrc/commands/validateFunctionApp/FunctionAppValidator.ts— Project validatorsrc/templates/projectTemplates/IProjectTemplate.ts— Template type definitionssrc/templates/projectTemplates/ProjectTemplateProvider.ts— Template data providerresources/webviews/templateGallery/— Webview HTML, JS, CSSresources/backupProjectTemplates/manifest.json— Offline template manifestresources/skills/— Copilot skill filesModified files:
src/commands/createNewProject/createNewProject.ts— Feature flag branchingsrc/commands/createNewProject/NewProjectLanguageStep.ts— Gallery discovery optionsrc/commands/createNewProject/IProjectWizardContext.ts— Extended context interfacesrc/commands/registerCommands.ts— New command registrationssrc/extension.ts— Extension activationsrc/extensionVariables.ts— Extension variablessrc/vsCodeConfig/verifyInitForVSCode.ts— VS Code config verificationsrc/vsCodeConfig/verifyVSCodeConfigOnActivate.ts— Activation config checkpackage.json— Settings, commands, menus, versionpackage.nls.json— Localization strings