fix: suppress thinking stream + typing

This commit is contained in:
Peter Steinberger
2025-12-23 14:17:18 +00:00
parent 6d551b0d6e
commit df5284beaf
6 changed files with 40 additions and 3 deletions

View File

@@ -653,8 +653,14 @@ export async function getReplyFromConfig(
}
const isFirstTurnInSession = isNewSession || !systemSent;
const isGroupChat = sessionCtx.ChatType === "group";
const wasMentioned = ctx.WasMentioned === true;
const shouldEagerType = !isGroupChat || wasMentioned;
if (shouldEagerType) {
await startTypingLoop();
}
const shouldInjectGroupIntro =
sessionCtx.ChatType === "group" &&
isGroupChat &&
(isFirstTurnInSession || sessionEntry?.groupActivationNeedsSystemIntro);
const groupIntro =
shouldInjectGroupIntro

View File

@@ -16,6 +16,7 @@ export type MsgContext = {
SenderName?: string;
SenderE164?: string;
Surface?: string;
WasMentioned?: boolean;
};
export type TemplateContext = MsgContext & {