Oi,Wtf: fix flush race, print session name at end

This commit is contained in:
Levi Neely 2026-06-15 11:18:16 +02:00
parent e5fb3ea524
commit aaa40be407
2 changed files with 8 additions and 2 deletions

View File

@ -79,6 +79,9 @@ fi
printf '%b' "$context\n\nAcknowledge context. What are we working on?" | try tee "$NAV_PATH/prompt" >/dev/null
# Wait for agent to finish, then print response
offset=$(cat "$NAV_PATH/offset")
while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done
while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done
sleep 0.1
offset=$(cat "$NAV_PATH/offset")
tail -c +$((offset + 1)) "$NAV_PATH/chat"
printf '\n%s\n' "$NAV_NAME"

View File

@ -79,6 +79,9 @@ fi
printf '%b' "$context\n\nWhat does this code do?" | try tee "$NAV_PATH/prompt" >/dev/null
# Wait for agent to finish, then print response
offset=$(cat "$NAV_PATH/offset")
while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done
while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done
sleep 0.1
offset=$(cat "$NAV_PATH/offset")
tail -c +$((offset + 1)) "$NAV_PATH/chat"
printf '\n%s\n' "$NAV_NAME"