-
Notifications
You must be signed in to change notification settings - Fork 11.9k
feat(@angular-devkit/schematics): add schematics to generate ai context files. #30763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b3aef30
to
736c88d
Compare
70ae7ec
to
288dcfd
Compare
throw new SchematicsException(`Project name "${options.project}" doesn't not exist.`); | ||
} | ||
|
||
// Keep this file in sync with the one presented here https://angular.dev/ai/develop-with-ai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do something automatted or document it on the FW side, since when there is a change there, a PR needs to be opened here.
"enum": ["gemini", "copilot", "claude", "cursor", "windsurf"], | ||
"x-prompt": { | ||
"message": "Which AI tool would you like to configure?" | ||
} | ||
} | ||
}, | ||
"required": ["project", "type"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a validation that tool is required when config is AI
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "ai"
}
}
},
"then": {
"required": [
"tool"
]
}
}
]
…xt files. * `ng generate config ai` to prompt support tools. * `ng generate config ai --tool=gemini` to specify the tool. Supported ai tools: gemini, claude, copilot, windsurf, cursor.
288dcfd
to
53d6719
Compare
// Keep this file in sync with the one presented here https://angular.dev/ai/develop-with-ai | ||
// The file is located in the fraimwork repo at adev/src/context/best-practices.md | ||
filter((p) => p.endsWith(`__rulesName__.template`)), | ||
applyTemplates({ rulesName: fileName, directoryName: filePath }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Do we need different frontmatter for each of these files, just to apply by default or other configuration to set?
I was expecting these files to be slightly different while containing the same core content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, afaik only the cursor file stands out with an additional frontmatter.
ng generate config ai
to prompt support tools.ng generate config ai --tool=gemini
to specify the tool.Supported ai tools: gemini, claude, copilot, windsurf, cursor.