aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-ai/src/commands.rs
diff options
context:
space:
mode:
authorMichelle Tilley <michelle@michelletilley.net>2026-03-26 19:19:47 -0700
committerGitHub <noreply@github.com>2026-03-27 02:19:47 +0000
commitb649a7ab8de6488c1341e94c37d032c07d5b3f13 (patch)
treeca9aadc1175b8439dd85de135f3804681b755776 /crates/atuin-ai/src/commands.rs
parentfix: set WorkingDirectory in PowerShell Invoke-AtuinSearch (#3351) (diff)
downloadatuin-b649a7ab8de6488c1341e94c37d032c07d5b3f13.zip
feat: Use eye-declare for more performant and flexible AI TUI (#3343)
This PR replaces the mess of custom rendering code in Atuin AI with [eye-declare](https://github.com/BinaryMuse/eye-declare), and updates the TUI to feel more terminal-native: output appears inline and persists in scrollback, so you can scroll up and look at previous conversations for reference. The "review" state — which used to exist between the LLM generating a response and the user either executing or following up — has been removed; just start typing to follow up with the LLM, or press `enter` at the empty input box to execute the suggested command. <img width="1203" height="633" alt="image" src="https://github.com/user-attachments/assets/159ee447-9a2a-4edd-b56e-a79bf1aaaa94" />
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
}
}
}