Only run AI agent on dev and preview
This commit is contained in:
parent
35f9996a4f
commit
d495c1b804
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,7 @@ use std::cell::RefCell;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::{io, sync::Arc};
|
use std::{io, sync::Arc};
|
||||||
|
use util::channel::{ReleaseChannel, RELEASE_CHANNEL};
|
||||||
use util::{ResultExt, TryFutureExt};
|
use util::{ResultExt, TryFutureExt};
|
||||||
|
|
||||||
actions!(ai, [Assist]);
|
actions!(ai, [Assist]);
|
||||||
|
@ -85,6 +86,10 @@ struct OpenAIChoice {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(cx: &mut AppContext) {
|
pub fn init(cx: &mut AppContext) {
|
||||||
|
if *RELEASE_CHANNEL == ReleaseChannel::Stable {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let assistant = Rc::new(Assistant::default());
|
let assistant = Rc::new(Assistant::default());
|
||||||
cx.add_action({
|
cx.add_action({
|
||||||
let assistant = assistant.clone();
|
let assistant = assistant.clone();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue