chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)
Successor to #27779 - in this PR I've applied changes manually, without futzing with if let lifetimes at all. Release Notes: - N/A
This commit is contained in:
parent
d51aa2ffb0
commit
0729d24d77
162 changed files with 2333 additions and 1937 deletions
|
@ -125,11 +125,21 @@ impl LanguageModelProvider for CopilotChatLanguageModelProvider {
|
|||
|
||||
let err = match copilot.read(cx).status() {
|
||||
Status::Authorized => return Task::ready(Ok(())),
|
||||
Status::Disabled => anyhow!("Copilot must be enabled for Copilot Chat to work. Please enable Copilot and try again."),
|
||||
Status::Error(err) => anyhow!(format!("Received the following error while signing into Copilot: {err}")),
|
||||
Status::Starting { task: _ } => anyhow!("Copilot is still starting, please wait for Copilot to start then try again"),
|
||||
Status::Unauthorized => anyhow!("Unable to authorize with Copilot. Please make sure that you have an active Copilot and Copilot Chat subscription."),
|
||||
Status::SignedOut {..} => anyhow!("You have signed out of Copilot. Please sign in to Copilot and try again."),
|
||||
Status::Disabled => anyhow!(
|
||||
"Copilot must be enabled for Copilot Chat to work. Please enable Copilot and try again."
|
||||
),
|
||||
Status::Error(err) => anyhow!(format!(
|
||||
"Received the following error while signing into Copilot: {err}"
|
||||
)),
|
||||
Status::Starting { task: _ } => anyhow!(
|
||||
"Copilot is still starting, please wait for Copilot to start then try again"
|
||||
),
|
||||
Status::Unauthorized => anyhow!(
|
||||
"Unable to authorize with Copilot. Please make sure that you have an active Copilot and Copilot Chat subscription."
|
||||
),
|
||||
Status::SignedOut { .. } => {
|
||||
anyhow!("You have signed out of Copilot. Please sign in to Copilot and try again.")
|
||||
}
|
||||
Status::SigningIn { prompt: _ } => anyhow!("Still signing into Copilot..."),
|
||||
};
|
||||
|
||||
|
@ -398,8 +408,7 @@ impl Render for ConfigurationView {
|
|||
.child(svg().size_8().path(IconName::CopilotError.path()))
|
||||
}
|
||||
_ => {
|
||||
const LABEL: &str =
|
||||
"To use Zed's assistant with GitHub Copilot, you need to be logged in to GitHub. Note that your GitHub account must have an active Copilot Chat subscription.";
|
||||
const LABEL: &str = "To use Zed's assistant with GitHub Copilot, you need to be logged in to GitHub. Note that your GitHub account must have an active Copilot Chat subscription.";
|
||||
v_flex().gap_6().child(Label::new(LABEL)).child(
|
||||
v_flex()
|
||||
.gap_2()
|
||||
|
|
|
@ -2,8 +2,7 @@ use anyhow::{anyhow, Context as _, Result};
|
|||
use collections::BTreeMap;
|
||||
use credentials_provider::CredentialsProvider;
|
||||
use editor::{Editor, EditorElement, EditorStyle};
|
||||
use futures::Stream;
|
||||
use futures::{future::BoxFuture, FutureExt, StreamExt};
|
||||
use futures::{future::BoxFuture, FutureExt, Stream, StreamExt};
|
||||
use google_ai::{FunctionDeclaration, GenerateContentResponse, Part, UsageMetadata};
|
||||
use gpui::{
|
||||
AnyView, App, AsyncApp, Context, Entity, FontStyle, Subscription, Task, TextStyle, WhiteSpace,
|
||||
|
|
|
@ -415,8 +415,7 @@ impl Render for ConfigurationView {
|
|||
let is_authenticated = self.state.read(cx).is_authenticated();
|
||||
|
||||
let lmstudio_intro = "Run local LLMs like Llama, Phi, and Qwen.";
|
||||
let lmstudio_reqs =
|
||||
"To use LM Studio as a provider for Zed assistant, it needs to be running with at least one model downloaded.";
|
||||
let lmstudio_reqs = "To use LM Studio as a provider for Zed assistant, it needs to be running with at least one model downloaded.";
|
||||
|
||||
let inline_code_bg = cx.theme().colors().editor_foreground.opacity(0.05);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue