LocalAI/core/http/react-ui/src
Daniel Liljeberg fc3980dadd
fix: inject text-file content into chat completions messages (#9896)
Non-image/non-audio file attachments (txt, md, csv, json) were being
  stored in the 'files' metadata field but never added to the message
  content array sent to /v1/chat/completions. Images and audio correctly
  received content blocks; files did not.

  Fix: push a text content block into messageContent when textContent is
  present, matching the pattern used for image_url and audio_url.

  Also fixes Home.jsx addFiles which never called file.text() at all,
  meaning files attached on the home screen had empty textContent even
  before reaching useChat.js.

  Note: PDF files use file.text() which returns raw bytes rather than
  parsed text. Proper PDF support would require PDF.js or server-side
  extraction and is not part of this fix.

Signed-off-by: Daniel Liljeberg <damien_@hotmail.com>
2026-05-20 01:00:32 +02:00
..
components chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
context fix(ui): pass by staticApiKeyRequired to show login when only api key is configured (#9220) 2026-04-04 12:11:22 +02:00
contexts feat(branding): admin-configurable instance name, tagline, and assets (#9635) 2026-05-02 15:51:36 +02:00
hooks fix: inject text-file content into chat completions messages (#9896) 2026-05-20 01:00:32 +02:00
i18n feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
pages fix: inject text-file content into chat completions messages (#9896) 2026-05-20 01:00:32 +02:00
utils feat(realtime): Add Liquid Audio s2s model and assistant mode on talk page (#9801) 2026-05-13 21:57:27 +02:00
App.css feat: add LocalVQE backend and audio transformations UI (#9640) 2026-05-04 22:07:11 +02:00
App.jsx feat(react-ui): add multilingual (i18n) support (#9642) 2026-05-02 22:42:08 +02:00
index.css feat(react-ui): editorial refresh with Nord palette and polished primitives (#9550) 2026-04-24 23:35:59 +02:00
main.jsx chore: Security hardening (#9719) 2026-05-08 16:25:45 +02:00
router.jsx feat: add LocalVQE backend and audio transformations UI (#9640) 2026-05-04 22:07:11 +02:00
theme.css feat: react chat redesign (#9616) 2026-04-29 22:33:26 +02:00