diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2026-03-19 06:44:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-19 06:44:25 +0000 |
| commit | c51e21735c444b677d3ca0219ee69b741f40c4f8 (patch) | |
| tree | 8998f811bca40809256f2c28191549eed90f21db /crates/atuin-ai/src/commands/inline.rs | |
| parent | fix: redirect tty0 when running setup (#3302) (diff) | |
| parent | fix: Call ensure_hub_session even if primary sync endpoint is self-hosted (diff) | |
| download | atuin-c51e21735c444b677d3ca0219ee69b741f40c4f8.zip | |
fix: Call ensure_hub_session even if primary sync endpoint is self-hosted (#3301)
Fixes
https://discord.com/channels/954121165239115808/1484018882254602240
Diffstat (limited to 'crates/atuin-ai/src/commands/inline.rs')
| -rw-r--r-- | crates/atuin-ai/src/commands/inline.rs | 12 |
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( |
