()
| 331 | } |
| 332 | |
| 333 | pub async fn serve_acp_stdio() -> Result<()> { |
| 334 | crate::setup_workspace(); |
| 335 | |
| 336 | bitfun_core::service::config::initialize_global_config() |
| 337 | .await |
| 338 | .context("Failed to initialize global config service")?; |
| 339 | tracing::info!("Global config service initialized"); |
| 340 | |
| 341 | use bitfun_core::infrastructure::ai::AIClientFactory; |
| 342 | AIClientFactory::initialize_global() |
| 343 | .await |
| 344 | .context("Failed to initialize global AIClientFactory")?; |
| 345 | tracing::info!("Global AI client factory initialized"); |
| 346 | |
| 347 | crate::initialize_terminal_service().await; |
| 348 | |
| 349 | let agentic_system = crate::agent::agentic_system::init_agentic_system() |
| 350 | .await |
| 351 | .context("Failed to initialize agentic system")?; |
| 352 | tracing::info!("Agentic system initialized"); |
| 353 | |
| 354 | bitfun_acp::BitfunAcpRuntime::serve_stdio(agentic_system).await?; |
| 355 | Ok(()) |
| 356 | } |
no test coverage detected