MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / update_agent_run_status

Function update_agent_run_status

src-tauri/src/services/agent_service.rs:51–63  ·  view source on GitHub ↗
(db: &SqlitePool, id: &str, status: &str)

Source from the content-addressed store, hash-verified

49}
50
51pub async fn update_agent_run_status(db: &SqlitePool, id: &str, status: &str) -> AppResult<()> {
52 let result = sqlx::query("UPDATE agent_runs SET status = ?1 WHERE id = ?2")
53 .bind(status)
54 .bind(id)
55 .execute(db)
56 .await?;
57
58 if result.rows_affected() == 0 {
59 return Err(AppError::NotFound(format!("Agent run not found: {id}")));
60 }
61
62 Ok(())
63}
64
65pub async fn complete_agent_run(db: &SqlitePool, id: &str, output: &str) -> AppResult<()> {
66 let now = now_rfc3339();

Callers 1

cancel_agentFunction · 0.85

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected