Bus UI Assistant
AIMarkdown renders safe assistant markdown.
Use it for transcript bodies that need deterministic link policy, optional code rendering, and workspace-path resolution controlled by the host.
Public API
AIMarkdown(p AIMarkdownProps) gx.Node
When to use it
Use AIMarkdown when you need markdown parsing without letting the
component decide how to resolve workspace links or code rendering policy.
Key props
Text, Links, DisableCode,
ResolveWorkspaceHref, and Log.
Example
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
assistantui "github.com/busdk/bus-ui/pkg/assistantui"
)
node := assistantui.AIMarkdown(assistantui.AIMarkdownProps{
Text: "See [docs](/docs/gx-ui/reference/index.html).",
Links: assistantui.AIMarkdownLinksWorkspacePaths,
ResolveWorkspaceHref: func(target string) string { return target },
})
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 AIMarkdownExample() gx.Node {
return <article class="ai-markdown">
<h2><Text value={"Summary"}></Text></h2>
<p><Text value={"The patch is ready for review."}></Text></p>
</article>
}
Related
Return to Assistant or the Bus UI reference.