community fixes

This commit is contained in:
jaberjaber23
2026-03-15 16:59:21 +03:00
parent bde1f5414c
commit 1cb8b989d1
+3 -1
View File
@@ -68,6 +68,7 @@ fn append_tool_error_guidance(tool_result_blocks: &mut Vec<ContentBlock>) {
if has_tool_error {
tool_result_blocks.push(ContentBlock::Text {
text: TOOL_ERROR_GUIDANCE.to_string(),
provider_metadata: None,
});
}
}
@@ -2897,13 +2898,14 @@ mod tests {
None, // hooks
None, // context_window_tokens
None, // process_manager
None, // user_content_blocks
)
.await
.expect("Loop should complete without error");
let guidance_seen = session.messages.iter().any(|msg| match &msg.content {
MessageContent::Blocks(blocks) => blocks.iter().any(|block| {
matches!(block, ContentBlock::Text { text } if text == TOOL_ERROR_GUIDANCE)
matches!(block, ContentBlock::Text { text, .. } if text == TOOL_ERROR_GUIDANCE)
}),
_ => false,
});