Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/lib/PromptSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class PromptSession extends BasePromptSession {
name: "framework",
message: "Choose framework:",
choices: this.getFrameworkNames(),
default: "jQuery"
default: "Angular"
});
Comment on lines 61 to 65
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in BasePromptSession: getFrameworkNames() may be filtered by config, so using a hard-coded default of "Angular" can result in a default that isn't in the choices list. Compute the default from the actual choices array (prefer Angular when present, else first choice) to keep the prompt valid under step-by-step filtering.

Copilot uses AI. Check for mistakes.

const framework = this.templateManager.getFrameworkByName(frameRes);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/prompt/BasePromptSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export abstract class BasePromptSession {
name: "framework",
message: "Choose framework:",
choices: this.getFrameworkNames(),
default: "jQuery"
default: "Angular"
});
Comment on lines 47 to 51
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is hard-coded to "Angular", but getFrameworkNames() can return a filtered list via config.stepByStep.frameworks that may not include Angular. This can leave the prompt with a default that isn't present in the choices (potentially causing an invalid preselection or a runtime error depending on the prompt implementation). Consider deriving the default from the computed choices (prefer Angular when present, otherwise fall back to the first choice).

Copilot uses AI. Check for mistakes.

const framework = this.templateManager.getFrameworkByName(frameRes);
Expand Down
Loading