Documentation
¶
Overview ¶
Package ui centralises Alaska's terminal styling so the rest of the code can stay unopinionated about colour and layout.
Index ¶
- Variables
- func AssistantFooter(w io.Writer)
- func AssistantHeader(w io.Writer, providerName, model string)
- func Banner(w io.Writer, providerName, model string)
- func BoxContent(w io.Writer, title, content string)
- func Error(w io.Writer, format string, a ...any)
- func ErrorBox(w io.Writer, content string)
- func Info(w io.Writer, format string, a ...any)
- func OK(w io.Writer, format string, a ...any)
- func RenderRoleLabel(role string) string
- func StatusLine(w io.Writer, providerName, model, thinking string, messages int)
- func Warn(w io.Writer, format string, a ...any)
Constants ¶
This section is empty.
Variables ¶
var ( Accent = color.New(color.FgCyan).SprintFunc() Muted = color.New(color.FgHiBlack).SprintFunc() Success = color.New(color.FgGreen).SprintFunc() WarnS = color.New(color.FgYellow).SprintFunc() Err = color.New(color.FgRed, color.Bold).SprintFunc() Role = color.New(color.FgMagenta).SprintFunc() Title = color.New(color.FgCyan, color.Bold).SprintFunc() )
SprintFuncs — inline colour for one-off messages.
var PromptRaw = "\001\033[1;36m\002you ▸\001\033[0m\002 "
PromptRaw is a readline-safe coloured prompt. The \001..\002 delimiters tell readline which bytes are zero-width, so line wrapping stays correct.
Functions ¶
func AssistantFooter ¶
AssistantFooter prints a subtle separator after the streamed reply.
func AssistantHeader ¶
AssistantHeader prints a header line before the assistant's streamed reply.
func BoxContent ¶
BoxContent renders content inside an accent-coloured rounded box.
func RenderRoleLabel ¶
RenderRoleLabel returns a coloured role label (e.g. for /history listing).
func StatusLine ¶ added in v0.3.0
StatusLine renders a compact single-line status banner the REPL prints before every prompt, so the user always sees which provider/model is live, the current reasoning effort, and how many messages are in context.
Types ¶
This section is empty.