hook up model image support to prompt capabilities

This commit is contained in:
Cole Miller 2025-08-25 11:09:09 -04:00
parent 073227ec41
commit 694dfdc4ba
9 changed files with 98 additions and 93 deletions

View file

@ -185,13 +185,16 @@ impl AgentConnection for AcpConnection {
let session_id = response.session_id;
let action_log = cx.new(|_| ActionLog::new(project.clone()))?;
let thread = cx.new(|_cx| {
let thread = cx.new(|cx| {
AcpThread::new(
self.server_name.clone(),
self.clone(),
project,
action_log,
session_id.clone(),
// ACP doesn't currently support per-session prompt capabilities or changing capabilities dynamically.
watch::Receiver::constant(self.prompt_capabilities.clone()),
cx,
)
})?;
@ -279,15 +282,6 @@ impl AgentConnection for AcpConnection {
})
}
fn prompt_capabilities(
&self,
_session: &acp::SessionId,
_cx: &mut App,
) -> acp::PromptCapabilities {
// TODO: support ACP sending prompt capabilities per session?
self.prompt_capabilities
}
fn cancel(&self, session_id: &acp::SessionId, cx: &mut App) {
if let Some(session) = self.sessions.borrow_mut().get_mut(session_id) {
session.suppress_abort_err = true;