fix: persist LLM predictions without stable ID shadowing
This commit is contained in:
@@ -205,7 +205,7 @@ export class IntelligenceStore {
|
||||
_recordPredictions(data, timestamp) {
|
||||
for (const idea of data.ideas || []) {
|
||||
const title = idea.title || 'Untitled idea';
|
||||
const stableId = stableId('prediction', title, idea.type || '', idea.ticker || '', idea.horizon || '');
|
||||
const predictionId = stableId('prediction', title, idea.type || '', idea.ticker || '', idea.horizon || '');
|
||||
const evidence = Array.isArray(idea.signals) ? idea.signals : [];
|
||||
this.db.prepare(`INSERT INTO predictions (
|
||||
stable_id, created_at, updated_at, title, type, hypothesis, evidence_json, confidence,
|
||||
@@ -217,7 +217,7 @@ export class IntelligenceStore {
|
||||
confidence=excluded.confidence,
|
||||
evidence_json=excluded.evidence_json,
|
||||
payload_json=excluded.payload_json`).run(
|
||||
stableId,
|
||||
predictionId,
|
||||
timestamp,
|
||||
timestamp,
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user