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

Function NewSnapshotCreateModel

tui/snapshot_create.go:52–75  ·  view source on GitHub ↗
(client *api.Client)

Source from the content-addressed store, hash-verified

50}
51
52func NewSnapshotCreateModel(client *api.Client) snapshotCreateModel {
53 styles := NewPanelStyles()
54
55 ti := textinput.New()
56 ti.Placeholder = ""
57 ti.CharLimit = 50
58 ti.Width = 40
59 ti.Prompt = "▶ "
60 ti.PromptStyle = styles.Cursor
61 ti.TextStyle = styles.Cursor
62 ti.PlaceholderStyle = styles.Cursor
63 ti.Cursor.Style = styles.Cursor
64
65 s := NewPrimarySpinner()
66
67 return snapshotCreateModel{
68 step: snapshotCreateStepSelectInstance,
69 client: client,
70 nameInput: ti,
71 spinner: s,
72 styles: styles,
73 warningBox: WarningBoxStyle().MarginTop(1).MarginBottom(1),
74 }
75}
76
77type snapshotCreateInstancesMsg struct {
78 instances []api.Instance

Callers 1

Calls 3

NewPanelStylesFunction · 0.85
NewPrimarySpinnerFunction · 0.85
WarningBoxStyleFunction · 0.85

Tested by

no test coverage detected