mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 05:00:16 +00:00
Fix rustfmt by pulling out long string into constant
This commit is contained in:
parent
1cbdf2ba22
commit
62f5becf1f
1 changed files with 34 additions and 33 deletions
|
@ -282,6 +282,8 @@ impl EventEmitter<ViewEvent> for ProjectSearchView {}
|
||||||
|
|
||||||
impl Render for ProjectSearchView {
|
impl Render for ProjectSearchView {
|
||||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||||
|
const PLEASE_AUTHENTICATE: &str = "API Key Missing: Please set 'OPENAI_API_KEY' in Environment Variables. If you authenticated using the Assistant Panel, please restart Zed to Authenticate.";
|
||||||
|
|
||||||
if self.has_matches() {
|
if self.has_matches() {
|
||||||
div()
|
div()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
|
@ -307,8 +309,7 @@ impl Render for ProjectSearchView {
|
||||||
SemanticIndexStatus::NotAuthenticated => {
|
SemanticIndexStatus::NotAuthenticated => {
|
||||||
major_text = Label::new("Not Authenticated");
|
major_text = Label::new("Not Authenticated");
|
||||||
show_minor_text = false;
|
show_minor_text = false;
|
||||||
Some(
|
Some(PLEASE_AUTHENTICATE.to_string())
|
||||||
"API Key Missing: Please set 'OPENAI_API_KEY' in Environment Variables. If you authenticated using the Assistant Panel, please restart Zed to Authenticate.".to_string())
|
|
||||||
}
|
}
|
||||||
SemanticIndexStatus::Indexed => Some("Indexing complete".to_string()),
|
SemanticIndexStatus::Indexed => Some("Indexing complete".to_string()),
|
||||||
SemanticIndexStatus::Indexing {
|
SemanticIndexStatus::Indexing {
|
||||||
|
|
Loading…
Reference in a new issue