fix(goose): propagate session_id across providers and MCP (#6584)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -182,13 +182,10 @@ fn get_agent_messages(
|
||||
retry_config: recipe.retry,
|
||||
};
|
||||
|
||||
let mut stream = crate::session_context::with_session_id(Some(session_id.clone()), async {
|
||||
agent
|
||||
.reply(user_message, session_config, cancellation_token)
|
||||
.await
|
||||
})
|
||||
.await
|
||||
.map_err(|e| anyhow!("Failed to get reply from agent: {}", e))?;
|
||||
let mut stream = agent
|
||||
.reply(user_message, session_config, cancellation_token)
|
||||
.await
|
||||
.map_err(|e| anyhow!("Failed to get reply from agent: {}", e))?;
|
||||
while let Some(message_result) = stream.next().await {
|
||||
match message_result {
|
||||
Ok(AgentEvent::Message(msg)) => conversation.push(msg),
|
||||
|
||||
Reference in New Issue
Block a user