Extract PromptStore and PromptBuilder to new prompt_library crate (#23254)

This PR adds a new `prompt_library` crate and extracts the `PromptStore`
and `PromptBuilder` to it.

Eventually we'll want to house the `PromptLibrary` itself in this crate,
but right now that involves untangling a few dependencies.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-01-16 15:06:16 -05:00 committed by GitHub
parent c9f24c7d45
commit 1b1c2e55f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 524 additions and 768 deletions

View file

@ -29,6 +29,7 @@ use language_models::report_assistant_event;
use multi_buffer::MultiBufferRow;
use parking_lot::Mutex;
use project::{CodeAction, ProjectTransaction};
use prompt_library::PromptBuilder;
use settings::{Settings, SettingsStore};
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
@ -42,9 +43,9 @@ use workspace::{notifications::NotificationId, ItemHandle, Toast, Workspace};
use crate::buffer_codegen::{BufferCodegen, CodegenAlternative, CodegenEvent};
use crate::context_store::ContextStore;
use crate::inline_prompt_editor::{CodegenStatus, InlineAssistId, PromptEditor, PromptEditorEvent};
use crate::terminal_inline_assistant::TerminalInlineAssistant;
use crate::thread_store::ThreadStore;
use crate::AssistantPanel;
use crate::{prompts::PromptBuilder, terminal_inline_assistant::TerminalInlineAssistant};
pub fn init(
fs: Arc<dyn Fs>,