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 <oscarvarto@users.noreply.github.com>
This commit is contained in:
co-authored by
oscarvarto
parent
3072133e59
commit
9d8b5077b4
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user