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

Function detect_experimental_tui_context

src/init.rs:1011–1027  ·  view source on GitHub ↗
(
    stdin_is_tty: bool,
    stdout_is_tty: bool,
    term: Option<&str>,
)

Source from the content-addressed store, hash-verified

1009}
1010
1011fn detect_experimental_tui_context(
1012 stdin_is_tty: bool,
1013 stdout_is_tty: bool,
1014 term: Option<&str>,
1015) -> ExperimentalTuiContext {
1016 if !stdin_is_tty {
1017 return ExperimentalTuiContext::Unsupported("stdin is not a terminal");
1018 }
1019 if !stdout_is_tty {
1020 return ExperimentalTuiContext::Unsupported("stdout is not a terminal");
1021 }
1022 if term.is_some_and(|value| value.eq_ignore_ascii_case("dumb")) {
1023 return ExperimentalTuiContext::Unsupported("TERM=dumb does not support full-screen TUI");
1024 }
1025
1026 ExperimentalTuiContext::SafeInteractive
1027}
1028
1029trait InitWizardRenderer {
1030 fn confirm_migration(&mut self) -> Result<bool>;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected