MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / to_model_messages

Function to_model_messages

crates/opencode-session/src/llm.rs:1534–1539  ·  view source on GitHub ↗
(messages: &[MessageWithParts])

Source from the content-addressed store, hash-verified

1532}
1533
1534pub fn to_model_messages(messages: &[MessageWithParts]) -> Vec<Message> {
1535 messages
1536 .iter()
1537 .filter_map(|msg| message_to_model(&msg.info, &msg.parts))
1538 .collect()
1539}
1540
1541fn message_to_model(info: &MessageInfo, parts: &[Part]) -> Option<Message> {
1542 let role = match info {

Callers 1

processMethod · 0.70

Calls 1

message_to_modelFunction · 0.85

Tested by

no test coverage detected