pediatric-ai-scribe-v3/public/js/assistant
Daniel 6dcdf36c81 fix: resolve a citation by its number, not its position in the array
A marker names a source by the `number` dedupeSources assigns server-side.
Rendering looked it up as sources[n - 1], which works only while the array
order and the numbers agree. Nothing breaks that today, but it is an implicit
contract across a network boundary: any later filtering or reordering of the
list — hiding low-score sources, say — would point citations at the wrong
source silently, which is worse than not linking at all.

Matching on the number cannot drift. Positional lookup remains as the fallback
for a list whose entries carry no number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-10 19:10:54 +02:00
..
api.js feat: model selection in chat (composer pill + popup image model), deterministic image dispatch when the model writes text instead of calling the tool, markdown-rendered email, OWUI stacked composer, left mobile drawer, Go back in topbar, DeepL removed, image history inside the Create image popup 2026-09-09 02:55:28 +02:00
citations.js fix: resolve a citation by its number, not its position in the array 2026-09-10 19:10:54 +02:00
data.js feat: diversify assistant starter prompts 2026-05-07 03:19:51 +02:00
export.js feat: Open WebUI presentation — unboxed assistant messages, hairline OWUI tables without card containers 2026-09-08 23:46:29 +02:00
images.js perf: cache generated images for the session and decode thumbnails, not originals 2026-09-10 05:20:10 +02:00
sharing.js fix: bind clinical image and export actions to their original account 2026-09-07 07:45:48 +02:00
sources.js refactor: retrieval is text-only; admins can add model ids discovery never returns 2026-09-09 23:35:06 +02:00