Documentation
¶
Overview ¶
Package tui is antares' terminal UI: a colourful, responsive, web-like chat built on Bubble Tea — sidebar, scrollable transcript with Markdown, a bordered input box, a slash-command palette, and toggleable reasoning. The Bubble Tea renderer owns the screen, so resizing and redraws never corrupt the layout.
Index ¶
- func RenderDemoFrame(w, h int) string
- func RenderModelModalFrame(w, h int) string
- func RenderProviderModalFrame(w, h int) string
- func RenderThemeModalFrame(w, h int) string
- func RenderWelcomeFrame(w, h, frame int) string
- func ThemeExists(name string) bool
- func ThemeNames() []string
- type Command
- type Model
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDemoFrame ¶
RenderDemoFrame renders a single demo frame at the given size — used by the screenshot tool to preview the design.
func RenderModelModalFrame ¶
RenderModelModalFrame previews the model picker with a seeded provider.
func RenderProviderModalFrame ¶
RenderProviderModalFrame previews the provider picker.
func RenderThemeModalFrame ¶
RenderThemeModalFrame renders the demo with the theme picker open — used by the screenshot tool to preview the modal.
func RenderWelcomeFrame ¶
RenderWelcomeFrame renders the empty-state splash at a given animation frame — used by the screenshot tool to preview the welcome screen.
func ThemeExists ¶
ThemeExists reports whether a theme name is known (exported for the CLI).
func ThemeNames ¶
func ThemeNames() []string
ThemeNames lists the available theme names (exported for the CLI).
Types ¶
type Command ¶
type Command struct {
Name string
Summary string
Run func(m *Model, args string) (quit bool, cmd tea.Cmd)
}
Command is one slash command.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea model.
func NewDemo ¶
func NewDemo() *Model
NewDemo builds a self-contained TUI seeded with representative content and no live agent — for previewing the interface (and for hot-reload development). Sending a message produces a canned reply instead of calling a model.
func (*Model) SetReload ¶ added in v0.4.0
SetReload wires the runtime's reload closure so config changes made from the TUI (model switch, provider connect, theme, /config …) rebuild the same services a dashboard save would. Call once after New; nil is fine (the TUI falls back to a config-only refresh and notes what a restart would apply).
type Theme ¶
type Theme struct {
Name string
Accent lipgloss.AdaptiveColor // the single highlight (prompt, focus, "you")
Text lipgloss.AdaptiveColor
Muted lipgloss.AdaptiveColor
Faint lipgloss.AdaptiveColor
Border lipgloss.AdaptiveColor
Green lipgloss.AdaptiveColor
Red lipgloss.AdaptiveColor
Yellow lipgloss.AdaptiveColor
}
Theme is a named colour scheme. Everything else in the UI is greyscale; a theme only picks the accent and the neutral ramp, so switching stays calm.