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:
Marshall Bowers 2025-01-16 17:49:14 -05:00 committed by GitHub
parent 8030c0025a
commit 4d22f7e529
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 27 additions and 20 deletions

View file

@ -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,

View file

@ -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, Rol
use 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;

View file

@ -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;

View file

@ -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::{

View file

@ -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};

View file

@ -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> {