MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / stepBack

Method stepBack

internal/cli/launch_wizard.go:335–357  ·  view source on GitHub ↗

stepBack moves to the previous phase that needs input. Esc at the first needed phase is a no-op.

()

Source from the content-addressed store, hash-verified

333// stepBack moves to the previous phase that needs input. Esc at the
334// first needed phase is a no-op.
335func (m *launchWizardModel) stepBack() {
336 switch m.phase {
337 case phasePickTool:
338 // no-op
339 case phasePickEndpoint:
340 if m.in.Pinned.Tool.Name == "" {
341 m.needTool = true
342 m.sel.Tool = tools.Tool{}
343 }
344 m.advanceToNextNeededPhase()
345 case phasePickModel:
346 // Stepping back from model clears manual-entry state.
347 m.manualEntry = false
348 m.manualValue = ""
349 m.modelErr = nil
350 if m.in.Pinned.EndpointName == "" {
351 m.needEndpoint = true
352 m.sel.EndpointName = ""
353 m.sel.Endpoint = providers.Endpoint{}
354 }
355 m.advanceToNextNeededPhase()
356 }
357}
358
359func (m launchWizardModel) updateManualEntry(key tea.KeyMsg) (tea.Model, tea.Cmd) {
360 switch key.String() {

Callers 2

UpdateMethod · 0.95
updateManualEntryMethod · 0.95

Calls 1

Tested by

no test coverage detected