Skip to content

Prompt cleanup & types refactor#1683

Open
damyanpetev wants to merge 3 commits into
masterfrom
dpetev/minor-refactors
Open

Prompt cleanup & types refactor#1683
damyanpetev wants to merge 3 commits into
masterfrom
dpetev/minor-refactors

Conversation

@damyanpetev
Copy link
Copy Markdown
Member

@damyanpetev damyanpetev commented May 11, 2026

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration 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

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

Additional Context

@damyanpetev damyanpetev force-pushed the dpetev/minor-refactors branch 2 times, most recently from 28fa738 to 38598ad Compare May 12, 2026 16:03
@damyanpetev damyanpetev marked this pull request as ready for review May 12, 2026 16:04
Copilot AI review requested due to automatic review settings May 12, 2026 16:04
@coveralls
Copy link
Copy Markdown

coveralls commented May 12, 2026

Coverage Status

coverage: 87.227% (+0.3%) from 86.917% — dpetev/minor-refactors into master

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

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.

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.

Comment thread packages/cli/lib/PromptSession.ts Outdated
Comment thread packages/core/types/ControlExtraConfiguration.ts
Comment thread packages/core/prompt/BasePromptSession.ts
@damyanpetev damyanpetev force-pushed the dpetev/minor-refactors branch from 38598ad to 6603766 Compare May 12, 2026 16:19
@damyanpetev damyanpetev requested a review from kdinev May 12, 2026 16:23
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.

3 participants