Refactors the initialize_project MCP tool to call a dedicated direct function (initializeProjectDirect) instead of executing the CLI command. This improves reliability and aligns it with other MCP tools. Key changes include: Modified initialize-project.js to call initializeProjectDirect, required projectRoot parameter, implemented handleApiResult for MCP response formatting, enhanced direct function to prioritize args.projectRoot over session-derived paths, added validation to prevent initialization in invalid directories, forces yes:true for non-interactive use, ensures process.chdir() targets validated directory, and added isSilentMode() checks to suppress console output during MCP operations. This resolves issues where the tool previously failed due to incorrect fallback directory resolution when session context was incomplete.
40 lines
784 B
Markdown
40 lines
784 B
Markdown
---
|
|
name: Bug report
|
|
about: Create a report to help us improve
|
|
title: 'bug: '
|
|
labels: bug
|
|
assignees: ''
|
|
---
|
|
|
|
### Description
|
|
|
|
Detailed description of the problem, including steps to reproduce the issue.
|
|
|
|
### Steps to Reproduce
|
|
|
|
1. Step-by-step instructions to reproduce the issue
|
|
2. Include command examples or UI interactions
|
|
|
|
### Expected Behavior
|
|
|
|
Describe clearly what the expected outcome or behavior should be.
|
|
|
|
### Actual Behavior
|
|
|
|
Describe clearly what the actual outcome or behavior is.
|
|
|
|
### Screenshots or Logs
|
|
|
|
Provide screenshots, logs, or error messages if applicable.
|
|
|
|
### Environment
|
|
|
|
- Task Master version:
|
|
- Node.js version:
|
|
- Operating system:
|
|
- IDE (if applicable):
|
|
|
|
### Additional Context
|
|
|
|
Any additional information or context that might help diagnose the issue.
|