| 1 | use std::time::Duration; |
| 2 | |
| 3 | use chrono::{TimeZone, Utc}; |
| 4 | |
| 5 | use super::runs::{AgentRun, RunState}; |
| 6 | |
| 7 | pub fn finished_run(id: u64) -> AgentRun { |
| 8 | AgentRun { |
| 9 | id, |
| 10 | action_id: "answer-this".to_owned(), |
| 11 | action_label: "Answer this".to_owned(), |
| 12 | agent_id: "claude".to_owned(), |
| 13 | agent_name: "Claude Code".to_owned(), |
| 14 | conversation_id: "19:chat".to_owned(), |
| 15 | message_id: format!("m{id}"), |
| 16 | chat_title: "Ops".to_owned(), |
| 17 | sender_name: "Ada".to_owned(), |
| 18 | session_id: format!("session-{id}"), |
| 19 | working_dir: "~".to_owned(), |
| 20 | extra: String::new(), |
| 21 | state: RunState::Done, |
| 22 | current_step: "Done".to_owned(), |
| 23 | steps: vec![(Duration::from_secs(3), "Read a.rs".to_owned())], |
| 24 | final_text: "ok".to_owned(), |
| 25 | started_at: Utc.with_ymd_and_hms(2026, 10, 1, 9, 0, 0).unwrap(), |
| 26 | ended_at: Some(Utc.with_ymd_and_hms(2026, 10, 1, 9, 1, 0).unwrap()), |
| 27 | expanded: false, |
| 28 | dismissed: false, |
| 29 | process_id: None, |
| 30 | pending_prompt: None, |
| 31 | sent_to: None, |
| 32 | launch_session_id: None, |
| 33 | launched: true, |
| 34 | } |
| 35 | } |