MCPcopy Create free account
hub / github.com/compozy/agh / Update

Method Update

internal/cli/install.go:353–378  ·  view source on GitHub ↗
(msg tea.Msg)

Source from the content-addressed store, hash-verified

351}
352
353func (m *installWizardModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
354 keyMsg, ok := msg.(tea.KeyMsg)
355 if ok {
356 if keyMsg.String() == "ctrl+c" {
357 m.canceled = true
358 return m, tea.Quit
359 }
360
361 switch m.step {
362 case installWizardStepProvider:
363 return m.updateProviderStep(keyMsg)
364 case installWizardStepModel:
365 return m.updateModelStep(keyMsg)
366 case installWizardStepConfirm:
367 return m.updateConfirmStep(keyMsg)
368 }
369 }
370
371 if m.step != installWizardStepModel {
372 return m, nil
373 }
374
375 var cmd tea.Cmd
376 m.modelInput, cmd = m.modelInput.Update(msg)
377 return m, cmd
378}
379
380func (m *installWizardModel) View() string {
381 var builder strings.Builder

Callers

nothing calls this directly

Calls 5

updateProviderStepMethod · 0.95
updateModelStepMethod · 0.95
updateConfirmStepMethod · 0.95
UpdateMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected