Commit Graph
1 Commits
Author SHA1 Message Date
Qtlz a5a63a109f agy-cli 0.1.3: an assistant prefill tail is continued, not refused (#904)
A request ending in a text-only assistant turn (SillyTavern prefill,
"continue"/"impersonate", bot frameworks) was refused with a 400. That
trailing run now stays in the tail, after the session ledger's newest
entry, so the agy session is reused across prefill turns, and it is
rendered as a continuation of the model's own reply. A prefill beside a
live tool_result, or with no user turn before it, is still a 400.
AGY_BRIDGE_PREFILL=0 brings the old refusal back.

Reviewed at f7b249cec9e827b7ef49197a207180f3f7085cfe, run on mote:
bun test ./agy-cli.test.mjs 8 pass / 0 fail; bun scripts/check.mjs ok.
Broken by hand: with main's index.mjs and these tests, test/prefill.mjs
and the smoke test fail (6 pass / 2 fail).
Checked: renderTurnMessagesParts only gets the current turn's tail, never
history, so a finished reply is never taken for a prefill.
Not tried: a real agy account.
2026-11-09 20:12:15 +08:00