deepwiki_rs/react/
mod.rs

1//! ReAct模式Agent实现
2//! 
3//! 基于rig框架实现的自主探索Agent,能够通过工具调用来分析项目结构
4
5pub mod agent;
6pub mod tools;
7pub mod context;
8pub mod config;
9
10pub use agent::LithoReactAgent;
11pub use context::{ProjectContext, ExplorationState, ProjectAnalysis};
12pub use config::ReactConfig;
13
14use anyhow::Result;
15use std::path::Path;
16use crate::Config;
17
18/// 创建并运行ReAct模式的项目分析
19pub async fn analyze_project_react(project_path: &Path, config: Config) -> Result<ProjectAnalysis> {
20    let mut agent = LithoReactAgent::new(project_path, config).await?;
21    agent.analyze_project().await
22}