feat(confidence-engine): use server investigation persistence
This commit is contained in:
@@ -4,6 +4,8 @@ const CANONICAL_KEY = "confidence-engine-investigation";
|
||||
const LEGACY_KEY = "confidence-engine-session";
|
||||
const SCHEMA_VERSION = 1;
|
||||
|
||||
import { restartSnapshot } from "../restart-investigation.js";
|
||||
|
||||
// Multi-Investigation key prefix (v0.60c)
|
||||
const INVESTIGATION_PREFIX = "confidence-engine-investigation:";
|
||||
|
||||
@@ -196,17 +198,7 @@ export function restartInvestigation(id) {
|
||||
const record = JSON.parse(raw);
|
||||
if (!isPlainObject(record)) return;
|
||||
|
||||
// Preserve container fields, reset reasoning-state fields
|
||||
record.situationGraph = null;
|
||||
record.selectedQuestion = null;
|
||||
record.summary = null;
|
||||
record.focusedContributions = [];
|
||||
record.findings = [];
|
||||
record.investigationReport = null;
|
||||
record.investigationRevision = 0;
|
||||
record.updatedAt = new Date().toISOString();
|
||||
|
||||
_persist(storage, key, JSON.stringify(record));
|
||||
_persist(storage, key, JSON.stringify(restartSnapshot(record)));
|
||||
} catch (_) { /* storage errors must not crash caller */ }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user