This commit is contained in:
jif-oai
2025-10-14 13:45:23 +01:00
parent 90b2f096c3
commit 4de5b25c52
4 changed files with 37 additions and 53 deletions

View File

@@ -106,14 +106,14 @@ pub(crate) async fn run_create(
} else {
println!("{location_line}");
}
if let Some(objective_text) = options.objective.as_deref() {
if !objective_text.trim().is_empty() {
let objective_line = format!(" objective: {objective_text}");
if color_enabled {
println!("{}", objective_line.dimmed());
} else {
println!("{objective_line}");
}
if let Some(objective_text) = options.objective.as_deref()
&& !objective_text.trim().is_empty()
{
let objective_line = format!(" objective: {objective_text}");
if color_enabled {
println!("{}", objective_line.dimmed());
} else {
println!("{objective_line}");
}
}
println!();
@@ -315,7 +315,7 @@ fn resolve_runs_root(override_path: Option<PathBuf>) -> Result<PathBuf> {
if let Some(path) = override_path {
return Ok(path);
}
Ok(codex_infty::default_runs_root()?)
codex_infty::default_runs_root()
}
fn collect_run_summaries(root: &Path) -> Result<Vec<RunSummary>> {

View File

@@ -118,14 +118,14 @@ impl ProgressReporter for TerminalProgressReporter {
} else {
println!("{line}");
}
if let Some(notes) = notes {
if !notes.is_empty() {
let notes_line = format!(" notes: {notes}");
if self.color_enabled {
println!("{}", notes_line.dimmed());
} else {
println!("{notes_line}");
}
if let Some(notes) = notes
&& !notes.is_empty()
{
let notes_line = format!(" notes: {notes}");
if self.color_enabled {
println!("{}", notes_line.dimmed());
} else {
println!("{notes_line}");
}
}
}
@@ -203,14 +203,14 @@ impl ProgressReporter for TerminalProgressReporter {
} else {
println!("{line}");
}
if let Some(summary) = summary {
if !summary.is_empty() {
let hint = " (final summary will be shown below)";
if self.color_enabled {
println!("{}", hint.dimmed());
} else {
println!("{hint}");
}
if let Some(summary) = summary
&& !summary.is_empty()
{
let hint = " (final summary will be shown below)";
if self.color_enabled {
println!("{}", hint.dimmed());
} else {
println!("{hint}");
}
}
}

View File

@@ -19,10 +19,10 @@ pub(crate) fn print_run_summary_box(
let mut items = Vec::new();
items.push(("Run ID".to_string(), run_id.to_string()));
items.push(("Run Directory".to_string(), run_path.display().to_string()));
if let Some(objective) = objective {
if !objective.trim().is_empty() {
items.push(("Objective".to_string(), objective.trim().to_string()));
}
if let Some(objective) = objective
&& !objective.trim().is_empty()
{
items.push(("Objective".to_string(), objective.trim().to_string()));
}
items.push((
"Deliverable".to_string(),
@@ -92,7 +92,7 @@ pub(crate) fn print_run_summary_box(
if wrapped.is_empty() {
rows.push(String::new());
} else {
rows.extend(wrapped.into_iter().map(|line| line.into_owned()));
rows.extend(wrapped.into_iter().map(std::borrow::Cow::into_owned));
}
}
if rows.is_empty() {
@@ -101,13 +101,7 @@ pub(crate) fn print_run_summary_box(
for (line_idx, line) in rows.iter().enumerate() {
let label_cell = if line_idx == 0 { label.as_str() } else { "" };
let row_line = format!(
"| {label_cell:<label_width$} | {line:<value_width$} |",
label_cell = label_cell,
line = line,
label_width = label_width,
value_width = value_width
);
let row_line = format!("| {label_cell:<label_width$} | {line:<value_width$} |");
if color_enabled {
match label.as_str() {
"Deliverable" => println!("{}", row_line.green()),

View File

@@ -430,23 +430,13 @@ impl InftyOrchestrator {
if let Some(progress) = self.progress.as_ref() {
progress.final_delivery(&resolved, summary_ref);
}
let verified = self
.run_final_verification(
sessions,
&resolved,
summary_ref,
options,
)
.await?;
sessions.store.touch()?;
if verified {
return Ok(RunOutcome {
run_id: sessions.run_id.clone(),
deliverable_path: resolved,
summary: summary_clean,
raw_message: agent_msg.message.clone(),
});
}
return Ok(RunOutcome {
run_id: sessions.run_id.clone(),
deliverable_path: resolved,
summary: summary_clean,
raw_message: agent_msg.message.clone(),
});
}
}
}