From 5a7222edc5fc2884b9e62a14ccfc9a993b544f71 Mon Sep 17 00:00:00 2001 From: Neo Nie Date: Mon, 7 Apr 2025 17:11:14 +0100 Subject: [PATCH] prompt_store: Remove additional code for /project (#27981) Found leftover from https://github.com/zed-industries/zed/pull/27660 Release Notes: - N/A --- assets/prompts/project_slash_command.hbs | 8 -------- crates/prompt_store/src/prompts.rs | 15 --------------- docs/src/assistant/prompting.md | 2 -- 3 files changed, 25 deletions(-) delete mode 100644 assets/prompts/project_slash_command.hbs diff --git a/assets/prompts/project_slash_command.hbs b/assets/prompts/project_slash_command.hbs deleted file mode 100644 index 6c63f71d89..0000000000 --- a/assets/prompts/project_slash_command.hbs +++ /dev/null @@ -1,8 +0,0 @@ -A software developer is asking a question about their project. The source files in their project have been indexed into a database of semantic text embeddings. -Your task is to generate a list of 4 diverse search queries that can be run on this embedding database, in order to retrieve a list of code snippets -that are relevant to the developer's question. Redundant search queries will be heavily penalized, so only include another query if it's sufficiently -distinct from previous ones. - -Here is the question that's been asked, together with context that the developer has added manually: - -{{{context_buffer}}} diff --git a/crates/prompt_store/src/prompts.rs b/crates/prompt_store/src/prompts.rs index 26d1c99e8f..f0b8fce68e 100644 --- a/crates/prompt_store/src/prompts.rs +++ b/crates/prompt_store/src/prompts.rs @@ -77,11 +77,6 @@ pub struct TerminalAssistantPromptContext { pub user_prompt: String, } -#[derive(Serialize)] -pub struct ProjectSlashCommandPromptContext { - pub context_buffer: String, -} - pub struct PromptLoadingParams<'a> { pub fs: Arc, pub repo_path: Option, @@ -375,14 +370,4 @@ impl PromptBuilder { pub fn generate_suggest_edits_prompt(&self) -> Result { self.handlebars.lock().render("suggest_edits", &()) } - - pub fn generate_project_slash_command_prompt( - &self, - context_buffer: String, - ) -> Result { - self.handlebars.lock().render( - "project_slash_command", - &ProjectSlashCommandPromptContext { context_buffer }, - ) - } } diff --git a/docs/src/assistant/prompting.md b/docs/src/assistant/prompting.md index 4a46386bc8..6ea446e202 100644 --- a/docs/src/assistant/prompting.md +++ b/docs/src/assistant/prompting.md @@ -155,8 +155,6 @@ The following templates can be overridden: 3. [`suggest_edits.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/suggest_edits.hbs): Used for generating the model instructions for the XML Suggest Edits should return. -4. [`project_slash_command.hbs`](https://github.com/zed-industries/zed/tree/main/assets/prompts/project_slash_command.hbs) - > **Note:** Be sure you want to override these, as you'll miss out on iteration on our built-in features. This should be primarily used when developing Zed. You can customize these templates to better suit your needs while maintaining the core structure and variables used by Zed. Zed will automatically reload your prompt overrides when they change on disk.