feat: link citation markers in the render pipeline
renderModelOutput now takes the turn's sources and reports back which numbers it linked, so the list has one source of truth for what the answer actually cited. Maths runs before citations, not after. A link label has to escape its brackets, and that escaped form is exactly LaTeX's own display delimiter, so converting the model's maths first is what stops the maths pass from eating a marker and handing back a bare 1.
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ function renderMessage(message: ThreadMessage, options: TranscriptOptions): stri
|
||||
? // One pass, in one place: fences get their languages and links recovered,
|
||||
// then TeX becomes something drawable and the HTML around it is filtered to
|
||||
// the subset the renderer acts on. See `render.ts` for the order and why.
|
||||
renderModelOutput(answered)
|
||||
renderModelOutput(answered).text
|
||||
: !message.isStreaming
|
||||
? "_No response._"
|
||||
: activityLine
|
||||
|
||||
Reference in New Issue
Block a user