Documentation
¶
Overview ¶
Package ui implements the bubbletea TUI for Errata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDiffs ¶
func RenderDiffs(responses []models.ModelResponse, width ...int) string
RenderDiffs returns a multi-line string showing diffs for all responses, including errors.
func RenderSelectionMenu ¶
func RenderSelectionMenu(responses []models.ModelResponse) string
RenderSelectionMenu returns the numbered selection prompt string. Failed responses are shown as non-selectable; only OK responses get numbers.
func Run ¶
func Run(adapterList []models.ModelAdapter, cfg config.Config, warnings []string, mcpDefs []tools.ToolDef, mcpDispatchers map[string]tools.MCPDispatcher, resuming bool, providerModels []adapters.ProviderModels, debugLog bool, store *datastore.Store) error
Run starts the bubbletea program and blocks until exit.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the bubbletea model.
func New ¶
func New(adapterList []models.ModelAdapter, cfg config.Config, mcpDefs []tools.ToolDef, mcpDispatchers map[string]tools.MCPDispatcher, providerModels []adapters.ProviderModels, debugLog bool, store *datastore.Store) *App
New creates the App model.
func (*App) SetProgram ¶
SetProgram wires up the tea.Program reference so goroutines can send messages.
type MentionResult ¶
type MentionResult struct {
ModelIDs []string // resolved full model IDs (deduped)
Prompt string // remaining text after stripping leading @mentions
Errors []string // unresolved @tokens (no matching adapter)
}
MentionResult holds the result of parsing @mentions from prompt text.
func ParseMentions ¶
func ParseMentions(input string, adapterIDs []string) MentionResult
ParseMentions extracts leading @model tokens from a prompt string and resolves them against the known adapter IDs using case-insensitive prefix matching. If a prefix matches multiple adapters, all are included (group targeting). Consumption stops at the first non-@ word or an unresolved @token.