fix bug in planning flow
parent
8aa98cf515
commit
83ba3d3f63
|
@ -13,13 +13,13 @@ std::mutex Config::_mutex;
|
||||||
void Config::_load_initial_config() {
|
void Config::_load_initial_config() {
|
||||||
try {
|
try {
|
||||||
auto config_path = _get_config_path();
|
auto config_path = _get_config_path();
|
||||||
std::cout << "加载配置文件: " << config_path.string() << std::endl;
|
std::cout << "Loading config file from: " << config_path.string() << std::endl;
|
||||||
|
|
||||||
const auto& data = toml::parse_file(config_path.string());
|
const auto& data = toml::parse_file(config_path.string());
|
||||||
|
|
||||||
// 检查工具配置是否存在
|
// 检查工具配置是否存在
|
||||||
if (!data.contains("llm") || !data["llm"].is_table()) {
|
if (!data.contains("llm") || !data["llm"].is_table()) {
|
||||||
throw std::runtime_error("MCP配置文件中找不到llm配置: ");
|
throw std::runtime_error("找不到llm配置: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& llm_table = *data["llm"].as_table();
|
const auto& llm_table = *data["llm"].as_table();
|
||||||
|
|
|
@ -248,7 +248,7 @@ void PlanningFlow::_mark_step_completed() {
|
||||||
{"command", "mark_step"},
|
{"command", "mark_step"},
|
||||||
{"plan_id", active_plan_id},
|
{"plan_id", active_plan_id},
|
||||||
{"step_index", current_step_index},
|
{"step_index", current_step_index},
|
||||||
{"status", "completed"}
|
{"step_status", "completed"}
|
||||||
});
|
});
|
||||||
logger->info(
|
logger->info(
|
||||||
"Marked step " + std::to_string(current_step_index) + " as completed in plan " + active_plan_id
|
"Marked step " + std::to_string(current_step_index) + " as completed in plan " + active_plan_id
|
||||||
|
|
Loading…
Reference in New Issue