MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / Update

Method Update

internal/tui/first_time_setup.go:92–115  ·  view source on GitHub ↗

Update handles messages.

(msg tea.Msg)

Source from the content-addressed store, hash-verified

90
91// Update handles messages.
92func (f FirstTimeSetup) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
93 switch msg := msg.(type) {
94 case tea.WindowSizeMsg:
95 f.width = msg.Width
96 f.height = msg.Height
97 return f, nil
98
99 case ghCheckResultMsg:
100 return f.handleGHCheckResult(msg)
101
102 case tea.KeyMsg:
103 switch f.step {
104 case StepGitignore:
105 return f.handleGitignoreKeys(msg)
106 case StepPRDName:
107 return f.handlePRDNameKeys(msg)
108 case StepPostCompletion:
109 return f.handlePostCompletionKeys(msg)
110 case StepGHError:
111 return f.handleGHErrorKeys(msg)
112 }
113 }
114 return f, nil
115}
116
117func (f FirstTimeSetup) handleGitignoreKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
118 switch msg.String() {

Callers

nothing calls this directly

Calls 5

handleGHCheckResultMethod · 0.95
handleGitignoreKeysMethod · 0.95
handlePRDNameKeysMethod · 0.95
handleGHErrorKeysMethod · 0.95

Tested by

no test coverage detected