feat: show plan diff in execution log when revise_plan is called
- apply_plan_diff now returns a YAML unified diff string - Pure Rust LCS diff implementation (no external dependency) - revise_plan logs the diff to execution log with ```diff fencing - Frontend renders diff with green/red syntax highlighting
This commit is contained in:
@@ -1124,7 +1124,7 @@ async fn process_feedback(
|
||||
}).collect();
|
||||
|
||||
// Apply docker-cache diff
|
||||
state.apply_plan_diff(new_steps);
|
||||
let diff = state.apply_plan_diff(new_steps);
|
||||
|
||||
// Broadcast updated plan
|
||||
let _ = broadcast_tx.send(WsMessage::PlanUpdate {
|
||||
@@ -1134,6 +1134,10 @@ async fn process_feedback(
|
||||
|
||||
tracing::info!("[workflow {}] Plan revised via feedback. First actionable: {:?}",
|
||||
workflow_id, state.first_actionable_step());
|
||||
|
||||
// Log the diff so frontend can show what changed
|
||||
let diff_display = format!("```diff\n{}\n```", diff);
|
||||
log_execution(pool, broadcast_tx, workflow_id, 0, "revise_plan", "计划变更", &diff_display, "done").await;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user