From 9d8b5077b4fcc1c3ff65ed807de34cc773e59d54 Mon Sep 17 00:00:00 2001 From: Oscar Vargas Torres <1676245+oscarvarto@users.noreply.github.com> Date: Wed, 26 Nov 2025 00:48:06 -0600 Subject: [PATCH] zeta: Avoid logging an error for not having SWEEP_AI_TOKEN (#43504) Closes #43503 Release Notes: - Fixes ERROR No SWEEP_AI_TOKEN environment variable set Co-authored-by: oscarvarto --- crates/zeta/src/sweep_ai.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/zeta/src/sweep_ai.rs b/crates/zeta/src/sweep_ai.rs index 49870c7c9e917468e70062cbc234e9774fb3668b..c88dda2ae2fd11dd37965e58560df9e98528c9d9 100644 --- a/crates/zeta/src/sweep_ai.rs +++ b/crates/zeta/src/sweep_ai.rs @@ -1,4 +1,4 @@ -use anyhow::{Context as _, Result}; +use anyhow::Result; use cloud_llm_client::predict_edits_v3::Event; use futures::AsyncReadExt as _; use gpui::{ @@ -17,7 +17,6 @@ use std::{ sync::Arc, time::Instant, }; -use util::ResultExt as _; use crate::{EditPrediction, EditPredictionId, EditPredictionInputs}; @@ -31,9 +30,7 @@ pub struct SweepAi { impl SweepAi { pub fn new(cx: &App) -> Self { SweepAi { - api_token: std::env::var("SWEEP_AI_TOKEN") - .context("No SWEEP_AI_TOKEN environment variable set") - .log_err(), + api_token: std::env::var("SWEEP_AI_TOKEN").ok(), debug_info: debug_info(cx), } }