mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
V15
This commit is contained in:
@@ -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>> {
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()),
|
||||
|
||||
@@ -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(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user