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

Method last_user_message

crates/opencode-session/src/session.rs:436–441  ·  view source on GitHub ↗

Get the last user message

(&self)

Source from the content-addressed store, hash-verified

434
435 /// Get the last user message
436 pub fn last_user_message(&self) -> Option<&SessionMessage> {
437 self.messages
438 .iter()
439 .rev()
440 .find(|m| matches!(m.role, MessageRole::User))
441 }
442
443 /// Get the last assistant message
444 pub fn last_assistant_message(&self) -> Option<&SessionMessage> {

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected