MCPcopy Create free account
hub / github.com/AI45Lab/Code / stream_with_attachments

Function stream_with_attachments

core/src/agent_api/conversation_runtime.rs:62–73  ·  view source on GitHub ↗
(
    session: &AgentSession,
    prompt: &str,
    attachments: &[Attachment],
    history: Option<&[Message]>,
)

Source from the content-addressed store, hash-verified

60}
61
62pub(super) async fn stream_with_attachments(
63 session: &AgentSession,
64 prompt: &str,
65 attachments: &[Attachment],
66 history: Option<&[Message]>,
67) -> Result<(mpsc::Receiver<AgentEvent>, JoinHandle<()>)> {
68 bail_if_closed(session)?;
69
70 let input = ConversationInput::with_attachments(session, history, prompt, attachments);
71 let stream_run = StreamRunContext::start(session, prompt, input.persistence).await;
72 Ok(stream_run.spawn_from_messages(input.messages))
73}
74
75pub(super) async fn stream(
76 session: &AgentSession,

Callers 1

Calls 2

bail_if_closedFunction · 0.85
spawn_from_messagesMethod · 0.80

Tested by

no test coverage detected