Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
git_ui: Do not include git commit prompt twice (#58062)
Bennet Bo Fenner654a864b3a1e
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rsindex a0e7571ccdb..b690916fd2f 100644--- a/crates/git_ui/src/git_panel.rs+++ b/crates/git_ui/src/git_panel.rs@@ -62,7 +62,7 @@ use project::{},project_settings::{GitPathStyle, ProjectSettings},};-use prompt_store::{BuiltInPrompt, PromptId, PromptStore, RULES_FILE_NAMES};+use prompt_store::RULES_FILE_NAMES;use proto::RpcError;use serde::{Deserialize, Serialize};use settings::{Settings, SettingsStore, StatusStyle, update_settings_file};@@ -2685,20 +2685,6 @@ impl GitPanel {}}- async fn load_commit_message_prompt(cx: &mut AsyncApp) -> String {- let load = async {- let store = cx.update(|cx| PromptStore::global(cx)).await.ok()?;- store- .update(cx, |s, cx| {- s.load(PromptId::BuiltIn(BuiltInPrompt::CommitMessage), cx)- })- .await- .ok()- };- load.await- .unwrap_or_else(|| BuiltInPrompt::CommitMessage.default_content().to_string())- }-fn build_commit_message_prompt(prompt: &str,user_agents_md: Option<&str>,@@ -2803,7 +2789,7 @@ impl GitPanel {.and_then(|user_agents_md| user_agents_md.content().cloned())});- let prompt = Self::load_commit_message_prompt(&mut cx).await;+ let prompt = include_str!("../src/commit_message_prompt.txt");let subject = this.update(cx, |this, cx| {this.commit_editor