aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-ai/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-ai/src/commands.rs')
-rw-r--r--crates/atuin-ai/src/commands.rs45
1 files changed, 1 insertions, 44 deletions
diff --git a/crates/atuin-ai/src/commands.rs b/crates/atuin-ai/src/commands.rs
index d04875ea..6e79da61 100644
--- a/crates/atuin-ai/src/commands.rs
+++ b/crates/atuin-ai/src/commands.rs
@@ -8,9 +8,6 @@ use clap::{Args, Subcommand};
use eyre::Result;
use tracing_appender::rolling::{RollingFileAppender, Rotation};
use tracing_subscriber::{EnvFilter, Layer, fmt, layer::SubscriberExt, util::SubscriberInitExt};
-#[cfg(debug_assertions)]
-pub mod debug_render;
-
pub mod init;
pub mod inline;
@@ -47,29 +44,9 @@ pub enum Commands {
#[arg(value_name = "COMMAND")]
command: Option<String>,
- /// Keep TUI output visible after exit (default: erase)
- #[arg(long)]
- keep: bool,
-
/// Use the hook mode
#[arg(long, hide = true)]
hook: bool,
-
- /// Log state changes to file for debugging (dev tool)
- #[arg(long, value_name = "FILE", hide = true)]
- debug_state: Option<String>,
- },
-
- /// Debug render: output a single frame from JSON state (dev tool)
- #[cfg(debug_assertions)]
- DebugRender {
- /// Input file (reads from stdin if not provided)
- #[arg(short, long)]
- input: Option<String>,
-
- /// Output format: ansi (default), plain, json
- #[arg(short, long, default_value = "ansi")]
- format: String,
},
}
@@ -81,8 +58,6 @@ pub async fn run(
Commands::Init { shell } => init::run(shell).await,
Commands::Inline {
command,
- keep,
- debug_state,
hook,
args,
..
@@ -91,25 +66,7 @@ pub async fn run(
init_logging(settings, args.verbose)?;
}
- inline::run(
- command,
- args.api_endpoint,
- args.api_token,
- keep,
- debug_state,
- settings,
- hook,
- )
- .await
- }
- #[cfg(debug_assertions)]
- Commands::DebugRender { input, format } => {
- let output_format = match format.as_str() {
- "plain" => debug_render::OutputFormat::Plain,
- "json" => debug_render::OutputFormat::Json,
- _ => debug_render::OutputFormat::Ansi,
- };
- debug_render::run(input, output_format).await
+ inline::run(command, args.api_endpoint, args.api_token, settings, hook).await
}
}
}