Execute from a prebuilt message list, seeding the loop's cumulative metrics from a checkpoint. Used by `resume_run` so resumed runs continue token/tool-call accounting from the checkpoint instead of re-starting at zero.
(
self,
messages: Vec<Message>,
session_id: &str,
seed: Option<crate::agent::ExecutionSeed>,
)
| 120 | /// continue token/tool-call accounting from the checkpoint instead of |
| 121 | /// re-starting at zero. |
| 122 | pub(super) async fn execute_from_messages_seeded( |
| 123 | self, |
| 124 | messages: Vec<Message>, |
| 125 | session_id: &str, |
| 126 | seed: Option<crate::agent::ExecutionSeed>, |
| 127 | ) -> Result<AgentResult> { |
| 128 | let Self { |
| 129 | agent_loop, |
| 130 | runtime_tx, |
| 131 | cancel_token, |
| 132 | runtime_collector, |
| 133 | lifecycle, |
| 134 | } = self; |
| 135 | let result = agent_loop |
| 136 | .execute_from_messages_seeded( |
| 137 | messages, |
| 138 | Some(session_id), |
| 139 | Some(runtime_tx), |
| 140 | Some(&cancel_token), |
| 141 | seed, |
| 142 | ) |
| 143 | .await; |
| 144 | lifecycle.complete(runtime_collector, result).await |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | pub(super) struct StreamRunContext { |
no test coverage detected