MCPcopy Create free account
hub / github.com/GCWing/BitFun / initialize_terminal_service

Function initialize_terminal_service

src/apps/cli/src/main.rs:340–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

338}
339
340async fn initialize_terminal_service() {
341 use bitfun_core::service::runtime::RuntimeManager;
342 use bitfun_core::service::terminal::{TerminalApi, TerminalConfig};
343
344 let mut terminal_config = TerminalConfig::default();
345 terminal_config.shell_integration.scripts_dir = Some(terminal_scripts_dir());
346
347 if let Ok(runtime_manager) = RuntimeManager::new() {
348 let current_path = std::env::var("PATH").ok();
349 if let Some(merged_path) = runtime_manager.merged_path_env(current_path.as_deref()) {
350 terminal_config
351 .env
352 .insert("PATH".to_string(), merged_path.clone());
353 #[cfg(windows)]
354 {
355 terminal_config.env.insert("Path".to_string(), merged_path);
356 }
357 }
358 } else {
359 tracing::warn!("Failed to initialize runtime manager for terminal PATH");
360 }
361
362 let _terminal_api = TerminalApi::new(terminal_config).await;
363 tracing::info!("Terminal service initialized");
364}
365
366/// Initialize all core services (config, AI client, agentic system).
367/// Returns (agentic_system, original_skip_confirmation).

Callers 2

serve_acp_stdioFunction · 0.85
initialize_core_servicesFunction · 0.85

Calls 5

terminal_scripts_dirFunction · 0.85
okMethod · 0.45
merged_path_envMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected