Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.
TypeScript agentai-agentai-agentsai-assistantandroidautomationchatgptcoding-agentcomputer-usedesktop-appelectronllmlocal-firstmcpmulti-agentollamaopenaiprivacyself-hostedtypescript
import type { createTranslator } from "@pibot/i18n";
import { type Message, replyCitationCheck } from "@pibot/protocol";
export function replyCitationText(
message: Pick<Message, "role" | "usage">,
t: ReturnType<typeof createTranslator>,
): string[] {
const check = message.role === "assistant" ? replyCitationCheck(message) : undefined;
return check
? [
...(check.unread ? [t("chat.citationsUnread", { count: check.unread })] : []),
...(check.incomplete ? [t("chat.citationsIncomplete")] : []),
t("chat.citationsScope"),
]
: [];
}