Skip to content

Commit a43e681

Browse files
Correctly set autoApprove to true, not false
1 parent 55a6429 commit a43e681

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ TaskManagerFile
221221
├── initialPrompt: string # Original user request text
222222
├── projectPlan: string # Additional project details
223223
├── completed: boolean # Project completion status
224+
├── autoApprove: boolean # Set `false` to require manual user approval
224225
└── tasks: Task[] # Array of tasks
225226
├── id: string # Format: "task-{number}"
226227
├── title: string # Short task title

src/server/TaskManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class TaskManager {
135135
projectPlan: projectPlan || initialPrompt,
136136
tasks: newTasks,
137137
completed: false,
138-
autoApprove: autoApprove === true ? true : false,
138+
autoApprove: autoApprove === false ? false : true,
139139
};
140140

141141
this.data.projects.push(newProject);

src/server/toolExecutors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const createProjectToolExecutor: ToolExecutor = {
152152
const initialPrompt = validateRequiredStringParam(args.initialPrompt, "initialPrompt");
153153
const validatedTasks = validateTaskObjects(args.tasks);
154154
const projectPlan = args.projectPlan !== undefined ? String(args.projectPlan) : undefined;
155-
const autoApprove = args.autoApprove === true;
155+
const autoApprove = args.autoApprove as boolean | undefined;
156156

157157
if (args.projectPlan !== undefined && typeof args.projectPlan !== 'string') {
158158
throw new AppError(

tests/mcp/tools/create-project.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('create_project Tool', () => {
111111
"Task 2",
112112
"Task 3"
113113
]);
114-
expect(project).toHaveProperty('autoApprove', false);
114+
expect(project).toHaveProperty('autoApprove', true);
115115
});
116116

117117
it('should create a project with auto-approve enabled', async () => {

0 commit comments

Comments
 (0)