fix(reply): auto-inject replyToCurrent for reply threading

replyToMode "first"/"all" only filters replyToId but never generates
it — that required the LLM to emit [[reply_to_current]] tags. Inject
replyToCurrent:true on all payloads so applyReplyTagsToPayload sets
replyToId=currentMessageId, then let the existing mode filter decide
which replies keep threading (first only, all, or off).

Covers both final reply path (reply-payloads.ts) and block streaming
path (agent-runner-execution.ts).
This commit is contained in:
Andrey
2026-02-12 14:44:53 -05:00
committed by Peter Steinberger
parent 39ee708df6
commit 3d89f0f14a
3 changed files with 54 additions and 2 deletions

View File

@@ -378,7 +378,7 @@ export async function runAgentTurnWithFallback(params: {
mediaUrl: payload.mediaUrls?.[0],
replyToId: payload.replyToId,
replyToTag: payload.replyToTag,
replyToCurrent: payload.replyToCurrent,
replyToCurrent: true,
},
currentMessageId,
);