Recap editor: Regenerate recap (re-run LLM on corrected transcript)

Adds a 'Regenerate recap' action so corrected speaker names flow into freshly
written summaries/extras (not just find-replaced). regenerate() commits the
corrections (rewrite speakers.json + reconcile voiceprints), re-runs RecapAnalyzer
on the corrected transcript via the gateway LLM, and rewrites recap.json +
transcript.md + recap.html. save() and regenerate() share commitCorrections();
both rebaseline the speaker set afterward so further edits map cleanly. Editor view
gains the button + progress spinner; RecapEditModel takes the gateway baseURL/skipTLS.

52/52 XCTest; builds clean.
This commit is contained in:
Grant Gilliam
2026-06-06 16:48:18 -05:00
parent 4c086251d9
commit 10ddf9992a
4 changed files with 76 additions and 18 deletions
@@ -68,7 +68,8 @@ final class SpeakerEditingTests: XCTestCase {
.write(to: dir.appendingPathComponent("cluster_fingerprints.json"))
let store = VoiceprintStore(fileURL: dir.appendingPathComponent("voiceprints.json"))
let model = try XCTUnwrap(RecapEditModel(folder: dir, voiceprints: store))
let model = try XCTUnwrap(RecapEditModel(folder: dir, voiceprints: store,
baseURL: "https://localhost:1", skipTLS: true))
model.rename("Unknown_0", to: "Caitlyn")
XCTAssertTrue(model.speakers.contains("Caitlyn"))
XCTAssertFalse(model.speakers.contains("Unknown_0"))