refactor(orchestrator): group CLI ticket context to satisfy clippy
This commit is contained in:
parent
9e7addfe51
commit
a243064992
1 changed files with 23 additions and 9 deletions
|
|
@ -136,16 +136,26 @@ pub fn parse_verdict(report: &str) -> Verdict {
|
|||
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(
|
||||
command: &str,
|
||||
args: &[String],
|
||||
prompt: &str,
|
||||
working_dir: &str,
|
||||
timeout_secs: u64,
|
||||
app_handle: &AppHandle,
|
||||
ticket_id: &str,
|
||||
process_registry: &ProcessRegistry,
|
||||
context: TicketCliContext<'_>,
|
||||
) -> Result<String, String> {
|
||||
let TicketCliContext {
|
||||
app_handle,
|
||||
ticket_id,
|
||||
process_registry,
|
||||
} = context;
|
||||
|
||||
let child = Command::new(command)
|
||||
.args(args)
|
||||
.stdin(std::process::Stdio::piped())
|
||||
|
|
@ -403,9 +413,11 @@ async fn process_ticket(
|
|||
&analyst_prompt,
|
||||
&project.path,
|
||||
600,
|
||||
app_handle,
|
||||
&ticket.id,
|
||||
process_registry,
|
||||
TicketCliContext {
|
||||
app_handle,
|
||||
ticket_id: &ticket.id,
|
||||
process_registry,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
|
|
@ -514,9 +526,11 @@ async fn process_ticket(
|
|||
&developer_prompt,
|
||||
&wt_path,
|
||||
600,
|
||||
app_handle,
|
||||
&ticket.id,
|
||||
process_registry,
|
||||
TicketCliContext {
|
||||
app_handle,
|
||||
ticket_id: &ticket.id,
|
||||
process_registry,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue