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

Method handleWorktreeSpinnerKeys

internal/tui/app.go:1207–1221  ·  view source on GitHub ↗

handleWorktreeSpinnerKeys handles keyboard input for the worktree spinner.

(msg tea.KeyMsg)

Source from the content-addressed store, hash-verified

1205
1206// handleWorktreeSpinnerKeys handles keyboard input for the worktree spinner.
1207func (a App) handleWorktreeSpinnerKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
1208 switch msg.String() {
1209 case "esc":
1210 // Cancel setup and clean up
1211 a.worktreeSpinner.Cancel()
1212 a.cleanupWorktreeSetup()
1213 a.viewMode = ViewDashboard
1214 a.lastActivity = "Worktree setup cancelled"
1215 a.pendingStartPRD = ""
1216 a.pendingWorktreePath = ""
1217 return a, nil
1218 }
1219 // Ignore all other keys during spinner
1220 return a, nil
1221}
1222
1223// cleanupWorktreeSetup cleans up a partially created worktree and branch.
1224func (a *App) cleanupWorktreeSetup() {

Callers 1

UpdateMethod · 0.95

Calls 3

cleanupWorktreeSetupMethod · 0.95
CancelMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected