feat: dashboard Second Brain, essai 7 jours et vérification e-mail
Rendre le dashboard actionnable (inbox, peek, carte mentale), aligner la facturation sur l’essai 7 jours, et bloquer le login e-mail tant que l’adresse n’est pas confirmée. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -189,6 +189,31 @@ function normalizeBlock(
|
||||
return out
|
||||
}
|
||||
|
||||
if (type === 'steps' || type === 'derivation' || type === 'walkthrough' || type === 'solution' || type === 'proof') {
|
||||
const rawSteps = Array.isArray(obj.steps) ? obj.steps : []
|
||||
const steps = rawSteps
|
||||
.map((st) => {
|
||||
const r = asRecord(st)
|
||||
if (!r) return null
|
||||
const tex = asString(r.tex) || asString(r.latex) || asString(r.equation) || asString(r.math)
|
||||
if (!tex) return null
|
||||
const out: Record<string, unknown> = { tex }
|
||||
const rule = asString(r.rule) || asString(r.transform) || asString(r.action) || asString(r.operation)
|
||||
const speak = asString(r.speak) || asString(r.note) || asString(r.comment)
|
||||
if (rule) out.rule = rule
|
||||
if (speak) out.speak = speak
|
||||
return out
|
||||
})
|
||||
.filter(Boolean)
|
||||
if (steps.length < 2) return null
|
||||
const out: Record<string, unknown> = { type: 'steps', steps }
|
||||
const title = asString(obj.title)
|
||||
if (title) out.title = title
|
||||
const caption = asString(obj.caption)
|
||||
if (caption) out.caption = caption
|
||||
return out
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user