feat: Enhanced project initialization with Git worktree detection (#743)
* Fix Cursor deeplink installation with copy-paste instructions (#723) * detect git worktree * add changeset * add aliases and git flags * add changeset * rename and update test * add store tasks in git functionality * update changeset * fix newline * remove unused import * update command wording * update command option text
This commit is contained in:
@@ -11,7 +11,7 @@ import { convertAllRulesToProfileRules } from '../../../../src/utils/rule-transf
|
||||
/**
|
||||
* Direct function wrapper for initializing a project.
|
||||
* Derives target directory from session, sets CWD, and calls core init logic.
|
||||
* @param {object} args - Arguments containing initialization options (addAliases, skipInstall, yes, projectRoot, rules)
|
||||
* @param {object} args - Arguments containing initialization options (addAliases, initGit, storeTasksInGit, skipInstall, yes, projectRoot, rules)
|
||||
* @param {object} log - The FastMCP logger instance.
|
||||
* @param {object} context - The context object, must contain { session }.
|
||||
* @returns {Promise<{success: boolean, data?: any, error?: {code: string, message: string}}>} - Standard result object.
|
||||
@@ -65,7 +65,9 @@ export async function initializeProjectDirect(args, log, context = {}) {
|
||||
// Construct options ONLY from the relevant flags in args
|
||||
// The core initializeProject operates in the current CWD, which we just set
|
||||
const options = {
|
||||
aliases: args.addAliases,
|
||||
addAliases: args.addAliases,
|
||||
initGit: args.initGit,
|
||||
storeTasksInGit: args.storeTasksInGit,
|
||||
skipInstall: args.skipInstall,
|
||||
yes: true // Force yes mode
|
||||
};
|
||||
|
||||
@@ -23,8 +23,18 @@ export function registerInitializeProjectTool(server) {
|
||||
addAliases: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(false)
|
||||
.default(true)
|
||||
.describe('Add shell aliases (tm, taskmaster) to shell config file.'),
|
||||
initGit: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(true)
|
||||
.describe('Initialize Git repository in project root.'),
|
||||
storeTasksInGit: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(false)
|
||||
.describe('Store tasks in Git (tasks.json and tasks/ directory).'),
|
||||
yes: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
Reference in New Issue
Block a user