fix(commands): implement manual creation mode for add-task command
- Add support for --title/-t and --description/-d flags in add-task command - Fix validation for manual creation mode (title + description) - Implement proper testing for both prompt and manual creation modes - Update testing documentation with Commander.js testing best practices - Add guidance on handling variable hoisting and module initialization issues Changeset: brave-doors-open.md
This commit is contained in:
@@ -22,7 +22,11 @@ export function registerAddTaskTool(server) {
|
||||
name: 'add_task',
|
||||
description: 'Add a new task using AI',
|
||||
parameters: z.object({
|
||||
prompt: z.string().describe('Description of the task to add'),
|
||||
prompt: z.string().optional().describe('Description of the task to add (required if not using manual fields)'),
|
||||
title: z.string().optional().describe('Task title (for manual task creation)'),
|
||||
description: z.string().optional().describe('Task description (for manual task creation)'),
|
||||
details: z.string().optional().describe('Implementation details (for manual task creation)'),
|
||||
testStrategy: z.string().optional().describe('Test strategy (for manual task creation)'),
|
||||
dependencies: z
|
||||
.string()
|
||||
.optional()
|
||||
@@ -31,11 +35,11 @@ export function registerAddTaskTool(server) {
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Task priority (high, medium, low)'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
file: z.string().optional().describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Root directory of the project'),
|
||||
.describe('Root directory of the project (default: current working directory)'),
|
||||
research: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
Reference in New Issue
Block a user