adjustMaxIterations adjusts the max iterations by delta.
(delta int)
| 2249 | |
| 2250 | // adjustMaxIterations adjusts the max iterations by delta. |
| 2251 | func (a *App) adjustMaxIterations(delta int) { |
| 2252 | newMax := a.maxIter + delta |
| 2253 | if newMax < 1 { |
| 2254 | newMax = 1 |
| 2255 | } |
| 2256 | a.maxIter = newMax |
| 2257 | |
| 2258 | // Update the manager's default |
| 2259 | if a.manager != nil { |
| 2260 | a.manager.SetMaxIterations(newMax) |
| 2261 | // Also update any running loop for the current PRD |
| 2262 | a.manager.SetMaxIterationsForInstance(a.prdName, newMax) |
| 2263 | } |
| 2264 | |
| 2265 | a.lastActivity = fmt.Sprintf("Max iterations: %d", newMax) |
| 2266 | } |
| 2267 | |
| 2268 | // listenForProgressChanges listens for progress.md file changes and returns them as messages. |
| 2269 | func (a *App) listenForProgressChanges() tea.Cmd { |
no test coverage detected