Remove per-file copilot enable/disable
This commit is contained in:
parent
0250898a2b
commit
48d9c30b0e
4 changed files with 14 additions and 90 deletions
|
@ -249,19 +249,6 @@ impl CopilotButton {
|
|||
|
||||
let mut menu_options = Vec::with_capacity(6);
|
||||
|
||||
if let Some((_, view_id)) = self.editor_subscription.as_ref() {
|
||||
let locally_enabled = self.editor_enabled.unwrap_or(settings.copilot_on(None));
|
||||
menu_options.push(ContextMenuItem::item_for_view(
|
||||
if locally_enabled {
|
||||
"Pause Copilot for this file"
|
||||
} else {
|
||||
"Resume Copilot for this file"
|
||||
},
|
||||
*view_id,
|
||||
copilot::Toggle,
|
||||
));
|
||||
}
|
||||
|
||||
if let Some(language) = &self.language {
|
||||
let language_enabled = settings.copilot_on(Some(language.as_ref()));
|
||||
|
||||
|
@ -334,11 +321,7 @@ impl CopilotButton {
|
|||
|
||||
self.language = language_name.clone();
|
||||
|
||||
if let Some(enabled) = editor.copilot_state.user_enabled {
|
||||
self.editor_enabled = Some(enabled);
|
||||
} else {
|
||||
self.editor_enabled = Some(settings.copilot_on(language_name.as_deref()));
|
||||
}
|
||||
self.editor_enabled = Some(settings.copilot_on(language_name.as_deref()));
|
||||
|
||||
cx.notify()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue