Default to Cursor profile for MCP init when no rules specified (#846)
This commit is contained in:
5
.changeset/mean-papayas-share.md
Normal file
5
.changeset/mean-papayas-share.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Default to Cursor profile for MCP init when no rules specified
|
||||||
@@ -72,15 +72,16 @@ export async function initializeProjectDirect(args, log, context = {}) {
|
|||||||
yes: true // Force yes mode
|
yes: true // Force yes mode
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle rules option just like CLI
|
// Handle rules option with MCP-specific defaults
|
||||||
if (Array.isArray(args.rules) && args.rules.length > 0) {
|
if (Array.isArray(args.rules) && args.rules.length > 0) {
|
||||||
options.rules = args.rules;
|
options.rules = args.rules;
|
||||||
|
options.rulesExplicitlyProvided = true;
|
||||||
log.info(`Including rules: ${args.rules.join(', ')}`);
|
log.info(`Including rules: ${args.rules.join(', ')}`);
|
||||||
} else {
|
} else {
|
||||||
options.rules = RULE_PROFILES;
|
// For MCP initialization, default to Cursor profile only
|
||||||
log.info(
|
options.rules = ['cursor'];
|
||||||
`No rule profiles specified, defaulting to: ${RULE_PROFILES.join(', ')}`
|
options.rulesExplicitlyProvided = true;
|
||||||
);
|
log.info(`No rule profiles specified, defaulting to: Cursor`);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info(`Initializing project with options: ${JSON.stringify(options)}`);
|
log.info(`Initializing project with options: ${JSON.stringify(options)}`);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export function registerInitializeProjectTool(server) {
|
|||||||
.array(z.enum(RULE_PROFILES))
|
.array(z.enum(RULE_PROFILES))
|
||||||
.optional()
|
.optional()
|
||||||
.describe(
|
.describe(
|
||||||
`List of rule profiles to include at initialization. If omitted, defaults to all available profiles. Available options: ${RULE_PROFILES.join(', ')}`
|
`List of rule profiles to include at initialization. If omitted, defaults to Cursor profile only. Available options: ${RULE_PROFILES.join(', ')}`
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
execute: withNormalizedProjectRoot(async (args, context) => {
|
execute: withNormalizedProjectRoot(async (args, context) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user