fix(hive-mind): hapus penulisan docs/runs ganda dan sambungkan abort_flag ke tool hive_mind manual

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
asepharyana
2026-07-14 10:55:05 +07:00
co-authored by Claude Sonnet 5
parent 79e2bfcc9c
commit a125f5d440
2 changed files with 9 additions and 16 deletions
+5 -8
View File
@@ -219,21 +219,18 @@ impl Tool for HiveMind {
json!({ "cycles": cycles_value })
).map_err(|e| anyhow!("failed to parse cycles: {e}"))?;
let (consensus, reports) = crate::app::workflow::hive_mind::run_hive_mind(
// run_hive_mind now writes the docs/runs/*.md convergence report
// itself (guaranteed, even if synthesis fails) — do not write it
// again here.
let (consensus, _reports) = crate::app::workflow::hive_mind::run_hive_mind(
request,
&plan,
&ctx.session_dir,
&ctx.workspaces,
ctx.turn_events.as_ref(),
None,
ctx.abort_flag.as_ref(),
)?;
if let Some(workspace_root) = ctx.workspaces.first() {
if let Err(e) = crate::app::workflow::docs::write_hive_mind_convergence(workspace_root, request, &reports, &consensus) {
tracing::warn!("[hive_mind] failed to write docs/runs report: {e}");
}
}
Ok(consensus)
}
}