重构命令执行逻辑,增强项目状态检查功能。更新InitCommand以支持从MCP和CLI传递工作目录参数,确保路径有效性并提供用户友好的提示。重写多个命令的execute方法,整合项目状态提示,提升用户体验和输出格式的可读性。

This commit is contained in:
sean
2025-06-16 14:42:36 +08:00
parent 40c3b83854
commit 3d29434d24
9 changed files with 515 additions and 15 deletions

View File

@ -166,7 +166,7 @@ class MCPServerCommand {
*/
convertMCPToCliParams(toolName, mcpArgs) {
const paramMapping = {
'promptx_init': () => [],
'promptx_init': (args) => args.workingDirectory ? [args] : [],
'promptx_hello': () => [],