Library assistant threads

Contract

AIThreadList renders assistant threads with stable records supplied through the required threads prop. Empty threads renders an empty-list state with no selectable rows. Selection calls the configured onSelect callback with the selected ThreadID.

Prop Required Type Behavior
threads yes []AIThreadSummary Thread records to render. Empty slice renders the empty state.
activeThread no string Marks the matching row active. Unknown ids render no active row.
onSelect no func(AIThreadEvent) gx.Result Enables selectable rows. Omit for a read-only list with inert rows.
Thread field Required Type Behavior
ID yes string Stable product thread id.
Title yes string Escaped display title.
Working no bool Item field, not a component prop. Defaults false; true marks that row as busy and exposes the busy state to assistive technology.

The onSelect prop is required when rows are selectable. Omit it only for a read-only thread list; rows then render as inert list items.

var selectableThreads = <AIThreadList
  threads={ai.Threads}
  activeThread={ai.ActiveThread}
  onSelect={selectThread}>
</AIThreadList>

var readOnlyThreads = <AIThreadList threads={ai.Threads}></AIThreadList>

The callback shape is:

func selectThread(event AIThreadEvent) gx.Result {
	return openThread(event.ThreadID)
}

type AIThreadEvent struct {
	ThreadID string
}

Thread ownership, branch or worktree details, and provider run state stay in the product view model.

Use the list as a child of the FC-009 AIPanel when an assistant pane needs thread selection.

Consequence

Thread selection is reusable without moving assistant workflow ownership into the component.