pediatric-ai-scribe-v3/public/js/assistant
Daniel d04a3fe53b fix: translate as HTML so tables and emphasis survive; stop repeat image generation
Translation formatting
LibreTranslate's text mode destroys markdown syntax. Verified against the live
container: table pipes come back as "←", the |---| delimiter row is translated
as prose ("Silencio."), and "**bold**" returns as "** bold**" which no longer
renders. Its html mode leaves tags — and bare [n] markers — completely intact.
Messages and the patient take home are now rendered to HTML, simplified (maths
and UI chrome flattened to text), and translated as HTML. Citation chips are
re-linked from the returned markers afterwards, which is the step the original
html path was missing. A text-mode fallback remains for builds that reject html.

Repeat image generation
Typing "Окей" or "Nice" after an image turn produced another image every time:
the model saw its own "I'll generate an educational image…" in the history and
repeated it. Recognising acknowledgements in every language is not possible, so
the rule is inverted — a short follow-up (<=3 words) that mentions nothing about
a picture does not get the image tool offered at all when the previous assistant
turn produced an image. Terse repeat requests ("again", "ещё", "another one")
still work. The worst case is that a terse question is answered in text.

In-chat images
Generated images render as a 320x240 thumbnail instead of filling the bubble,
and the image itself opens the full-resolution preview.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkfrkQwA4YGrGw9LZSpeAq
2026-09-09 18:49:58 +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: translate as HTML so tables and emphasis survive; stop repeat image generation 2026-09-09 18:49:58 +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 fix: translate as HTML so tables and emphasis survive; stop repeat image generation 2026-09-09 18:49:58 +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 feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00