Create a new agent state with the given tool call limit.
(max_tool_calls: Option<u32>)
| 35 | impl AgentState { |
| 36 | /// Create a new agent state with the given tool call limit. |
| 37 | pub fn new(max_tool_calls: Option<u32>) -> Self { |
| 38 | Self { |
| 39 | tool_calls_used: 0, |
| 40 | tool_calls_total: max_tool_calls.unwrap_or(DEFAULT_TOOL_CALL_LIMIT), |
| 41 | start_time: Instant::now(), |
| 42 | server_running: false, |
| 43 | last_benchmark: None, |
| 44 | best_benchmark: None, |
| 45 | call_log: Vec::new(), |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// Return the current session status. |
| 50 | pub fn get_status(&self) -> AgentStatus { |
nothing calls this directly
no outgoing calls
no test coverage detected