Mstoyanova/update mcp config agent agnostic restore#1684
Open
Marina-L-Stoyanova wants to merge 5 commits intomasterfrom
Open
Mstoyanova/update mcp config agent agnostic restore#1684Marina-L-Stoyanova wants to merge 5 commits intomasterfrom
Marina-L-Stoyanova wants to merge 5 commits intomasterfrom
Conversation
…date related prompts Co-authored-by: Copilot <copilot@github.com>
…and enhance related prompts Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AI configuration flow to make MCP server configuration assistant-agnostic (VS Code vs Cursor/Claude Code/etc.) and to separate MCP configuration from AI “skills and instructions” generation.
Changes:
- Adds assistant-specific MCP config targets (path + root key) and updates MCP writer to support multiple assistants.
- Extends both the CLI command and Angular schematic to accept/prompt for “assistant(s)” separately from “agent(s)”.
- Updates/extends unit and schematic tests and schema prompts/messages to reflect the split between MCP configuration and skills/instructions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/unit/ai-config-spec.ts | Updates CLI unit tests for new assistant/agent prompting and MCP behavior. |
| packages/ng-schematics/src/cli-config/index.ts | Updates schematic logic to configure MCP per selected assistant(s). |
| packages/ng-schematics/src/cli-config/index_spec.ts | Adds schematic tests for assistant-specific MCP output paths and root keys. |
| packages/ng-schematics/src/cli-config/ai-config-schema.json | Adds assistant option (prompt + enum) and updates agent prompt messaging. |
| packages/core/util/mcp-config.ts | Introduces assistant MCP config map and changes addMcpServers to be assistant-based. |
| packages/cli/lib/commands/ai-config.ts | Adds assistant prompting/selection and routes MCP config generation accordingly. |
Comments suppressed due to low confidence (1)
packages/cli/lib/commands/ai-config.ts:143
- The handler configures MCP servers via
configureMCP(assistants)and then callsconfigure(agents)which also configures MCP (defaulting to VS Code). This causes duplicate writes and ignores the user’s assistant selection (e.g. selecting--assistant noneor choosing “None” interactively still results in VS Code MCP configuration). Pass the selected assistants intoconfigure(...)and/or refactor so MCP is configured exactly once and respects an explicit “none” selection.
if (!assistants?.length) {
assistants = await promptForAssistant();
}
if (!agents?.length) {
agents = await promptForAgents();
}
GoogleAnalytics.post({
t: "event",
ec: "$ig ai-config",
ea: `agent: ${agents.join(", ") || "none"}`
});
if (assistants.length) {
configureMCP(assistants);
}
if (!agents.length) {
Util.log("No AI configuration selected. Skipping.");
return;
}
await configure(agents);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { chain, FileDoesNotExistException, Rule, SchematicContext, Tree } from "@angular-devkit/schematics"; | ||
| import { RunSchematicTask } from "@angular-devkit/schematics/tasks"; | ||
| import { addClassToBody, addMcpServers, AIAgentTarget, App, copyAgentInstructionFiles, copyAISkillsToProject, FormatSettings, McpServerEntry, NPM_ANGULAR, resolvePackage, TEMPLATE_MANAGER, TypeScriptAstTransformer, TypeScriptUtils, VS_CODE_MCP_PATH } from "@igniteui/cli-core"; | ||
| import { addClassToBody, addMcpServers, AIAgentTarget, AiCodingAssistant, App, copyAgentInstructionFiles, copyAISkillsToProject, FormatSettings, McpServerEntry, NPM_ANGULAR, resolvePackage, TEMPLATE_MANAGER, TypeScriptAstTransformer, TypeScriptUtils, VS_CODE_MCP_PATH } from "@igniteui/cli-core"; |
Comment on lines
+87
to
+93
| // TODO: check Util.canPrompt() and assign defaults | ||
| const selected = await InquirerWrapper.checkbox({ | ||
| message: "Which coding assistants should MCP servers be configured for?", | ||
| required: true, | ||
| choices: AI_ASSISTANT_CHECKBOX_CHOICES | ||
| }); | ||
| return selected.includes("none") ? [] : selected as AiCodingAssistant[]; |
Comment on lines
+109
to
+115
| choices: AI_ASSISTANT_CHOICES, | ||
| type: "array" | ||
| }), | ||
| async handler(argv: ArgumentsCamelCase) { | ||
| let agents = argv.agent as AIAgentTarget[] | undefined; | ||
| let assistants = argv.assistant as AiCodingAssistant[] | undefined; | ||
|
|
…ng agent selection logic
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…fy related commands
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.
…date related prompts
Description
enhance MCP configuration for multiple coding assistants
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