Fully support all mention kinds (#36134)

Feature parity with the agent1 @mention kinds:
- File
- Symbols
- Selections
- Threads
- Rules
- Fetch


Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-08-13 17:11:32 -03:00 committed by GitHub
parent 389d382f42
commit 389d24d7e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1787 additions and 324 deletions

View file

@ -11,6 +11,9 @@ workspace = true
[lib]
path = "src/assistant_context.rs"
[features]
test-support = []
[dependencies]
agent_settings.workspace = true
anyhow.workspace = true

View file

@ -138,6 +138,27 @@ impl ContextStore {
})
}
#[cfg(any(test, feature = "test-support"))]
pub fn fake(project: Entity<Project>, cx: &mut Context<Self>) -> Self {
Self {
contexts: Default::default(),
contexts_metadata: Default::default(),
context_server_slash_command_ids: Default::default(),
host_contexts: Default::default(),
fs: project.read(cx).fs().clone(),
languages: project.read(cx).languages().clone(),
slash_commands: Arc::default(),
telemetry: project.read(cx).client().telemetry().clone(),
_watch_updates: Task::ready(None),
client: project.read(cx).client(),
project,
project_is_shared: false,
client_subscription: None,
_project_subscriptions: Default::default(),
prompt_builder: Arc::new(PromptBuilder::new(None).unwrap()),
}
}
async fn handle_advertise_contexts(
this: Entity<Self>,
envelope: TypedEnvelope<proto::AdvertiseContexts>,