INNER CODE UNIT · TypeScript
humanCount
Beever-AI/beever-atlas · bot/src/index.ts:320
const humanCount = participants.filter((p) => p.isMe !== true && p.isBot !== true).length;
participantCache.set(thread.id, humanCount);
return humanCount;
} catch (err) {
console.error("getParticipants failed; defaulting to answer:", safeErrorMessage(err));
return undefined;
}
}
/** Ask the backend and post the rendered reply, swallowing errors into a friendly notice. */
export async function answerInThread(
thread: PostableThread,
question: string,
surface: ReplySurface,
author?: unknown,
isThreaded: boolean = true,
attachments?: ImageAttachment[],
): Promise<void> {