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

Function was_plan_agent

crates/opencode-session/src/prompt.rs:3073–3081  ·  view source on GitHub ↗
(messages: &[SessionMessage])

Source from the content-addressed store, hash-verified

3071}
3072
3073pub fn was_plan_agent(messages: &[SessionMessage]) -> bool {
3074 messages.iter().any(|m| {
3075 if let Some(agent) = m.metadata.get("agent") {
3076 agent.as_str() == Some("plan")
3077 } else {
3078 false
3079 }
3080 })
3081}
3082
3083pub struct ResolvedTool {
3084 pub name: String,

Callers 1

loop_innerMethod · 0.85

Calls 2

getMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected