MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / InitCommonStyles

Function InitCommonStyles

tui/common.go:42–63  ·  view source on GitHub ↗
(out io.Writer)

Source from the content-addressed store, hash-verified

40var initOnce sync.Once
41
42func InitCommonStyles(out io.Writer) {
43 initOnce.Do(func() {
44 theme.Init(out)
45
46 helpStyleTUI = theme.Neutral().Italic(true)
47 errorStyleTUI = theme.Error()
48 warningStyleTUI = theme.Warning()
49 successStyle = theme.Success()
50
51 primaryStyle = theme.Primary()
52 primaryTitleStyle = primaryStyle.Bold(true)
53 primaryCursorStyle = primaryStyle
54 primarySelectedStyle = primaryTitleStyle
55 labelStyle = theme.Label()
56 subtleTextStyle = theme.Neutral()
57 durationTextStyle = subtleTextStyle.Italic(true)
58 warningBoxStyle = warningStyleTUI.
59 Border(lipgloss.RoundedBorder()).
60 BorderForeground(lipgloss.Color(theme.WarningColor)).
61 Padding(1, 2)
62 })
63}
64
65func RenderWarningSimple(message string) string {
66 if message == "" {

Callers 15

runPortsListFunction · 0.92
runConnectWithOptionsFunction · 0.92
initFunction · 0.92
NewPortsForwardModelFunction · 0.85
NewBusyModelFunction · 0.85
RunStatusFunction · 0.85
RenderUpToDateFunction · 0.85
RenderUpdateAvailableFunction · 0.85
RenderUpdatingFunction · 0.85
RenderPMInstructionsFunction · 0.85
RenderUpdateSuccessFunction · 0.85
RenderUpdateFailedFunction · 0.85

Calls 8

InitFunction · 0.92
NeutralFunction · 0.92
ErrorFunction · 0.92
WarningFunction · 0.92
SuccessFunction · 0.92
PrimaryFunction · 0.92
LabelFunction · 0.92
DoMethod · 0.65