mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Show failure error message when a stage fails in ProgressUI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c959368452
commit
e6bbac771d
2 changed files with 26 additions and 15 deletions
|
|
@ -314,8 +314,19 @@ impl ProgressUI {
|
|||
};
|
||||
self.finish_stage(node_id, name, glyph, &prefix);
|
||||
}
|
||||
WorkflowRunEvent::StageFailed { node_id, name, .. } => {
|
||||
WorkflowRunEvent::StageFailed {
|
||||
node_id,
|
||||
name,
|
||||
failure,
|
||||
..
|
||||
} => {
|
||||
self.finish_stage(node_id, name, red_cross(), "");
|
||||
let red = Style::new().red();
|
||||
self.insert_info_line(&format!(
|
||||
"{} {}",
|
||||
red.apply_to("Error:"),
|
||||
failure.message,
|
||||
));
|
||||
}
|
||||
WorkflowRunEvent::ParallelStarted { .. } => {
|
||||
// The fork stage is the (only) active stage at this point.
|
||||
|
|
@ -661,12 +672,10 @@ impl ProgressUI {
|
|||
let dim = Style::new().dim();
|
||||
self.insert_info_line_for_stage(
|
||||
stage_node_id,
|
||||
&format!(
|
||||
"{}",
|
||||
dim.apply_to(format!(
|
||||
"\u{27f3} compaction: {original_turn_count} \u{2192} {preserved_turn_count} turns, {tracked_file_count} files"
|
||||
))
|
||||
),
|
||||
&dim.apply_to(format!(
|
||||
"\u{27f3} compaction: {original_turn_count} \u{2192} {preserved_turn_count} turns, {tracked_file_count} files"
|
||||
))
|
||||
.to_string(),
|
||||
);
|
||||
}
|
||||
AgentEvent::LlmRetry {
|
||||
|
|
@ -694,13 +703,11 @@ impl ProgressUI {
|
|||
let short_id = &agent_id[..agent_id.len().min(8)];
|
||||
self.insert_info_line_for_stage(
|
||||
stage_node_id,
|
||||
&format!(
|
||||
"{}",
|
||||
dim.apply_to(format!(
|
||||
"\u{25b8} subagent[{short_id}] \"{}\"",
|
||||
truncate(task, 50)
|
||||
))
|
||||
),
|
||||
&dim.apply_to(format!(
|
||||
"\u{25b8} subagent[{short_id}] \"{}\"",
|
||||
truncate(task, 50)
|
||||
))
|
||||
.to_string(),
|
||||
);
|
||||
}
|
||||
AgentEvent::SubAgentCompleted {
|
||||
|
|
|
|||
|
|
@ -246,7 +246,11 @@ pub async fn run_command(
|
|||
|
||||
// 2. Pre-flight: check git cleanliness before creating any files
|
||||
// (must happen before logs dir is created, which may be inside the repo)
|
||||
let sandbox_provider = resolve_sandbox_provider(args.sandbox, run_cfg.as_ref(), &run_defaults)?;
|
||||
let sandbox_provider = if args.dry_run {
|
||||
SandboxProvider::Local
|
||||
} else {
|
||||
resolve_sandbox_provider(args.sandbox, run_cfg.as_ref(), &run_defaults)?
|
||||
};
|
||||
let preserve_sandbox =
|
||||
resolve_preserve_sandbox(args.preserve_sandbox, run_cfg.as_ref(), &run_defaults);
|
||||
let original_cwd = std::env::current_dir()?;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue