Documentation
¶
Index ¶
- func Accent(s string) string
- func Danger(s string) string
- func ErrorMsg(message string)
- func Info(s string) string
- func InitMarkdown()
- func InitTheme(mode string)
- func KeyValue(key, value string) string
- func Muted(s string) string
- func Prompt(symbol string) string
- func RenderApprovalCard(toolName, detail string, preview []string, risk string) string
- func RenderHeader(keyName, baseURL, cwd string) string
- func RenderHints(mode string) string
- func RenderMarkdown(md string) string
- func ShowBanner(setting string, noMotion bool)
- func StreamDelta(delta api.Delta)
- func Success(s string) string
- func ToolRisk(toolName string) string
- func UsePlainTheme()
- func Warn(s string) string
- type StreamRenderer
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTheme ¶
func InitTheme(mode string)
InitTheme initializes the global theme. Mode can be "auto", "dark", or "light".
func RenderApprovalCard ¶
RenderApprovalCard builds a bordered approval card for a tool call.
func RenderHeader ¶
RenderHeader renders a metadata header bar with key, server, and cwd.
func RenderHints ¶
RenderHints renders a hint bar for the given mode.
func RenderMarkdown ¶
RenderMarkdown renders a markdown string to styled terminal output. Falls back to the raw string if rendering fails.
func ShowBanner ¶
ShowBanner displays the animated startup banner. setting: "always", "once", "never" (empty defaults to "once").
func StreamDelta ¶
StreamDelta prints a streaming delta to the terminal (legacy convenience function).
func UsePlainTheme ¶
func UsePlainTheme()
UsePlainTheme swaps the active theme for the unstyled one regardless of terminal capabilities. Used when output goes to a log file instead of a terminal (host service mode).
Types ¶
type StreamRenderer ¶
type StreamRenderer struct {
ShowReasoning bool
// contains filtered or unexported fields
}
StreamRenderer accumulates streaming content and provides markdown rendering on finish.
func NewStreamRenderer ¶
func NewStreamRenderer() *StreamRenderer
NewStreamRenderer creates a new StreamRenderer.
func (*StreamRenderer) Content ¶
func (r *StreamRenderer) Content() string
Content returns the raw accumulated content.
func (*StreamRenderer) Delta ¶
func (r *StreamRenderer) Delta(delta api.Delta)
Delta processes a streaming delta, printing content immediately. Reasoning is printed only if ShowReasoning is true.
func (*StreamRenderer) Finish ¶
func (r *StreamRenderer) Finish() string
Finish returns the accumulated content rendered as markdown. Returns empty string if there was no content.
type Theme ¶
type Theme struct {
Text lipgloss.Style
Muted lipgloss.Style
Accent lipgloss.Style
Success lipgloss.Style
Warn lipgloss.Style
Danger lipgloss.Style
Info lipgloss.Style
Border lipgloss.Style
Selection lipgloss.Style
Reasoning lipgloss.Style
}
Theme holds semantic styles for all UI elements.
var T *Theme
T is the active theme instance. Call InitTheme before using.