fix: prevent typing indicator during heartbeat background tasks
This commit is contained in:
@@ -467,7 +467,7 @@ export async function getReplyFromConfig(
|
|||||||
const isFirstTurnInSession = isNewSession || !systemSent;
|
const isFirstTurnInSession = isNewSession || !systemSent;
|
||||||
const isGroupChat = sessionCtx.ChatType === "group";
|
const isGroupChat = sessionCtx.ChatType === "group";
|
||||||
const wasMentioned = ctx.WasMentioned === true;
|
const wasMentioned = ctx.WasMentioned === true;
|
||||||
const shouldEagerType = !isGroupChat || wasMentioned;
|
const shouldEagerType = (!isGroupChat || wasMentioned) && !opts?.isHeartbeat;
|
||||||
const shouldInjectGroupIntro = Boolean(
|
const shouldInjectGroupIntro = Boolean(
|
||||||
isGroupChat &&
|
isGroupChat &&
|
||||||
(isFirstTurnInSession || sessionEntry?.groupActivationNeedsSystemIntro),
|
(isFirstTurnInSession || sessionEntry?.groupActivationNeedsSystemIntro),
|
||||||
|
|||||||
Reference in New Issue
Block a user