Bus UI Assistant
AIAttachmentList shows assistant attachment chips.
Use it for attachment rows that need open, inspect, or remove actions while keeping attachment identity and size labels visible.
Public API
AIAttachmentList(p AIAttachmentListProps) gx.Node
When to use it
Use AIAttachmentList when the assistant panel needs to show files or
references that belong to the current thread.
Key props
ID, ThreadID, Size,
Attachments, OnRemove, OnOpen,
OnInspect, and Attrs.
Example
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
assistantui "github.com/busdk/bus-ui/pkg/assistantui"
)
node := assistantui.AIAttachmentList(assistantui.AIAttachmentListProps{
ThreadID: "thread-1",
Attachments: []assistantui.AIPanelAttachment{
{ID: "spec", Label: "spec.md", SizeLabel: "2 KB"},
},
})
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 AIAttachmentListExample() gx.Node {
return <ul class="ai-attachment-list">
<li><a href="/evidence/receipt.png"><Text value={"receipt.png"}></Text></a></li>
</ul>
}
Related
Return to Assistant or the Bus UI reference.