Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
assistant: Remove some re-exports (#23262)
Marshall Bowers4d22f7e529f3
diff --git a/Cargo.lock b/Cargo.lockindex 346b099d1be..0d48becc83b 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2622,6 +2622,7 @@ dependencies = ["anthropic","anyhow","assistant",+ "assistant_slash_command","assistant_tool","async-stripe","async-trait",@@ -2678,6 +2679,7 @@ dependencies = ["pretty_assertions","project","prometheus",+ "prompt_library","prost 0.9.0","rand 0.8.5","recent_projects",@@ -16246,6 +16248,7 @@ dependencies = ["project","project_panel","project_symbols",+ "prompt_library","proto","recent_projects","release_channel",diff --git a/crates/assistant/src/assistant.rs b/crates/assistant/src/assistant.rsindex a57f4ca3d6f..826d8ab3576 100644--- a/crates/assistant/src/assistant.rs+++ b/crates/assistant/src/assistant.rs@@ -12,35 +12,34 @@ pub mod slash_command_settings;mod streaming_diff;mod terminal_inline_assistant;-pub use ::prompt_library::PromptBuilder;-use ::prompt_library::PromptLoadingParams;-pub use assistant_panel::{AssistantPanel, AssistantPanelEvent};+use std::path::PathBuf;+use std::sync::Arc;++use ::prompt_library::{PromptBuilder, PromptLoadingParams};use assistant_settings::AssistantSettings;use assistant_slash_command::SlashCommandRegistry;-pub use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};use assistant_slash_commands::{ProjectSlashCommandFeatureFlag, SearchSlashCommandFeatureFlag};use client::{proto, Client};use command_palette_hooks::CommandPaletteFilter;-pub use context::*;-pub use context_store::*;use feature_flags::FeatureFlagAppExt;use fs::Fs;use gpui::impl_internal_actions;use gpui::{actions, AppContext, Global, SharedString, UpdateGlobal};-pub(crate) use inline_assistant::*;use language_model::{LanguageModelId, LanguageModelProviderId, LanguageModelRegistry, LanguageModelResponseMessage,};-pub use patch::*;use semantic_index::{CloudEmbeddingProvider, SemanticDb};use serde::{Deserialize, Serialize};use settings::{Settings, SettingsStore};-use std::path::PathBuf;-use std::sync::Arc;-pub(crate) use streaming_diff::*;use util::ResultExt;+pub use crate::assistant_panel::{AssistantPanel, AssistantPanelEvent};+pub use crate::context::*;+pub use crate::context_store::*;+pub(crate) use crate::inline_assistant::*;+pub use crate::patch::*;use crate::slash_command_settings::SlashCommandSettings;+pub(crate) use crate::streaming_diff::*;actions!(assistant,diff --git a/crates/assistant/src/context/context_tests.rs b/crates/assistant/src/context/context_tests.rsindex 444cb6560a0..6876b29913b 100644--- a/crates/assistant/src/context/context_tests.rs+++ b/crates/assistant/src/context/context_tests.rs@@ -1,7 +1,7 @@use super::{AssistantEdit, MessageCacheMetadata};use crate::{assistant_panel, AssistantEditKind, CacheStatus, Context, ContextEvent, ContextId,- ContextOperation, InvokedSlashCommandId, MessageId, MessageStatus, PromptBuilder,+ ContextOperation, InvokedSlashCommandId, MessageId, MessageStatus,};use anyhow::Result;use assistant_slash_command::{@@ -22,6 +22,7 @@ use language_model::{LanguageModelCacheConfiguration, LanguageModelRegistry, Roluse parking_lot::Mutex;use pretty_assertions::assert_eq;use project::Project;+use prompt_library::PromptBuilder;use rand::prelude::*;use serde_json::json;use settings::SettingsStore;diff --git a/crates/assistant/src/context_store.rs b/crates/assistant/src/context_store.rsindex 43fc4b8aa1a..92d9889f93b 100644--- a/crates/assistant/src/context_store.rs+++ b/crates/assistant/src/context_store.rs@@ -1,10 +1,9 @@-use crate::SlashCommandId;use crate::{Context, ContextEvent, ContextId, ContextOperation, ContextVersion, SavedContext,SavedContextMetadata,};use anyhow::{anyhow, Context as _, Result};-use assistant_slash_command::SlashCommandWorkingSet;+use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};use assistant_tool::{ToolId, ToolWorkingSet};use client::{proto, telemetry::Telemetry, Client, TypedEnvelope};use clock::ReplicaId;diff --git a/crates/assistant/src/prompt_library.rs b/crates/assistant/src/prompt_library.rsindex 03997d4ef53..c6c4c1e53dc 100644--- a/crates/assistant/src/prompt_library.rs+++ b/crates/assistant/src/prompt_library.rs@@ -1,6 +1,6 @@-use crate::SlashCommandWorkingSet;use crate::{slash_command::SlashCommandCompletionProvider, AssistantPanel, InlineAssistant};use anyhow::Result;+use assistant_slash_command::SlashCommandWorkingSet;use collections::{HashMap, HashSet};use editor::{actions::Tab, CurrentLineHighlight, Editor, EditorElement, EditorEvent, EditorStyle};use gpui::{diff --git a/crates/assistant/src/slash_command.rs b/crates/assistant/src/slash_command.rsindex b4841647dfc..793d2a950a8 100644--- a/crates/assistant/src/slash_command.rs+++ b/crates/assistant/src/slash_command.rs@@ -1,8 +1,8 @@use crate::assistant_panel::ContextEditor;-use crate::SlashCommandWorkingSet;use anyhow::Result;use assistant_slash_command::AfterCompletion;pub use assistant_slash_command::SlashCommand;+use assistant_slash_command::SlashCommandWorkingSet;use editor::{CompletionProvider, Editor};use fuzzy::{match_strings, StringMatchCandidate};use gpui::{Model, Task, ViewContext, WeakView, WindowContext};diff --git a/crates/assistant/src/slash_command_picker.rs b/crates/assistant/src/slash_command_picker.rsindex 102f706c957..d5840f41963 100644--- a/crates/assistant/src/slash_command_picker.rs+++ b/crates/assistant/src/slash_command_picker.rs@@ -1,11 +1,11 @@use std::sync::Arc;+use assistant_slash_command::SlashCommandWorkingSet;use gpui::{AnyElement, DismissEvent, SharedString, Task, WeakView};use picker::{Picker, PickerDelegate, PickerEditorPosition};use ui::{prelude::*, ListItem, ListItemSpacing, PopoverMenu, PopoverTrigger, Tooltip};use crate::assistant_panel::ContextEditor;-use crate::SlashCommandWorkingSet;#[derive(IntoElement)]pub(super) struct SlashCommandSelector<T: PopoverTrigger> {diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.tomlindex c6e2a34a3c2..9c6b4f35f61 100644--- a/crates/collab/Cargo.toml+++ b/crates/collab/Cargo.toml@@ -79,8 +79,8 @@ uuid.workspace = true[dev-dependencies]assistant = { workspace = true, features = ["test-support"] }+assistant_slash_command.workspace = trueassistant_tool.workspace = true-context_server.workspace = trueasync-trait.workspace = trueaudio.workspace = truecall = { workspace = true, features = ["test-support"] }@@ -88,6 +88,7 @@ channel.workspace = trueclient = { workspace = true, features = ["test-support"] }collab_ui = { workspace = true, features = ["test-support"] }collections = { workspace = true, features = ["test-support"] }+context_server.workspace = truector.workspace = trueeditor = { workspace = true, features = ["test-support"] }env_logger.workspace = true@@ -108,6 +109,7 @@ node_runtime.workspace = truenotifications = { workspace = true, features = ["test-support"] }pretty_assertions.workspace = trueproject = { workspace = true, features = ["test-support"] }+prompt_library.workspace = truerecent_projects = { workspace = true }release_channel.workspace = trueremote = { workspace = true, features = ["test-support"] }diff --git a/crates/collab/src/tests/integration_tests.rs b/crates/collab/src/tests/integration_tests.rsindex e6bb07c9259..5abb17799b3 100644--- a/crates/collab/src/tests/integration_tests.rs+++ b/crates/collab/src/tests/integration_tests.rs@@ -6,13 +6,15 @@ use crate::{},};use anyhow::{anyhow, Result};-use assistant::{ContextStore, PromptBuilder, SlashCommandWorkingSet};+use assistant::ContextStore;+use assistant_slash_command::SlashCommandWorkingSet;use assistant_tool::ToolWorkingSet;use call::{room, ActiveCall, ParticipantLocation, Room};use client::{User, RECEIVE_TIMEOUT};use collections::{HashMap, HashSet};use fs::{FakeFs, Fs as _, RemoveOptions};use futures::{channel::mpsc, StreamExt as _};+use prompt_library::PromptBuilder;use git::status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus, UnmergedStatusCode};use gpui::{diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.tomlindex 5b077cf378c..b9388c571ca 100644--- a/crates/zed/Cargo.toml+++ b/crates/zed/Cargo.toml@@ -87,6 +87,7 @@ profiling.workspace = trueproject.workspace = trueproject_panel.workspace = trueproject_symbols.workspace = true+prompt_library.workspace = trueproto.workspace = truerecent_projects.workspace = truerelease_channel.workspace = truediff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rsindex 700d47d74ad..3c8e070b370 100644--- a/crates/zed/src/zed.rs+++ b/crates/zed/src/zed.rs@@ -12,7 +12,6 @@ pub(crate) mod windows_only_instance;use anyhow::Context as _;pub use app_menus::*;use assets::Assets;-use assistant::PromptBuilder;use breadcrumbs::Breadcrumbs;use client::{zed_urls, ZED_URL_SCHEME};use collections::VecDeque;@@ -32,6 +31,7 @@ use outline_panel::OutlinePanel;use paths::{local_settings_file_relative_path, local_tasks_file_relative_path};use project::{DirectoryLister, ProjectItem};use project_panel::ProjectPanel;+use prompt_library::PromptBuilder;use quick_action_bar::QuickActionBar;use recent_projects::open_ssh_project;use release_channel::{AppCommitSha, ReleaseChannel};