handleWorktreeSpinnerKeys handles keyboard input for the worktree spinner.
(msg tea.KeyMsg)
| 1205 | |
| 1206 | // handleWorktreeSpinnerKeys handles keyboard input for the worktree spinner. |
| 1207 | func (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. |
| 1224 | func (a *App) cleanupWorktreeSetup() { |
no test coverage detected