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

Method has_tool_calls

crates/opencode-session/src/llm.rs:954–965  ·  view source on GitHub ↗
(messages: &[Message])

Source from the content-addressed store, hash-verified

952 }
953
954 pub fn has_tool_calls(messages: &[Message]) -> bool {
955 for msg in messages {
956 if let Content::Parts(parts) = &msg.content {
957 for part in parts {
958 if part.tool_use.is_some() || part.tool_result.is_some() {
959 return true;
960 }
961 }
962 }
963 }
964 false
965 }
966}
967
968fn build_system_prompt(input: &StreamInput) -> Vec<String> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected