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.

498 B
Raw Blame
import type { VerifyRunOrigin } from '@lobechat/types';

/**
 * The conversation a report was authored in, as an in-app route. Agent topics
 * live at `/agent/:aid/:topicId`; without the agent there is no route to the
 * topic, so there is no link (the legacy `/chat?topic=` redirects to `/` and
 * drops the topic).
 */
export const originTopicHref = (origin?: VerifyRunOrigin): string | undefined =>
  origin?.agentId && origin.topicId ? `/agent/${origin.agentId}/${origin.topicId}` : undefined;