effectiveWorkDir returns the working directory to use for the agent. If workDir is set, it is used directly. Otherwise, defaults to the PRD directory.
()
| 539 | // effectiveWorkDir returns the working directory to use for the agent. |
| 540 | // If workDir is set, it is used directly. Otherwise, defaults to the PRD directory. |
| 541 | func (l *Loop) effectiveWorkDir() string { |
| 542 | if l.workDir != "" { |
| 543 | return l.workDir |
| 544 | } |
| 545 | return filepath.Dir(l.prdPath) |
| 546 | } |
| 547 | |
| 548 | // IsRunning returns whether an agent process is currently running. |
| 549 | func (l *Loop) IsRunning() bool { |