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.

420 B
Raw Blame
import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';

/** Leave the reply popover before opening the Agent that owns the reply. */
export const useOpenReplyAgent = (agentId: string | null | undefined, close: () => void) => {
  const navigate = useWorkspaceAwareNavigate();

  return () => {
    if (!agentId) return;
    close();
    navigate(`/agent/${agentId}/profile`);
  };
};