transcript changes

This commit is contained in:
Ian Gulliver
2026-10-19 08:38:22 -07:00
parent 01486ea7fa
commit 5e42346301
4 changed files with 20 additions and 4 deletions
+6 -1
View File
@@ -50,6 +50,7 @@ enum RowKind {
case orphan(String)
case turnEnd(error: String?)
case note(Note)
case review(note: Note, md: [MDBlock])
case handoff
case snapshot(Snapshot)
case question
@@ -703,7 +704,11 @@ final class TranscriptBuilder {
case "review.finished":
let r = try! decodePayload(ev.payload, as: Review.self)
let outcome = r.state == .failed ? "failed: \(r.error)" : r.state == .skipped ? "skipped: no changes" : reviewCounts(r)
return note([.text("review of snapshot #\(r.snapshotN): \(outcome)")], r.state == .failed ? .error : .plain)
let parts: [NotePart] = [.text("review of snapshot #\(r.snapshotN): \(outcome)")]
if findings(r).isEmpty {
return note(parts, r.state == .failed ? .error : .plain)
}
return Row(.review(note: Note(parts: parts, when: when), md: parseMarkdown(str(r.result?.value ?? [:], "summary") ?? "")), taskId: taskId)
case "task.merge_queued":
return note([.text("\(ev.actor) asked to merge; held until the merge in progress in this project is done")])