mirror of
https://github.com/rot13maxi/opencode-ralph.git
synced 2026-05-27 14:27:40 +00:00
791 B
791 B
| description |
|---|
| Cancel the active Ralph Wiggum loop |
Cancel Ralph Loop
To cancel the Ralph loop, perform these steps:
-
Check if the Ralph state file exists at
ralph-loop.local.md -
If the file does NOT exist:
- Report: "No active Ralph loop found."
-
If the file EXISTS:
- Read the file to get the current iteration number from the
iteration:field in the frontmatter - Delete the file
ralph-loop.local.md - Report: "Cancelled Ralph loop (was at iteration N)" where N is the iteration value
- Read the file to get the current iteration number from the
Execute:
if [ -f ralph-loop.local.md ]; then
ITERATION=$(grep '^iteration:' ralph-loop.local.md | sed 's/iteration: *//')
rm ralph-loop.local.md
echo "Cancelled Ralph loop (was at iteration $ITERATION)"
else
echo "No active Ralph loop found."
fi