fix: require terminal stream completion

This commit is contained in:
2026-09-29 13:43:36 +09:00
parent 1980da2880
commit 36295edc08
3 changed files with 151 additions and 4 deletions
@@ -636,7 +636,7 @@ mod tests {
use agen::llm_client::error::ClientError;
use agen::llm_client::event::{
BlockDelta, BlockMetadata, BlockStart, BlockStop, BlockType, DeltaContent,
Event as LlmEvent, StopReason,
Event as LlmEvent, ResponseStatus, StatusEvent, StopReason,
};
use agen::llm_client::types::Request;
use agen::tool::ToolExecutionContext;
@@ -906,6 +906,9 @@ mod tests {
reasoning: None,
stop_reason: Some(StopReason::ToolUse),
})),
Ok(LlmEvent::Status(StatusEvent {
status: ResponseStatus::Completed,
})),
])))
} else {
Ok(Box::pin(stream::iter(vec![
@@ -924,6 +927,9 @@ mod tests {
reasoning: None,
stop_reason: Some(StopReason::EndTurn),
})),
Ok(LlmEvent::Status(StatusEvent {
status: ResponseStatus::Completed,
})),
])))
}
}