doc: use offset file in predefined workflow script
Replace manual wc -c pattern with server-maintained offset file. Document offset in help.md session file listing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c2f4694ad8
commit
fdc9707272
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <name>
|
||||
ctxsz context size (ro)
|
||||
cwd working directory (r/w)
|
||||
|
|
|
|||
Loading…
Reference in New Issue