From 4c9180c2755b6457113e8d6a7566c32cf1ad547a Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Mon, 2 Mar 2026 09:12:20 -0800 Subject: chore: Move atuin ai subcommand into core binary (#3212) --- crates/atuin-client/Cargo.toml | 5 ++++- crates/atuin-client/src/settings.rs | 26 ++++++++++---------------- 2 files changed, 14 insertions(+), 17 deletions(-) (limited to 'crates/atuin-client') diff --git a/crates/atuin-client/Cargo.toml b/crates/atuin-client/Cargo.toml index e7380902..22fca174 100644 --- a/crates/atuin-client/Cargo.toml +++ b/crates/atuin-client/Cargo.toml @@ -58,7 +58,10 @@ serde_with = "3.8.1" # encryption rusty_paseto = { version = "0.8.0", default-features = false } -rusty_paserk = { version = "0.5.0", default-features = false, features = ["v4", "serde"] } +rusty_paserk = { version = "0.5.0", default-features = false, features = [ + "v4", + "serde", +] } # sync urlencoding = { version = "2.1.0", optional = true } diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs index 8e874832..bfa94f6e 100644 --- a/crates/atuin-client/src/settings.rs +++ b/crates/atuin-client/src/settings.rs @@ -562,11 +562,11 @@ pub struct Logs { pub struct Ai { /// The address of the Atuin AI endpoint. Used for AI features like command generation. /// Only necessary for custom AI endpoints. - pub ai_endpoint: Option, + pub endpoint: Option, /// The API token for the Atuin AI endpoint. Used for AI features like command generation. /// Only necessary for custom AI endpoints. - pub ai_api_token: Option, + pub api_token: Option, /// Whether or not to send the current working directory to the AI endpoint. pub send_cwd: bool, @@ -691,27 +691,21 @@ impl Logs { } /// Returns the full path for the search log file. - /// If `file` is an absolute path, returns it directly. - /// Otherwise, joins it with `dir`. pub fn search_path(&self) -> PathBuf { let path = PathBuf::from(&self.search.file); - if path.is_absolute() { - path - } else { - PathBuf::from(&self.dir).join(path) - } + PathBuf::from(&self.dir).join(path) } /// Returns the full path for the daemon log file. - /// If `file` is an absolute path, returns it directly. - /// Otherwise, joins it with `dir`. pub fn daemon_path(&self) -> PathBuf { let path = PathBuf::from(&self.daemon.file); - if path.is_absolute() { - path - } else { - PathBuf::from(&self.dir).join(path) - } + PathBuf::from(&self.dir).join(path) + } + + /// Returns the full path for the AI log file. + pub fn ai_path(&self) -> PathBuf { + let path = PathBuf::from(&self.ai.file); + PathBuf::from(&self.dir).join(path) } } -- cgit v1.3.1