From fe2761b003df2f5e11e7c17dfc144e0e847742e0 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Wed, 18 Mar 2026 21:44:31 -0700 Subject: fix: Call ensure_hub_session even if primary sync endpoint is self-hosted --- crates/atuin-ai/src/commands/inline.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/atuin-ai/src/commands/inline.rs b/crates/atuin-ai/src/commands/inline.rs index 7cfacc77..af1d2137 100644 --- a/crates/atuin-ai/src/commands/inline.rs +++ b/crates/atuin-ai/src/commands/inline.rs @@ -57,12 +57,12 @@ pub async fn run( let token = if let Some(token) = &api_token { token.to_string() } else { - // If no token is provided, assume we're using Hub as the endpoint if we're using Hub sync - if settings.is_hub_sync() { - ensure_hub_session(settings).await? - } else { - bail!("No API token provided in ai.api_token settings or command line argument.") - } + // ensure_hub_session will authenticate against settings.active_hub_endpoint().unwrap_or_default(), + // which is the default Hub endpoint if no endpoint is provided + // + // TODO[mkt]: Atuin AI and the Hub sync endpoint are too tightly coupled; + // current setup means that Hub endpoint controls auth while AI endpoint controls AI conversations + ensure_hub_session(settings).await? }; let action = run_inline_tui( -- cgit v1.3.1