assistant: Remove some re-exports (#23262)
This PR removes some re-exports from the `assistant` to make it clearer what its constituent modules depend on. Release Notes: - N/A
This commit is contained in:
parent
8030c0025a
commit
4d22f7e529
11 changed files with 27 additions and 20 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -2622,6 +2622,7 @@ dependencies = [
|
||||||
"anthropic",
|
"anthropic",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"assistant",
|
"assistant",
|
||||||
|
"assistant_slash_command",
|
||||||
"assistant_tool",
|
"assistant_tool",
|
||||||
"async-stripe",
|
"async-stripe",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -2678,6 +2679,7 @@ dependencies = [
|
||||||
"pretty_assertions",
|
"pretty_assertions",
|
||||||
"project",
|
"project",
|
||||||
"prometheus",
|
"prometheus",
|
||||||
|
"prompt_library",
|
||||||
"prost 0.9.0",
|
"prost 0.9.0",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"recent_projects",
|
"recent_projects",
|
||||||
|
@ -16246,6 +16248,7 @@ dependencies = [
|
||||||
"project",
|
"project",
|
||||||
"project_panel",
|
"project_panel",
|
||||||
"project_symbols",
|
"project_symbols",
|
||||||
|
"prompt_library",
|
||||||
"proto",
|
"proto",
|
||||||
"recent_projects",
|
"recent_projects",
|
||||||
"release_channel",
|
"release_channel",
|
||||||
|
|
|
@ -12,35 +12,34 @@ pub mod slash_command_settings;
|
||||||
mod streaming_diff;
|
mod streaming_diff;
|
||||||
mod terminal_inline_assistant;
|
mod terminal_inline_assistant;
|
||||||
|
|
||||||
pub use ::prompt_library::PromptBuilder;
|
use std::path::PathBuf;
|
||||||
use ::prompt_library::PromptLoadingParams;
|
use std::sync::Arc;
|
||||||
pub use assistant_panel::{AssistantPanel, AssistantPanelEvent};
|
|
||||||
|
use ::prompt_library::{PromptBuilder, PromptLoadingParams};
|
||||||
use assistant_settings::AssistantSettings;
|
use assistant_settings::AssistantSettings;
|
||||||
use assistant_slash_command::SlashCommandRegistry;
|
use assistant_slash_command::SlashCommandRegistry;
|
||||||
pub use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};
|
|
||||||
use assistant_slash_commands::{ProjectSlashCommandFeatureFlag, SearchSlashCommandFeatureFlag};
|
use assistant_slash_commands::{ProjectSlashCommandFeatureFlag, SearchSlashCommandFeatureFlag};
|
||||||
use client::{proto, Client};
|
use client::{proto, Client};
|
||||||
use command_palette_hooks::CommandPaletteFilter;
|
use command_palette_hooks::CommandPaletteFilter;
|
||||||
pub use context::*;
|
|
||||||
pub use context_store::*;
|
|
||||||
use feature_flags::FeatureFlagAppExt;
|
use feature_flags::FeatureFlagAppExt;
|
||||||
use fs::Fs;
|
use fs::Fs;
|
||||||
use gpui::impl_internal_actions;
|
use gpui::impl_internal_actions;
|
||||||
use gpui::{actions, AppContext, Global, SharedString, UpdateGlobal};
|
use gpui::{actions, AppContext, Global, SharedString, UpdateGlobal};
|
||||||
pub(crate) use inline_assistant::*;
|
|
||||||
use language_model::{
|
use language_model::{
|
||||||
LanguageModelId, LanguageModelProviderId, LanguageModelRegistry, LanguageModelResponseMessage,
|
LanguageModelId, LanguageModelProviderId, LanguageModelRegistry, LanguageModelResponseMessage,
|
||||||
};
|
};
|
||||||
pub use patch::*;
|
|
||||||
use semantic_index::{CloudEmbeddingProvider, SemanticDb};
|
use semantic_index::{CloudEmbeddingProvider, SemanticDb};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use settings::{Settings, SettingsStore};
|
use settings::{Settings, SettingsStore};
|
||||||
use std::path::PathBuf;
|
|
||||||
use std::sync::Arc;
|
|
||||||
pub(crate) use streaming_diff::*;
|
|
||||||
use util::ResultExt;
|
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;
|
use crate::slash_command_settings::SlashCommandSettings;
|
||||||
|
pub(crate) use crate::streaming_diff::*;
|
||||||
|
|
||||||
actions!(
|
actions!(
|
||||||
assistant,
|
assistant,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use super::{AssistantEdit, MessageCacheMetadata};
|
use super::{AssistantEdit, MessageCacheMetadata};
|
||||||
use crate::{
|
use crate::{
|
||||||
assistant_panel, AssistantEditKind, CacheStatus, Context, ContextEvent, ContextId,
|
assistant_panel, AssistantEditKind, CacheStatus, Context, ContextEvent, ContextId,
|
||||||
ContextOperation, InvokedSlashCommandId, MessageId, MessageStatus, PromptBuilder,
|
ContextOperation, InvokedSlashCommandId, MessageId, MessageStatus,
|
||||||
};
|
};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_slash_command::{
|
use assistant_slash_command::{
|
||||||
|
@ -22,6 +22,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 rand::prelude::*;
|
use rand::prelude::*;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use settings::SettingsStore;
|
use settings::SettingsStore;
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
use crate::SlashCommandId;
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Context, ContextEvent, ContextId, ContextOperation, ContextVersion, SavedContext,
|
Context, ContextEvent, ContextId, ContextOperation, ContextVersion, SavedContext,
|
||||||
SavedContextMetadata,
|
SavedContextMetadata,
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, Context as _, Result};
|
use anyhow::{anyhow, Context as _, Result};
|
||||||
use assistant_slash_command::SlashCommandWorkingSet;
|
use assistant_slash_command::{SlashCommandId, SlashCommandWorkingSet};
|
||||||
use assistant_tool::{ToolId, ToolWorkingSet};
|
use assistant_tool::{ToolId, ToolWorkingSet};
|
||||||
use client::{proto, telemetry::Telemetry, Client, TypedEnvelope};
|
use client::{proto, telemetry::Telemetry, Client, TypedEnvelope};
|
||||||
use clock::ReplicaId;
|
use clock::ReplicaId;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::SlashCommandWorkingSet;
|
|
||||||
use crate::{slash_command::SlashCommandCompletionProvider, AssistantPanel, InlineAssistant};
|
use crate::{slash_command::SlashCommandCompletionProvider, AssistantPanel, InlineAssistant};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::{actions::Tab, CurrentLineHighlight, Editor, EditorElement, EditorEvent, EditorStyle};
|
use editor::{actions::Tab, CurrentLineHighlight, Editor, EditorElement, EditorEvent, EditorStyle};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use crate::assistant_panel::ContextEditor;
|
use crate::assistant_panel::ContextEditor;
|
||||||
use crate::SlashCommandWorkingSet;
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assistant_slash_command::AfterCompletion;
|
use assistant_slash_command::AfterCompletion;
|
||||||
pub use assistant_slash_command::SlashCommand;
|
pub use assistant_slash_command::SlashCommand;
|
||||||
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use editor::{CompletionProvider, Editor};
|
use editor::{CompletionProvider, Editor};
|
||||||
use fuzzy::{match_strings, StringMatchCandidate};
|
use fuzzy::{match_strings, StringMatchCandidate};
|
||||||
use gpui::{Model, Task, ViewContext, WeakView, WindowContext};
|
use gpui::{Model, Task, ViewContext, WeakView, WindowContext};
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use gpui::{AnyElement, DismissEvent, SharedString, Task, WeakView};
|
use gpui::{AnyElement, DismissEvent, SharedString, Task, WeakView};
|
||||||
use picker::{Picker, PickerDelegate, PickerEditorPosition};
|
use picker::{Picker, PickerDelegate, PickerEditorPosition};
|
||||||
use ui::{prelude::*, ListItem, ListItemSpacing, PopoverMenu, PopoverTrigger, Tooltip};
|
use ui::{prelude::*, ListItem, ListItemSpacing, PopoverMenu, PopoverTrigger, Tooltip};
|
||||||
|
|
||||||
use crate::assistant_panel::ContextEditor;
|
use crate::assistant_panel::ContextEditor;
|
||||||
use crate::SlashCommandWorkingSet;
|
|
||||||
|
|
||||||
#[derive(IntoElement)]
|
#[derive(IntoElement)]
|
||||||
pub(super) struct SlashCommandSelector<T: PopoverTrigger> {
|
pub(super) struct SlashCommandSelector<T: PopoverTrigger> {
|
||||||
|
|
|
@ -79,8 +79,8 @@ uuid.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assistant = { workspace = true, features = ["test-support"] }
|
assistant = { workspace = true, features = ["test-support"] }
|
||||||
|
assistant_slash_command.workspace = true
|
||||||
assistant_tool.workspace = true
|
assistant_tool.workspace = true
|
||||||
context_server.workspace = true
|
|
||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
audio.workspace = true
|
audio.workspace = true
|
||||||
call = { workspace = true, features = ["test-support"] }
|
call = { workspace = true, features = ["test-support"] }
|
||||||
|
@ -88,6 +88,7 @@ channel.workspace = true
|
||||||
client = { workspace = true, features = ["test-support"] }
|
client = { workspace = true, features = ["test-support"] }
|
||||||
collab_ui = { workspace = true, features = ["test-support"] }
|
collab_ui = { workspace = true, features = ["test-support"] }
|
||||||
collections = { workspace = true, features = ["test-support"] }
|
collections = { workspace = true, features = ["test-support"] }
|
||||||
|
context_server.workspace = true
|
||||||
ctor.workspace = true
|
ctor.workspace = true
|
||||||
editor = { workspace = true, features = ["test-support"] }
|
editor = { workspace = true, features = ["test-support"] }
|
||||||
env_logger.workspace = true
|
env_logger.workspace = true
|
||||||
|
@ -108,6 +109,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
|
||||||
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"] }
|
||||||
|
|
|
@ -6,13 +6,15 @@ use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use assistant::{ContextStore, PromptBuilder, SlashCommandWorkingSet};
|
use assistant::ContextStore;
|
||||||
|
use assistant_slash_command::SlashCommandWorkingSet;
|
||||||
use assistant_tool::ToolWorkingSet;
|
use assistant_tool::ToolWorkingSet;
|
||||||
use call::{room, ActiveCall, ParticipantLocation, Room};
|
use call::{room, ActiveCall, ParticipantLocation, Room};
|
||||||
use client::{User, RECEIVE_TIMEOUT};
|
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 git::status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus, UnmergedStatusCode};
|
use git::status::{FileStatus, StatusCode, TrackedStatus, UnmergedStatus, UnmergedStatusCode};
|
||||||
use gpui::{
|
use gpui::{
|
||||||
|
|
|
@ -87,6 +87,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
|
||||||
proto.workspace = true
|
proto.workspace = true
|
||||||
recent_projects.workspace = true
|
recent_projects.workspace = true
|
||||||
release_channel.workspace = true
|
release_channel.workspace = true
|
||||||
|
|
|
@ -12,7 +12,6 @@ pub(crate) mod windows_only_instance;
|
||||||
use anyhow::Context as _;
|
use anyhow::Context as _;
|
||||||
pub use app_menus::*;
|
pub use app_menus::*;
|
||||||
use assets::Assets;
|
use assets::Assets;
|
||||||
use assistant::PromptBuilder;
|
|
||||||
use breadcrumbs::Breadcrumbs;
|
use breadcrumbs::Breadcrumbs;
|
||||||
use client::{zed_urls, ZED_URL_SCHEME};
|
use client::{zed_urls, ZED_URL_SCHEME};
|
||||||
use collections::VecDeque;
|
use collections::VecDeque;
|
||||||
|
@ -32,6 +31,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 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