chore: Extract PromptStore out of prompt_library (#25837)
One step closer to removing long pole with assistant/assistant2 builds Release Notes: - N/A
This commit is contained in:
parent
53b2792844
commit
7fb16977ce
32 changed files with 99 additions and 53 deletions
45
Cargo.lock
generated
45
Cargo.lock
generated
|
@ -405,6 +405,7 @@ dependencies = [
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
"prompt_library",
|
"prompt_library",
|
||||||
|
"prompt_store",
|
||||||
"proto",
|
"proto",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rope",
|
"rope",
|
||||||
|
@ -472,6 +473,7 @@ dependencies = [
|
||||||
"picker",
|
"picker",
|
||||||
"project",
|
"project",
|
||||||
"prompt_library",
|
"prompt_library",
|
||||||
|
"prompt_store",
|
||||||
"proto",
|
"proto",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rope",
|
"rope",
|
||||||
|
@ -526,7 +528,7 @@ dependencies = [
|
||||||
"picker",
|
"picker",
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
"prompt_library",
|
"prompt_store",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex",
|
"regex",
|
||||||
"rope",
|
"rope",
|
||||||
|
@ -617,7 +619,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
"prompt_library",
|
"prompt_store",
|
||||||
"rope",
|
"rope",
|
||||||
"schemars",
|
"schemars",
|
||||||
"semantic_index",
|
"semantic_index",
|
||||||
|
@ -2842,7 +2844,7 @@ dependencies = [
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
"prometheus",
|
"prometheus",
|
||||||
"prompt_library",
|
"prompt_store",
|
||||||
"prost 0.9.0",
|
"prost 0.9.0",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"recent_projects",
|
"recent_projects",
|
||||||
|
@ -10313,12 +10315,36 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prompt_library"
|
name = "prompt_library"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"collections",
|
||||||
|
"editor",
|
||||||
|
"gpui",
|
||||||
|
"language",
|
||||||
|
"language_model",
|
||||||
|
"log",
|
||||||
|
"menu",
|
||||||
|
"picker",
|
||||||
|
"prompt_store",
|
||||||
|
"release_channel",
|
||||||
|
"rope",
|
||||||
|
"serde",
|
||||||
|
"settings",
|
||||||
|
"theme",
|
||||||
|
"ui",
|
||||||
|
"util",
|
||||||
|
"workspace",
|
||||||
|
"zed_actions",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "prompt_store"
|
||||||
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assets",
|
"assets",
|
||||||
"chrono",
|
"chrono",
|
||||||
"collections",
|
"collections",
|
||||||
"editor",
|
|
||||||
"fs",
|
"fs",
|
||||||
"futures 0.3.31",
|
"futures 0.3.31",
|
||||||
"fuzzy",
|
"fuzzy",
|
||||||
|
@ -10326,23 +10352,14 @@ dependencies = [
|
||||||
"handlebars 4.5.0",
|
"handlebars 4.5.0",
|
||||||
"heed",
|
"heed",
|
||||||
"language",
|
"language",
|
||||||
"language_model",
|
|
||||||
"log",
|
"log",
|
||||||
"menu",
|
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"paths",
|
"paths",
|
||||||
"picker",
|
|
||||||
"release_channel",
|
|
||||||
"rope",
|
"rope",
|
||||||
"serde",
|
"serde",
|
||||||
"settings",
|
|
||||||
"text",
|
"text",
|
||||||
"theme",
|
|
||||||
"ui",
|
|
||||||
"util",
|
"util",
|
||||||
"uuid",
|
"uuid",
|
||||||
"workspace",
|
|
||||||
"zed_actions",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -16828,7 +16845,7 @@ dependencies = [
|
||||||
"project",
|
"project",
|
||||||
"project_panel",
|
"project_panel",
|
||||||
"project_symbols",
|
"project_symbols",
|
||||||
"prompt_library",
|
"prompt_store",
|
||||||
"proto",
|
"proto",
|
||||||
"recent_projects",
|
"recent_projects",
|
||||||
"release_channel",
|
"release_channel",
|
||||||
|
|
|
@ -103,6 +103,7 @@ members = [
|
||||||
"crates/project_panel",
|
"crates/project_panel",
|
||||||
"crates/project_symbols",
|
"crates/project_symbols",
|
||||||
"crates/prompt_library",
|
"crates/prompt_library",
|
||||||
|
"crates/prompt_store",
|
||||||
"crates/proto",
|
"crates/proto",
|
||||||
"crates/recent_projects",
|
"crates/recent_projects",
|
||||||
"crates/refineable",
|
"crates/refineable",
|
||||||
|
@ -308,6 +309,7 @@ project = { path = "crates/project" }
|
||||||
project_panel = { path = "crates/project_panel" }
|
project_panel = { path = "crates/project_panel" }
|
||||||
project_symbols = { path = "crates/project_symbols" }
|
project_symbols = { path = "crates/project_symbols" }
|
||||||
prompt_library = { path = "crates/prompt_library" }
|
prompt_library = { path = "crates/prompt_library" }
|
||||||
|
prompt_store = { path = "crates/prompt_store" }
|
||||||
proto = { path = "crates/proto" }
|
proto = { path = "crates/proto" }
|
||||||
recent_projects = { path = "crates/recent_projects" }
|
recent_projects = { path = "crates/recent_projects" }
|
||||||
refineable = { path = "crates/refineable" }
|
refineable = { path = "crates/refineable" }
|
||||||
|
|
|
@ -51,6 +51,7 @@ parking_lot.workspace = true
|
||||||
paths.workspace = true
|
paths.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
prompt_library.workspace = true
|
prompt_library.workspace = true
|
||||||
|
prompt_store.workspace = true
|
||||||
proto.workspace = true
|
proto.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
schemars.workspace = true
|
schemars.workspace = true
|
||||||
|
|
|
@ -19,7 +19,7 @@ use gpui::{actions, App, Global, UpdateGlobal};
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModelId, LanguageModelProviderId, LanguageModelRegistry, LanguageModelResponseMessage,
|
LanguageModelId, LanguageModelProviderId, LanguageModelRegistry, LanguageModelResponseMessage,
|
||||||
};
|
};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use semantic_index::{CloudEmbeddingProvider, SemanticDb};
|
use semantic_index::{CloudEmbeddingProvider, SemanticDb};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use settings::{Settings, SettingsStore};
|
use settings::{Settings, SettingsStore};
|
||||||
|
|
|
@ -24,7 +24,8 @@ use language_model::{
|
||||||
AuthenticateError, LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID,
|
AuthenticateError, LanguageModelProviderId, LanguageModelRegistry, ZED_CLOUD_PROVIDER_ID,
|
||||||
};
|
};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::{open_prompt_library, PromptBuilder, PromptLibrary};
|
use prompt_library::{open_prompt_library, PromptLibrary};
|
||||||
|
use prompt_store::PromptBuilder;
|
||||||
use search::{buffer_search::DivRegistrar, BufferSearchBar};
|
use search::{buffer_search::DivRegistrar, BufferSearchBar};
|
||||||
use settings::{update_settings_file, Settings};
|
use settings::{update_settings_file, Settings};
|
||||||
use smol::stream::StreamExt;
|
use smol::stream::StreamExt;
|
||||||
|
|
|
@ -39,7 +39,7 @@ use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::{CodeAction, ProjectTransaction};
|
use project::{CodeAction, ProjectTransaction};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use rope::Rope;
|
use rope::Rope;
|
||||||
use settings::{update_settings_file, Settings, SettingsStore};
|
use settings::{update_settings_file, Settings, SettingsStore};
|
||||||
use smol::future::FutureExt;
|
use smol::future::FutureExt;
|
||||||
|
|
|
@ -20,7 +20,7 @@ use language_model::{
|
||||||
LanguageModelRequestMessage, Role,
|
LanguageModelRequestMessage, Role,
|
||||||
};
|
};
|
||||||
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
|
use language_model_selector::{InlineLanguageModelSelector, LanguageModelSelector};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use settings::{update_settings_file, Settings};
|
use settings::{update_settings_file, Settings};
|
||||||
use std::{
|
use std::{
|
||||||
cmp,
|
cmp,
|
||||||
|
|
|
@ -56,6 +56,7 @@ paths.workspace = true
|
||||||
picker.workspace = true
|
picker.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
prompt_library.workspace = true
|
prompt_library.workspace = true
|
||||||
|
prompt_store.workspace = true
|
||||||
proto.workspace = true
|
proto.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
|
|
|
@ -27,7 +27,7 @@ use command_palette_hooks::CommandPaletteFilter;
|
||||||
use feature_flags::{Assistant2FeatureFlag, FeatureFlagAppExt};
|
use feature_flags::{Assistant2FeatureFlag, FeatureFlagAppExt};
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use gpui::{actions, App};
|
use gpui::{actions, App};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use settings::Settings as _;
|
use settings::Settings as _;
|
||||||
|
|
||||||
pub use crate::assistant_panel::{AssistantPanel, ConcreteAssistantPanelDelegate};
|
pub use crate::assistant_panel::{AssistantPanel, ConcreteAssistantPanelDelegate};
|
||||||
|
|
|
@ -20,7 +20,8 @@ use gpui::{
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use language_model::{LanguageModelProviderTosView, LanguageModelRegistry};
|
use language_model::{LanguageModelProviderTosView, LanguageModelRegistry};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::{open_prompt_library, PromptBuilder, PromptLibrary};
|
use prompt_library::{open_prompt_library, PromptLibrary};
|
||||||
|
use prompt_store::PromptBuilder;
|
||||||
use settings::{update_settings_file, Settings};
|
use settings::{update_settings_file, Settings};
|
||||||
use time::UtcOffset;
|
use time::UtcOffset;
|
||||||
use ui::{prelude::*, ContextMenu, KeyBinding, PopoverMenu, PopoverMenuHandle, Tab, Tooltip};
|
use ui::{prelude::*, ContextMenu, KeyBinding, PopoverMenu, PopoverMenuHandle, Tab, Tooltip};
|
||||||
|
|
|
@ -14,7 +14,7 @@ use language_model::{
|
||||||
};
|
};
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use rope::Rope;
|
use rope::Rope;
|
||||||
use smol::future::FutureExt;
|
use smol::future::FutureExt;
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
@ -28,7 +28,7 @@ use language_model::{report_assistant_event, LanguageModelRegistry};
|
||||||
use multi_buffer::MultiBufferRow;
|
use multi_buffer::MultiBufferRow;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::{CodeAction, ProjectTransaction};
|
use project::{CodeAction, ProjectTransaction};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use settings::{Settings, SettingsStore};
|
use settings::{Settings, SettingsStore};
|
||||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||||
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
use terminal_view::{terminal_panel::TerminalPanel, TerminalView};
|
||||||
|
|
|
@ -16,7 +16,7 @@ use language_model::{
|
||||||
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
|
report_assistant_event, LanguageModelRegistry, LanguageModelRequest,
|
||||||
LanguageModelRequestMessage, Role,
|
LanguageModelRequestMessage, Role,
|
||||||
};
|
};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||||
use terminal_view::TerminalView;
|
use terminal_view::TerminalView;
|
||||||
|
|
|
@ -37,7 +37,7 @@ parking_lot.workspace = true
|
||||||
paths.workspace = true
|
paths.workspace = true
|
||||||
picker.workspace = true
|
picker.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
prompt_library.workspace = true
|
prompt_store.workspace = true
|
||||||
regex.workspace = true
|
regex.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
rpc.workspace = true
|
rpc.workspace = true
|
||||||
|
|
|
@ -27,7 +27,7 @@ use language_model::{
|
||||||
use open_ai::Model as OpenAiModel;
|
use open_ai::Model as OpenAiModel;
|
||||||
use paths::contexts_dir;
|
use paths::contexts_dir;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::{
|
use std::{
|
||||||
|
|
|
@ -20,7 +20,7 @@ use language_model::{LanguageModelCacheConfiguration, LanguageModelRegistry, Rol
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use settings::SettingsStore;
|
use settings::SettingsStore;
|
||||||
|
@ -671,7 +671,7 @@ async fn test_slash_commands(cx: &mut TestAppContext) {
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_workflow_step_parsing(cx: &mut TestAppContext) {
|
async fn test_workflow_step_parsing(cx: &mut TestAppContext) {
|
||||||
cx.update(prompt_library::init);
|
cx.update(prompt_store::init);
|
||||||
let mut settings_store = cx.update(SettingsStore::test);
|
let mut settings_store = cx.update(SettingsStore::test);
|
||||||
cx.update(|cx| {
|
cx.update(|cx| {
|
||||||
settings_store
|
settings_store
|
||||||
|
|
|
@ -16,7 +16,7 @@ use gpui::{App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Task,
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use paths::contexts_dir;
|
use paths::contexts_dir;
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use rpc::AnyProtoClient;
|
use rpc::AnyProtoClient;
|
||||||
use std::sync::LazyLock;
|
use std::sync::LazyLock;
|
||||||
|
|
|
@ -32,7 +32,7 @@ language.workspace = true
|
||||||
language_model.workspace = true
|
language_model.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
prompt_library.workspace = true
|
prompt_store.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
schemars.workspace = true
|
schemars.workspace = true
|
||||||
semantic_index.workspace = true
|
semantic_index.workspace = true
|
||||||
|
|
|
@ -5,7 +5,7 @@ use assistant_slash_command::{
|
||||||
};
|
};
|
||||||
use gpui::{Task, WeakEntity};
|
use gpui::{Task, WeakEntity};
|
||||||
use language::{BufferSnapshot, LspAdapterDelegate};
|
use language::{BufferSnapshot, LspAdapterDelegate};
|
||||||
use prompt_library::PromptStore;
|
use prompt_store::PromptStore;
|
||||||
use std::{
|
use std::{
|
||||||
fmt::Write,
|
fmt::Write,
|
||||||
sync::{atomic::AtomicBool, Arc},
|
sync::{atomic::AtomicBool, Arc},
|
||||||
|
|
|
@ -13,7 +13,7 @@ use feature_flags::FeatureFlag;
|
||||||
use gpui::{App, Task, WeakEntity};
|
use gpui::{App, Task, WeakEntity};
|
||||||
use language::{Anchor, CodeLabel, LspAdapterDelegate};
|
use language::{Anchor, CodeLabel, LspAdapterDelegate};
|
||||||
use language_model::{LanguageModelRegistry, LanguageModelTool};
|
use language_model::{LanguageModelRegistry, LanguageModelTool};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use semantic_index::SemanticDb;
|
use semantic_index::SemanticDb;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
|
@ -5,7 +5,7 @@ use assistant_slash_command::{
|
||||||
};
|
};
|
||||||
use gpui::{Task, WeakEntity};
|
use gpui::{Task, WeakEntity};
|
||||||
use language::{BufferSnapshot, LspAdapterDelegate};
|
use language::{BufferSnapshot, LspAdapterDelegate};
|
||||||
use prompt_library::PromptStore;
|
use prompt_store::PromptStore;
|
||||||
use std::sync::{atomic::AtomicBool, Arc};
|
use std::sync::{atomic::AtomicBool, Arc};
|
||||||
use ui::prelude::*;
|
use ui::prelude::*;
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
|
|
|
@ -111,7 +111,7 @@ node_runtime.workspace = true
|
||||||
notifications = { workspace = true, features = ["test-support"] }
|
notifications = { workspace = true, features = ["test-support"] }
|
||||||
pretty_assertions.workspace = true
|
pretty_assertions.workspace = true
|
||||||
project = { workspace = true, features = ["test-support"] }
|
project = { workspace = true, features = ["test-support"] }
|
||||||
prompt_library.workspace = true
|
prompt_store.workspace = true
|
||||||
recent_projects = { workspace = true }
|
recent_projects = { workspace = true }
|
||||||
release_channel.workspace = true
|
release_channel.workspace = true
|
||||||
remote = { workspace = true, features = ["test-support"] }
|
remote = { workspace = true, features = ["test-support"] }
|
||||||
|
|
|
@ -14,7 +14,7 @@ use client::{User, RECEIVE_TIMEOUT};
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use fs::{FakeFs, Fs as _, RemoveOptions};
|
use fs::{FakeFs, Fs as _, RemoveOptions};
|
||||||
use futures::{channel::mpsc, StreamExt as _};
|
use futures::{channel::mpsc, StreamExt as _};
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
|
|
||||||
use git::status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus, UnmergedStatusCode};
|
use git::status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus, UnmergedStatusCode};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
|
|
@ -13,31 +13,21 @@ path = "src/prompt_library.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
assets.workspace = true
|
|
||||||
chrono.workspace = true
|
|
||||||
collections.workspace = true
|
collections.workspace = true
|
||||||
editor.workspace = true
|
editor.workspace = true
|
||||||
fs.workspace = true
|
|
||||||
futures.workspace = true
|
|
||||||
fuzzy.workspace = true
|
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
handlebars.workspace = true
|
|
||||||
heed.workspace = true
|
|
||||||
language.workspace = true
|
language.workspace = true
|
||||||
language_model.workspace = true
|
language_model.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
menu.workspace = true
|
menu.workspace = true
|
||||||
parking_lot.workspace = true
|
|
||||||
paths.workspace = true
|
|
||||||
picker.workspace = true
|
picker.workspace = true
|
||||||
|
prompt_store.workspace = true
|
||||||
release_channel.workspace = true
|
release_channel.workspace = true
|
||||||
rope.workspace = true
|
rope.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
settings.workspace = true
|
settings.workspace = true
|
||||||
text.workspace = true
|
|
||||||
theme.workspace = true
|
theme.workspace = true
|
||||||
ui.workspace = true
|
ui.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
uuid.workspace = true
|
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
zed_actions.workspace = true
|
zed_actions.workspace = true
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
mod prompt_store;
|
|
||||||
mod prompts;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::CompletionProvider;
|
use editor::CompletionProvider;
|
||||||
|
@ -29,8 +26,7 @@ use util::{ResultExt, TryFutureExt};
|
||||||
use workspace::Workspace;
|
use workspace::Workspace;
|
||||||
use zed_actions::assistant::InlineAssist;
|
use zed_actions::assistant::InlineAssist;
|
||||||
|
|
||||||
pub use crate::prompt_store::*;
|
use prompt_store::*;
|
||||||
pub use crate::prompts::*;
|
|
||||||
|
|
||||||
pub fn init(cx: &mut App) {
|
pub fn init(cx: &mut App) {
|
||||||
prompt_store::init(cx);
|
prompt_store::init(cx);
|
||||||
|
|
33
crates/prompt_store/Cargo.toml
Normal file
33
crates/prompt_store/Cargo.toml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[package]
|
||||||
|
name = "prompt_store"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition.workspace = true
|
||||||
|
publish.workspace = true
|
||||||
|
license = "GPL-3.0-or-later"
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
path = "src/prompt_store.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
anyhow.workspace = true
|
||||||
|
assets.workspace = true
|
||||||
|
chrono.workspace = true
|
||||||
|
collections.workspace = true
|
||||||
|
fs.workspace = true
|
||||||
|
futures.workspace = true
|
||||||
|
fuzzy.workspace = true
|
||||||
|
gpui.workspace = true
|
||||||
|
handlebars.workspace = true
|
||||||
|
heed.workspace = true
|
||||||
|
language.workspace = true
|
||||||
|
log.workspace = true
|
||||||
|
parking_lot.workspace = true
|
||||||
|
paths.workspace = true
|
||||||
|
rope.workspace = true
|
||||||
|
serde.workspace = true
|
||||||
|
text.workspace = true
|
||||||
|
util.workspace = true
|
||||||
|
uuid.workspace = true
|
1
crates/prompt_store/LICENSE-GPL
Symbolic link
1
crates/prompt_store/LICENSE-GPL
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../LICENSE-GPL
|
|
@ -1,3 +1,5 @@
|
||||||
|
mod prompts;
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
|
@ -10,6 +12,7 @@ use heed::{
|
||||||
Database, RoTxn,
|
Database, RoTxn,
|
||||||
};
|
};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
|
pub use prompts::*;
|
||||||
use rope::Rope;
|
use rope::Rope;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{
|
use std::{
|
|
@ -90,7 +90,7 @@ profiling.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
project_panel.workspace = true
|
project_panel.workspace = true
|
||||||
project_symbols.workspace = true
|
project_symbols.workspace = true
|
||||||
prompt_library.workspace = true
|
prompt_store.workspace = true
|
||||||
proto.workspace = true
|
proto.workspace = true
|
||||||
recent_projects.workspace = true
|
recent_projects.workspace = true
|
||||||
release_channel.workspace = true
|
release_channel.workspace = true
|
||||||
|
|
|
@ -23,7 +23,7 @@ use gpui::{App, AppContext as _, Application, AsyncApp, UpdateGlobal as _};
|
||||||
use gpui_tokio::Tokio;
|
use gpui_tokio::Tokio;
|
||||||
use http_client::{read_proxy_from_env, Uri};
|
use http_client::{read_proxy_from_env, Uri};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use reqwest_client::ReqwestClient;
|
use reqwest_client::ReqwestClient;
|
||||||
|
|
||||||
use assets::Assets;
|
use assets::Assets;
|
||||||
|
|
|
@ -37,7 +37,7 @@ use outline_panel::OutlinePanel;
|
||||||
use paths::{local_settings_file_relative_path, local_tasks_file_relative_path};
|
use paths::{local_settings_file_relative_path, local_tasks_file_relative_path};
|
||||||
use project::{DirectoryLister, ProjectItem};
|
use project::{DirectoryLister, ProjectItem};
|
||||||
use project_panel::ProjectPanel;
|
use project_panel::ProjectPanel;
|
||||||
use prompt_library::PromptBuilder;
|
use prompt_store::PromptBuilder;
|
||||||
use quick_action_bar::QuickActionBar;
|
use quick_action_bar::QuickActionBar;
|
||||||
use recent_projects::open_ssh_project;
|
use recent_projects::open_ssh_project;
|
||||||
use release_channel::{AppCommitSha, ReleaseChannel};
|
use release_channel::{AppCommitSha, ReleaseChannel};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue