(session: &AgentSession, history: Option<&[Message]>)
| 20 | |
| 21 | impl ConversationInput { |
| 22 | pub(super) fn from_history(session: &AgentSession, history: Option<&[Message]>) -> Self { |
| 23 | let use_internal = history.is_none(); |
| 24 | let messages = match history { |
| 25 | Some(history) => history.to_vec(), |
| 26 | None => read_or_recover(&session.history).clone(), |
| 27 | }; |
| 28 | Self { |
| 29 | messages, |
| 30 | persistence: use_internal.then(|| SessionPersistenceContext::from_session(session)), |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | pub(super) fn with_attachments( |
| 35 | session: &AgentSession, |
nothing calls this directly
no test coverage detected