refactor(orchestrator): group CLI ticket context to satisfy clippy

This commit is contained in:
thibaud-lclr 2026-04-17 14:31:51 +02:00
parent 9e7addfe51
commit a243064992

View file

@ -136,16 +136,26 @@ pub fn parse_verdict(report: &str) -> Verdict {
Verdict::FixNeeded Verdict::FixNeeded
} }
pub struct TicketCliContext<'a> {
pub app_handle: &'a AppHandle,
pub ticket_id: &'a str,
pub process_registry: &'a ProcessRegistry,
}
pub async fn run_cli_command( pub async fn run_cli_command(
command: &str, command: &str,
args: &[String], args: &[String],
prompt: &str, prompt: &str,
working_dir: &str, working_dir: &str,
timeout_secs: u64, timeout_secs: u64,
app_handle: &AppHandle, context: TicketCliContext<'_>,
ticket_id: &str,
process_registry: &ProcessRegistry,
) -> Result<String, String> { ) -> Result<String, String> {
let TicketCliContext {
app_handle,
ticket_id,
process_registry,
} = context;
let child = Command::new(command) let child = Command::new(command)
.args(args) .args(args)
.stdin(std::process::Stdio::piped()) .stdin(std::process::Stdio::piped())
@ -403,9 +413,11 @@ async fn process_ticket(
&analyst_prompt, &analyst_prompt,
&project.path, &project.path,
600, 600,
app_handle, TicketCliContext {
&ticket.id, app_handle,
process_registry, ticket_id: &ticket.id,
process_registry,
},
) )
.await; .await;
@ -514,9 +526,11 @@ async fn process_ticket(
&developer_prompt, &developer_prompt,
&wt_path, &wt_path,
600, 600,
app_handle, TicketCliContext {
&ticket.id, app_handle,
process_registry, ticket_id: &ticket.id,
process_registry,
},
) )
.await; .await;