Prompt cleanup & types refactor#1683
Open
damyanpetev wants to merge 3 commits into
Open
Conversation
28fa738 to
38598ad
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the CLI prompt flow and typing to align with @inquirer/prompts APIs (notably moving from legacy "list" to "select") and cleans up prompt option shapes to avoid passing irrelevant properties like choices to input prompts.
Changes:
- Replaced
"list"prompts with"select"and tightened prompt option typing via aUserInputOptionsunion. - Removed
choices: null/[]from input-style prompts and updated corresponding unit tests. - Simplified CLI
PromptSessionby relying onBasePromptSession.start()and overriding only the CLI-specific hooks.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/unit/PromptSession-spec.ts | Updates unit tests to match "select" prompt type and input option shapes. |
| packages/ng-schematics/src/prompt/SchematicsPromptSession.ts | Updates imports/types and narrows getUserInput options to exclude checkbox prompts. |
| packages/ng-schematics/src/ng-new/index.ts | Removes invalid choices property from an input prompt invocation. |
| packages/core/types/ControlExtraConfiguration.ts | Makes choices optional on extra configuration type. |
| packages/core/prompt/InquirerWrapper.ts | Refactors inquirer wrapper config typing (separating input vs choice-based configs). |
| packages/core/prompt/BasePromptSession.ts | Moves to "select" prompts, introduces UserInputOptions union, and updates extra-config question generation. |
| packages/cli/lib/PromptSession.ts | Removes duplicated start() logic in favor of base implementation; keeps CLI-specific overrides. |
| .vscode/settings.json | Removes workspace TypeScript SDK override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
38598ad to
6603766
Compare
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.
Description
Refactors the CLI prompt flow and typing to align with @inquirer/prompts APIs (notably moving from legacy "list" to "select") and cleans up prompt option shapes to avoid passing irrelevant properties like choices to input prompts.
Changes:
Replaced "list" prompts with "select" and tightened prompt option typing via a UserInputOptions union.
Removed choices: null/[] from input-style prompts and updated corresponding unit tests.
Simplified CLI PromptSession by relying on BasePromptSession.start() and overriding only the CLI-specific hooks.
Fixed VS Code IDE TS version deprecated setting causing server mismatch and in-IDE errors
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context