Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Fix prompts not being editable (#15796)
Bennet Bo Fennerd9977718d2a5
diff --git a/crates/assistant/src/prompt_library.rs b/crates/assistant/src/prompt_library.rsindex 965a8e3af6d..f83d16a571c 100644--- a/crates/assistant/src/prompt_library.rs+++ b/crates/assistant/src/prompt_library.rs@@ -487,7 +487,7 @@ impl PromptLibrary {let mut editor = Editor::auto_width(cx);editor.set_placeholder_text("Untitled", cx);editor.set_text(prompt_metadata.title.unwrap_or_default(), cx);- editor.set_read_only(true);+ editor.set_read_only(prompt_id.is_built_in());editor});let body_editor = cx.new_view(|cx| {@@ -499,7 +499,7 @@ impl PromptLibrary {});let mut editor = Editor::for_buffer(buffer, None, cx);- editor.set_read_only(true);+ editor.set_read_only(prompt_id.is_built_in());editor.set_soft_wrap_mode(SoftWrap::EditorWidth, cx);editor.set_show_gutter(false, cx);editor.set_show_wrap_guides(false, cx);