Bus UI Assistant
Assistant surfaces are split into focused component pages.
Use these pages for the assistant shell, panel, composer, model chooser, approval
flows, review status, thread list, message rendering, markdown, attachments, and
thread isolation. Preferred public package:
github.com/busdk/bus-ui/pkg/assistantui. Use the public package shown here for current product code.
Public APIs
| Page | Use it for | Public API |
|---|---|---|
| AssistantShell | Generic business-plus-assistant shell layout with collapsible assistant chrome. | AssistantShell(p AssistantShellProps) gx.Node |
| AIPanel | Thread lists, messages, approvals, attachments, composer state, and model controls in one panel. | AIPanel(p AIPanelProps) gx.Node |
| AIComposer | Controlled prompt input with send and interrupt actions. | AIComposer(p AIComposerProps) gx.Node |
| AIModelSelect | Model selection or display-only model state. | AIModelSelect(p AIModelSelectProps) gx.Node |
| AIApprovals | Pending approval requests with approve and reject controls. | AIApprovals(p AIApprovalsProps) gx.Node |
| AIReviewStatus | Review-before-apply status cards and state summaries. | AIReviewStatus(p AIReviewStatusProps) gx.Node |
| AIThreadIsolation | Workspace, branch, owner, and conflict status for assistant thread isolation. | AIThreadIsolation(p AIThreadIsolationProps) gx.Node |
| AIThreadList | Selectable assistant thread lists and archive actions. | AIThreadList(p AIThreadListProps) gx.Node |
| AIMessage | Validated transcript bubbles with trusted markdown or escaped text. | AIMessage(p AIMessageProps) gx.Node |
| AIMarkdown | Safe markdown rendering with explicit link policy. | AIMarkdown(p AIMarkdownProps) gx.Node |
| AIAttachmentList | Attachment chips with open, inspect, and remove actions. | AIAttachmentList(p AIAttachmentListProps) gx.Node |
| AIDropController | Drop-event intake for files, paths, and staged attachment tokens. | AcceptDropItems(ctx, items) |
Example
Go API
import (
gx "github.com/busdk/bus-gx/pkg/gx"
assistantui "github.com/busdk/bus-ui/pkg/assistantui"
)
node := assistantui.AIPanel(assistantui.AIPanelProps{
Title: "Review",
ActiveThread: "thread-1",
Threads: []assistantui.AIThreadSummary{{ID: "thread-1", Title: "Draft review"}},
Messages: []assistantui.AIPanelMessage{{Role: "assistant", Text: "Ready for review."}},
Draft: "Check the diff",
Model: "gpt-5",
ModelOptions: []assistantui.AIModelOption{{ID: "gpt-5", Label: "GPT-5"}},
})
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 AIPanelExample() gx.Node {
return <section class="ai-panel">
<header><h2><Text value={"Review"}></Text></h2></header>
<article class="ai-message"><p><Text value={"Ready for review."}></Text></p></article>
<form class="ai-composer" method="post">
<textarea name="draft" placeholder="Check the diff"></textarea>
<button type="submit"><Text value={"Send"}></Text></button>
</form>
</section>
}
Related
See the Bus UI library index or the Bus UI reference.