(
session: &AgentSession,
prompt: &str,
attachments: &[Attachment],
history: Option<&[Message]>,
)
| 43 | } |
| 44 | |
| 45 | pub(super) async fn send_with_attachments( |
| 46 | session: &AgentSession, |
| 47 | prompt: &str, |
| 48 | attachments: &[Attachment], |
| 49 | history: Option<&[Message]>, |
| 50 | ) -> Result<AgentResult> { |
| 51 | bail_if_closed(session)?; |
| 52 | |
| 53 | // Build one user message containing text and images, then execute from the |
| 54 | // resulting message list so the loop does not append a duplicate prompt. |
| 55 | let input = ConversationInput::with_attachments(session, history, prompt, attachments); |
| 56 | let blocking_run = BlockingRunContext::start(session, prompt, input.persistence).await; |
| 57 | blocking_run |
| 58 | .execute_from_messages(input.messages, &session.session_id) |
| 59 | .await |
| 60 | } |
| 61 | |
| 62 | pub(super) async fn stream_with_attachments( |
| 63 | session: &AgentSession, |
no test coverage detected