MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_has_tool_calls_true

Function test_has_tool_calls_true

crates/opencode-session/src/llm.rs:1678–1700  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected