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

Function NewCreateModel

tui/create.go:92–119  ·  view source on GitHub ↗
(client *api.Client, specs *utils.SpecStore)

Source from the content-addressed store, hash-verified

90}
91
92func NewCreateModel(client *api.Client, specs *utils.SpecStore) createModel {
93 styles := NewPanelStyles()
94 s := NewPrimarySpinner()
95
96 ti := textinput.New()
97 ti.Placeholder = "100"
98 ti.SetValue("100")
99 ti.CharLimit = 4
100 ti.Width = 20
101 ti.Prompt = "▶ "
102
103 m := createModel{
104 step: stepGPU,
105 client: client,
106 spinner: s,
107 styles: styles,
108 skippedSteps: make(map[createStep]bool),
109 diskInput: ti,
110 config: CreateConfig{
111 DiskSizeGB: 100,
112 },
113 }
114 if specs != nil {
115 m.specs = specs
116 m.specsLoaded = true
117 }
118 return m
119}
120
121// NewCreateModelWithPresets creates a createModel with pre-filled values from CLI flags.
122func NewCreateModelWithPresets(client *api.Client, specs *utils.SpecStore, presets *CreatePresets) createModel {

Calls 2

NewPanelStylesFunction · 0.85
NewPrimarySpinnerFunction · 0.85