message editor: Only allow types of content the agent can handle (#36616)

Uses the new
[`acp::PromptCapabilities`](https://github.com/zed-industries/agent-client-protocol/blob/a39b7f635d67528f0a4e05e086ab283b9fc5cb93/rust/agent.rs#L194-L215)
to disable non-file mentions and images for agents that don't support
them.

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga
2025-08-20 19:04:10 +00:00
committed by GitHub
parent 74ce543d8b
commit 2813073d7b
11 changed files with 233 additions and 49 deletions
+8
View File
@@ -913,6 +913,14 @@ impl acp_thread::AgentConnection for NativeAgentConnection {
})
}
fn prompt_capabilities(&self) -> acp::PromptCapabilities {
acp::PromptCapabilities {
image: true,
audio: false,
embedded_context: true,
}
}
fn resume(
&self,
session_id: &acp::SessionId,