fix(threading): honor replyToMode=off for compaction notices
Compaction notices carried replyToCurrent=true, which caused them to
pass through the allowExplicitReplyTagsWhenOff path in
createReplyToModeFilter("off") and retain replyToId. In
replyToMode=off sessions this made the transient status messages
appear in-thread while normal assistant replies stayed off-thread,
contradicting the off-mode expectation.
Add an !isCompactionNotice guard to the explicit-tag fast-path so
compaction payloads always fall through to the strip branch and have
their replyToId removed — consistent with how every other payload is
treated in off mode.
This commit is contained in:
parent
e2dc9b1682
commit
0b236892ac
@ -33,7 +33,12 @@ export function createReplyToModeFilter(
|
||||
}
|
||||
if (mode === "off") {
|
||||
const isExplicit = Boolean(payload.replyToTag) || Boolean(payload.replyToCurrent);
|
||||
if (opts.allowExplicitReplyTagsWhenOff && isExplicit) {
|
||||
// Compaction notices must never be threaded when replyToMode=off — even
|
||||
// if they carry explicit reply tags (replyToCurrent). Honouring the
|
||||
// explicit tag here would make status notices appear in-thread while
|
||||
// normal assistant replies stay off-thread, contradicting the off-mode
|
||||
// expectation. Strip replyToId unconditionally for compaction payloads.
|
||||
if (opts.allowExplicitReplyTagsWhenOff && isExplicit && !payload.isCompactionNotice) {
|
||||
return payload;
|
||||
}
|
||||
return { ...payload, replyToId: undefined };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user