Omni.UI.EditorComponent (Omni UI v0.1.0)

Copy Markdown View Source

A LiveComponent for composing and submitting user messages.

Provides a textarea for text input, file attachment via click-to-attach and drag-and-drop, and a submit button. On submit, builds an Omni.Message with text and base64-encoded attachments, then sends it to the parent LiveView as {Omni.UI, :new_message, Omni.Message.t()} via send/2.

Upload constraints

  • Accepted types: .jpg, .jpeg, .png, .gif, .webp, .pdf
  • Max entries: 10
  • Max file size: 20 MB

Slots

  • :controls — optional slot rendered in the bottom bar alongside the attach button. Used by editor/1 for model/thinking selectors.

Summary

Functions

render(assigns)

Slots

  • controls