NewLoop creates a new Loop instance.
(prdPath, prompt string, maxIter int, provider Provider)
| 63 | |
| 64 | // NewLoop creates a new Loop instance. |
| 65 | func NewLoop(prdPath, prompt string, maxIter int, provider Provider) *Loop { |
| 66 | return &Loop{ |
| 67 | prdPath: prdPath, |
| 68 | prompt: prompt, |
| 69 | maxIter: maxIter, |
| 70 | provider: provider, |
| 71 | events: make(chan Event, 100), |
| 72 | retryConfig: DefaultRetryConfig(), |
| 73 | watchdogTimeout: DefaultWatchdogTimeout, |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // NewLoopWithWorkDir creates a new Loop instance with a configurable working directory. |
| 78 | // When workDir is empty, defaults to the project root for backward compatibility. |