use actix_web::{HttpResponse, Result, web}; use service::AppService; use session::Session; use crate::ApiResponse; #[derive(Debug, Clone, serde::Deserialize, utoipa::IntoParams)] pub struct TriageIssueQuery { pub issue_number: i64, } #[utoipa::path( get, path = "/api/agents/{project}/triage", params( ("project" = String, Path, description = "Project name"), ("issue_number" = i64, Query, description = "Issue number to triage"), ), responses( (status = 200, description = "Issue triage result", body = ApiResponse), (status = 401, description = "Unauthorized"), (status = 404, description = "Issue not found"), ), tag = "Agent" )] pub async fn triage_issue( service: web::Data, _session: Session, path: web::Path, query: web::Query, ) -> Result { let project_name = path.into_inner(); let resp = service .triage_issue(project_name, query.issue_number) .await?; Ok(crate::ApiResponse::ok(resp).to_response()) }