feat: add tui feature flag to gate the tui command (#9428)
Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
This commit is contained in:
@@ -73,6 +73,7 @@ winapi = { workspace = true }
|
|||||||
default = [
|
default = [
|
||||||
"code-mode",
|
"code-mode",
|
||||||
"local-inference",
|
"local-inference",
|
||||||
|
"tui",
|
||||||
"aws-providers",
|
"aws-providers",
|
||||||
"telemetry",
|
"telemetry",
|
||||||
"nostr",
|
"nostr",
|
||||||
@@ -90,8 +91,9 @@ telemetry = ["goose/telemetry"]
|
|||||||
nostr = ["goose/nostr"]
|
nostr = ["goose/nostr"]
|
||||||
otel = ["goose/otel"]
|
otel = ["goose/otel"]
|
||||||
system-keyring = ["goose/system-keyring"]
|
system-keyring = ["goose/system-keyring"]
|
||||||
|
tui = []
|
||||||
update = ["dep:sigstore-verify"]
|
update = ["dep:sigstore-verify"]
|
||||||
portable-default = ["rustls-tls", "aws-providers", "telemetry", "otel"]
|
portable-default = ["rustls-tls", "aws-providers", "telemetry", "otel", "tui"]
|
||||||
# disables the update command
|
# disables the update command
|
||||||
disable-update = []
|
disable-update = []
|
||||||
rustls-tls = [
|
rustls-tls = [
|
||||||
|
|||||||
@@ -986,6 +986,7 @@ enum Command {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/// Launch the goose terminal UI (TUI)
|
/// Launch the goose terminal UI (TUI)
|
||||||
|
#[cfg(feature = "tui")]
|
||||||
#[command(
|
#[command(
|
||||||
about = "Launch the goose terminal UI",
|
about = "Launch the goose terminal UI",
|
||||||
long_about = "Launch the goose terminal UI (the @aaif/goose npm package).\n\
|
long_about = "Launch the goose terminal UI (the @aaif/goose npm package).\n\
|
||||||
@@ -1291,6 +1292,7 @@ fn get_command_name(command: &Option<Command>) -> &'static str {
|
|||||||
Some(Command::Skills { .. }) => "skills",
|
Some(Command::Skills { .. }) => "skills",
|
||||||
Some(Command::Plugin { .. }) => "plugin",
|
Some(Command::Plugin { .. }) => "plugin",
|
||||||
Some(Command::Term { .. }) => "term",
|
Some(Command::Term { .. }) => "term",
|
||||||
|
#[cfg(feature = "tui")]
|
||||||
Some(Command::Tui { .. }) => "tui",
|
Some(Command::Tui { .. }) => "tui",
|
||||||
#[cfg(feature = "local-inference")]
|
#[cfg(feature = "local-inference")]
|
||||||
Some(Command::LocalModels { .. }) => "local-models",
|
Some(Command::LocalModels { .. }) => "local-models",
|
||||||
@@ -2154,6 +2156,7 @@ pub async fn cli() -> anyhow::Result<()> {
|
|||||||
Some(Command::Skills { command }) => handle_skills_subcommand(command).await,
|
Some(Command::Skills { command }) => handle_skills_subcommand(command).await,
|
||||||
Some(Command::Plugin { command }) => handle_plugin_subcommand(command),
|
Some(Command::Plugin { command }) => handle_plugin_subcommand(command),
|
||||||
Some(Command::Term { command }) => handle_term_subcommand(command).await,
|
Some(Command::Term { command }) => handle_term_subcommand(command).await,
|
||||||
|
#[cfg(feature = "tui")]
|
||||||
Some(Command::Tui { args }) => crate::commands::tui::handle_tui(args),
|
Some(Command::Tui { args }) => crate::commands::tui::handle_tui(args),
|
||||||
#[cfg(feature = "local-inference")]
|
#[cfg(feature = "local-inference")]
|
||||||
Some(Command::LocalModels { command }) => handle_local_models_command(command).await,
|
Some(Command::LocalModels { command }) => handle_local_models_command(command).await,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ pub mod schedule;
|
|||||||
pub mod session;
|
pub mod session;
|
||||||
pub mod skills;
|
pub mod skills;
|
||||||
pub mod term;
|
pub mod term;
|
||||||
|
#[cfg(feature = "tui")]
|
||||||
pub mod tui;
|
pub mod tui;
|
||||||
#[cfg(feature = "update")]
|
#[cfg(feature = "update")]
|
||||||
pub mod update;
|
pub mod update;
|
||||||
|
|||||||
Reference in New Issue
Block a user