VS Code extension: scaffold generation with context-aware UX#230
Open
VS Code extension: scaffold generation with context-aware UX#230
Conversation
Add "New from Scaffold..." command to the VS Code extension, accessible from the command palette, explorer context menu, and File > New File... menu. Features: - Multi-step Quick Pick wizard mapping scaffold parameter types to VS Code UI - Context-aware cartridge detection: right-clicking inside a cartridge auto-fills the cartridge parameter and filters the scaffold list to relevant templates - Editor context: command palette uses the active editor's file path for detection - Built-in scaffold data copied into extension bundle at build time SDK changes: - Add detectSourceFromPath() for generalized source detection from filesystem paths - Export cartridgePathForDestination() (moved from parameter-resolver to sources) - Add builtInScaffoldsDir option to createScaffoldRegistry() for bundled consumers - Export ScaffoldRegistryOptions and SourceDetectionResult types
…ce guard - Add $(file-code) icon to scaffold command - Auto-open first generated file; offer "Reveal in Explorer" instead of "Open File" - Show postInstructions as user-facing info message - Simplify boolean prompt: always Yes/No order with (default) marker - Guard against missing workspace with early warning - Show step progress in Quick Pick titles (e.g. "Controller (1/3)") - Add when clause to file/newFile entry to hide without workspace
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
cartridgeNameparameter, filters the scaffold list to only cartridge-targeting templates (controller, custom-api, hook, etc.), and skips the cartridge selection promptdetectSourceFromPath()for generalized source detection from filesystem paths, exportscartridgePathForDestination(), and addsbuiltInScaffoldsDiroption tocreateScaffoldRegistry()for bundled consumerscopySdkScaffolds())Test plan
rest-apis/) → same behavior (walks up to cartridge root)pnpm --filter @salesforce/b2c-tooling-sdk run test:agentpassespnpm --filter @salesforce/b2c-cli run test:agentpasses