Bus UI Assistant

AIMessage renders one transcript bubble.

Use it for assistant, user, system, or tool messages when the host needs one node-first bubble with escaped text or trusted markdown HTML.

Public API

AIMessage(p AIMessageProps) gx.Node

When to use it

Use AIMessage when you already have sanitized transcript content and want the component to enforce role and body provenance.

Key props

Role, Text, HTML, Sanitizer, and Attrs.

Example

Loading AIMessage demo...

Go API

import (
  gx "github.com/busdk/bus-gx/pkg/gx"
  assistantui "github.com/busdk/bus-ui/pkg/assistantui"
)

node := assistantui.AIMessage(assistantui.AIMessageProps{
  Role: "assistant",
  Text: "Ready for review.",
})

html, err := gx.RenderHTML(node)

.gx source

In .gx source, author the visible component state as GX markup. Keep the Go API block above for the package helper or render-boundary call.

package busuiexamples

import gx "github.com/busdk/bus-gx/pkg/gx"

func AIMessageExample() gx.Node {
  return <article class="ai-message" data-role="assistant">
  <p><Text value={"Ready for review."}></Text></p>
</article>
}

Related

Return to Assistant or the Bus UI reference.