diff --git a/main.cpp b/main.cpp index 9b1c544..df64798 100644 --- a/main.cpp +++ b/main.cpp @@ -43,52 +43,59 @@ int main() { SetConsoleCtrlHandler(reinterpret_cast(console_ctrl_handler), true); #endif } - // Manus agent = Manus(); - // while (true) { - // std::string prompt; - // std::cout << "Enter your prompt (or 'exit' to quit): "; - // std::getline(std::cin, prompt); - // if (prompt == "exit") { - // logger->info("Goodbye!"); - // break; - // } - // logger->info("Processing your request..."); - // agent.run(prompt); - // } - - std::shared_ptr agent_ptr = std::make_shared(); - std::map> agents; - agents["default"] = agent_ptr; - - auto flow = FlowFactory::create_flow( - FlowType::PLANNING, - nullptr, // llm - nullptr, // planning_tool - std::vector{}, // executor_keys - "", // active_plan_id - agents, // agents - std::vector>{}, // tools - "default" // primary_agent_key - ); - + + Manus agent = Manus(); while (true) { - if (agent_ptr->current_step == agent_ptr->max_steps) { - std::cout << "Program automatically paused after " << agent_ptr->current_step << " steps." << std::endl; - std::cout << "Enter your prompt (like 'continue' to continue or 'exit' to quit): "; - agent_ptr->current_step = 0; + if (agent.current_step == agent.max_steps) { + std::cout << "Program automatically paused after " << agent.max_steps << " steps." << std::endl; + std::cout << "Enter your prompt (enter empty line to resume or 'exit' to quit): "; + agent.current_step = 0; } else { std::cout << "Enter your prompt (or 'exit' to quit): "; } - std::string prompt; std::getline(std::cin, prompt); if (prompt == "exit") { logger->info("Goodbye!"); break; } - - std::cout << "Processing your request..." << std::endl; - auto result = flow->execute(prompt); - std::cout << result << std::endl; + logger->info("Processing your request..."); + agent.run(prompt); } + + // std::shared_ptr agent_ptr = std::make_shared(); + // std::map> agents; + // agents["default"] = agent_ptr; + + // auto flow = FlowFactory::create_flow( + // FlowType::PLANNING, + // nullptr, // llm + // nullptr, // planning_tool + // std::vector{}, // executor_keys + // "", // active_plan_id + // agents, // agents + // std::vector>{}, // tools + // "default" // primary_agent_key + // ); + + // while (true) { + // if (agent_ptr->current_step == agent_ptr->max_steps) { + // std::cout << "Program automatically paused after " << agent_ptr->current_step << " steps." << std::endl; + // std::cout << "Enter your prompt (enter empty line to resume or 'exit' to quit): "; + // agent_ptr->current_step = 0; + // } else { + // std::cout << "Enter your prompt (or 'exit' to quit): "; + // } + + // std::string prompt; + // std::getline(std::cin, prompt); + // if (prompt == "exit") { + // logger->info("Goodbye!"); + // break; + // } + + // std::cout << "Processing your request..." << std::endl; + // auto result = flow->execute(prompt); + // std::cout << result << std::endl; + // } } \ No newline at end of file diff --git a/mcp b/mcp index 5bc09d6..5e9ff48 160000 --- a/mcp +++ b/mcp @@ -1 +1 @@ -Subproject commit 5bc09d6ab03c3d793c3550954fc5cd959d017303 +Subproject commit 5e9ff48b070a11ba20529feb22c68d0e9ef46f3d