aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-ai/src/commands/inline.rs
diff options
context:
space:
mode:
authorMichelle Tilley <michelle@michelletilley.net>2026-03-18 21:44:31 -0700
committerMichelle Tilley <michelle@michelletilley.net>2026-03-18 21:44:31 -0700
commitfe2761b003df2f5e11e7c17dfc144e0e847742e0 (patch)
tree950e946c0ea0f50fd59256575f33b6b84cb9e0ea /crates/atuin-ai/src/commands/inline.rs
parentdocs: Remove 'experimental' status from Atuin Daemon (#3295) (diff)
downloadatuin-fe2761b003df2f5e11e7c17dfc144e0e847742e0.zip
fix: Call ensure_hub_session even if primary sync endpoint is self-hosted
Diffstat (limited to 'crates/atuin-ai/src/commands/inline.rs')
-rw-r--r--crates/atuin-ai/src/commands/inline.rs12
1 files 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(