Add setting to disable all AI features (#34896)
https://github.com/user-attachments/assets/674bba41-40ac-4a98-99e4-0b47f9097b6a Release Notes: - Added setting to disable all AI features
This commit is contained in:
parent
939f9fffa3
commit
96f9942791
19 changed files with 308 additions and 68 deletions
|
@ -1,5 +1,5 @@
|
|||
use anyhow::Result;
|
||||
use client::{UserStore, zed_urls};
|
||||
use client::{DisableAiSettings, UserStore, zed_urls};
|
||||
use copilot::{Copilot, Status};
|
||||
use editor::{
|
||||
Editor, SelectionEffects,
|
||||
|
@ -72,6 +72,11 @@ enum SupermavenButtonStatus {
|
|||
|
||||
impl Render for InlineCompletionButton {
|
||||
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
// Return empty div if AI is disabled
|
||||
if DisableAiSettings::get_global(cx).disable_ai {
|
||||
return div();
|
||||
}
|
||||
|
||||
let all_language_settings = all_language_settings(None, cx);
|
||||
|
||||
match all_language_settings.edit_predictions.provider {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue