MCPcopy Create free account
hub / github.com/dallay/agentsync / init_wizard_experimental_tui

Function init_wizard_experimental_tui

src/init.rs:1463–1497  ·  view source on GitHub ↗
(project_root: &Path, force: bool)

Source from the content-addressed store, hash-verified

1461}
1462
1463pub fn init_wizard_experimental_tui(project_root: &Path, force: bool) -> Result<()> {
1464 use colored::Colorize;
1465
1466 match experimental_tui_context_from_env() {
1467 ExperimentalTuiContext::SafeInteractive => match run_experimental_tui_intro() {
1468 Ok(ExperimentalTuiIntroOutcome::Continue) => {}
1469 Ok(ExperimentalTuiIntroOutcome::Cancelled) => {
1470 anyhow::bail!("experimental TUI wizard cancelled by user")
1471 }
1472 Err(error) => {
1473 println!(
1474 "{}",
1475 format!(
1476 "Experimental full-screen TUI could not initialize ({error}); falling back to the standard wizard."
1477 )
1478 .yellow()
1479 );
1480 }
1481 },
1482 ExperimentalTuiContext::Unsupported(reason) => {
1483 if let Some(message) = missing_terminal_tui_error(reason) {
1484 anyhow::bail!(message);
1485 }
1486 println!(
1487 "{}",
1488 format!(
1489 "Experimental full-screen TUI unavailable ({reason}); falling back to the standard wizard."
1490 )
1491 .yellow()
1492 );
1493 }
1494 }
1495
1496 init_wizard(project_root, force)
1497}
1498
1499fn render_experimental_tui_intro_frame(frame: &mut ratatui::Frame<'_>) {
1500 use ratatui::{

Callers 1

mainFunction · 0.85

Calls 4

init_wizardFunction · 0.85

Tested by

no test coverage detected