()
| 1676 | |
| 1677 | #[test] |
| 1678 | fn test_has_tool_calls_true() { |
| 1679 | let messages = vec![Message { |
| 1680 | role: opencode_provider::Role::Assistant, |
| 1681 | content: opencode_provider::Content::Parts(vec![opencode_provider::ContentPart { |
| 1682 | content_type: "tool_use".to_string(), |
| 1683 | text: None, |
| 1684 | image_url: None, |
| 1685 | tool_use: Some(opencode_provider::ToolUse { |
| 1686 | id: "call_1".to_string(), |
| 1687 | name: "test".to_string(), |
| 1688 | input: serde_json::json!({}), |
| 1689 | }), |
| 1690 | tool_result: None, |
| 1691 | cache_control: None, |
| 1692 | filename: None, |
| 1693 | media_type: None, |
| 1694 | provider_options: None, |
| 1695 | }]), |
| 1696 | cache_control: None, |
| 1697 | provider_options: None, |
| 1698 | }]; |
| 1699 | assert!(LlmProcessor::has_tool_calls(&messages)); |
| 1700 | } |
| 1701 | |
| 1702 | #[test] |
| 1703 | fn test_has_tool_calls_false() { |
nothing calls this directly
no outgoing calls
no test coverage detected