diff --git a/doc/IDEAS.md b/doc/IDEAS.md index 4b459f5..4cf1d0a 100644 --- a/doc/IDEAS.md +++ b/doc/IDEAS.md @@ -84,10 +84,10 @@ echo "name=tester agent=tester cwd=$cwd" > s/new # Send a prompt to a session and return only the new output. send() { sid=$1; shift - offset=$(wc -c < s/$sid/chat) printf '%s' "$*" > s/$sid/prompt while [ "$(cat s/$sid/state)" = "idle" ]; do sleep 0.2; done while [ "$(cat s/$sid/state)" != "idle" ]; do sleep 1; done + offset=$(cat s/$sid/offset) tail -c +$((offset + 1)) s/$sid/chat } diff --git a/doc/help.md b/doc/help.md index 0dc407f..c6b4263 100644 --- a/doc/help.md +++ b/doc/help.md @@ -40,6 +40,7 @@ ollie/ agent active agent (r/w) backend active backend (r/w) chat conversation log (ro) + offset byte offset of chat EOF before last prompt submit (ro) ctl control (w) stop, kill, clear, compact, rn ctxsz context size (ro) cwd working directory (r/w)