docs(ui): explain reasoning state retention (#9738)

This commit is contained in:
Marius
2026-04-30 14:07:58 +02:00
committed by GitHub
parent a076e336b3
commit 535b8d0d37
@@ -1350,6 +1350,9 @@ const userOpened = new Set<string>()
const MAX_REASONING_STATE = 1000
function rememberReasoningState(set: Set<string>, id: string) {
// Remember the most recent manual display choices without growing forever.
// If an old id is evicted, only its open/collapsed override is forgotten;
// the reasoning block still renders normally if it appears again.
if (set.has(id)) set.delete(id)
set.add(id)
if (set.size <= MAX_REASONING_STATE) return