From d495c1b8049e3590dba276ebaea42f83534c8bda Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 24 May 2023 10:58:33 -0600 Subject: [PATCH] Only run AI agent on dev and preview --- crates/ai/src/ai.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ai/src/ai.rs b/crates/ai/src/ai.rs index 290ae07b43..ed35b9abb9 100644 --- a/crates/ai/src/ai.rs +++ b/crates/ai/src/ai.rs @@ -13,6 +13,7 @@ use std::cell::RefCell; use std::fs; use std::rc::Rc; use std::{io, sync::Arc}; +use util::channel::{ReleaseChannel, RELEASE_CHANNEL}; use util::{ResultExt, TryFutureExt}; actions!(ai, [Assist]); @@ -85,6 +86,10 @@ struct OpenAIChoice { } pub fn init(cx: &mut AppContext) { + if *RELEASE_CHANNEL == ReleaseChannel::Stable { + return; + } + let assistant = Rc::new(Assistant::default()); cx.add_action({ let assistant = assistant.clone();