feat(ai-config): add framework prompt & early detect so command can always run#1689
Open
damyanpetev wants to merge 6 commits into
Open
feat(ai-config): add framework prompt & early detect so command can always run#1689damyanpetev wants to merge 6 commits into
damyanpetev wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Ignite UI CLI AI configuration flow so ig ai-config can always run by resolving the target framework earlier (via explicit --framework, auto-detection, or an interactive prompt), and then threading that framework through AI skills/instructions generation.
Changes:
- Added
--framework/-ftoig ai-config, with framework auto-detection and interactive fallback when detection is inconclusive. - Introduced/expanded framework detection in core (
detectFramework) including Blazor detection from.csproj/ solution files. - Updated AI skills/instructions utilities and call sites to require an explicit framework parameter (CLI + schematics + tests).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/unit/PromptSession-spec.ts | Updates expectation to match new configure(framework, ...) signature. |
| spec/unit/new-spec.ts | Updates tests for new command to pass framework into AI configure. |
| spec/unit/detect-framework-spec.ts | Adds unit tests for detectFramework() and expands Blazor detection coverage. |
| spec/unit/ai-skills-spec.ts | Updates tests for explicit framework parameter; removes fallback scanning tests. |
| spec/unit/ai-config-spec.ts | Adds tests around framework resolution behavior in ai-config handler. |
| spec/acceptance/help-spec.ts | Adds acceptance coverage for ai-config -h output (including --framework). |
| packages/ng-schematics/src/prompt/SchematicsPromptSession.ts | Updates abstract method signature to accept framework id (no-op impl). |
| packages/ng-schematics/src/ng-new/index_spec.ts | Loosens file-count assertion to accommodate additional generated files. |
| packages/ng-schematics/src/cli-config/index.ts | Passes explicit framework (angular) when copying AI skills/instructions in schematics. |
| packages/ng-schematics/src/cli-config/index_spec.ts | Updates schematics tests to assert the new function signatures. |
| packages/core/util/detect-framework.ts | Adds detectFramework() and extends Blazor detection logic. |
| packages/core/util/ai-skills.ts | Requires explicit framework for copying skills/instructions and resolving template sources. |
| packages/core/prompt/BasePromptSession.ts | Passes framework id into AI configuration hook. |
| packages/cli/lib/PromptSession.ts | Calls AI configure with framework id from prompt session. |
| packages/cli/lib/commands/new.ts | Calls AI configure with argv.framework after project scaffolding. |
| packages/cli/lib/commands/ai-config.ts | Adds --framework, detection/prompting, and threads framework into skills/instructions copy. |
| CHANGELOG.md | Documents ai-config updates and new --framework option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+23
|
|
||
| framework ??= detectFrameworkFromPackageJson(); | ||
| framework ??= detectBlazorFromCsproj() ? "blazor" : null; | ||
|
|
| import { IFileSystem, FS_TOKEN } from "../types/FileSystem"; | ||
| import { ProjectConfig } from "./ProjectConfig"; | ||
|
|
||
| type Framework = "angular" | "react" | "webcomponents" | "blazor"; |
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.
…lways run
Description
Related Issue
Closes #
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