Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

332 B
Raw Blame
/** Chat SDK thread ids for Linq are `linq:<chatId>`; the chat id is Linq's own. */
const PREFIX = 'linq:';

export const encodeLinqThreadId = (chatId: string): string => `${PREFIX}${chatId}`;

export const decodeLinqThreadId = (threadId: string): string =>
  threadId.startsWith(PREFIX) ? threadId.slice(PREFIX.length) : threadId;