fix(reply): honour explicit [[reply_to_*]] tags when replyToMode is off

When replyToMode is 'off', explicit [[reply_to_current]] / [[reply_to:<id>]]
tags from the LLM were being stripped along with auto-injected reply threading.

Change the default for allowTagsWhenOff from false to true so explicit tags
are honoured on all channels, not just Slack. Channels can still opt out by
setting threading.allowTagsWhenOff to false in their dock definition.

Fixes #16155
This commit is contained in:
HAL
2026-02-14 06:02:42 -06:00
committed by Peter Steinberger
parent 0af76f5f0e
commit 0ad8536d46

View File

@@ -54,9 +54,11 @@ export function createReplyToModeFilterForChannel(
channel?: OriginatingChannelType,
) {
const provider = normalizeChannelId(channel);
// Always honour explicit [[reply_to_*]] tags even when replyToMode is "off".
// Per-channel opt-out is possible but the safe default is to allow them.
const allowTagsWhenOff = provider
? Boolean(getChannelDock(provider)?.threading?.allowTagsWhenOff)
: false;
? (getChannelDock(provider)?.threading?.allowTagsWhenOff ?? true)
: true;
return createReplyToModeFilter(mode, {
allowTagsWhenOff,
});