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.

467 B
Raw Blame
import { createContext, useContext } from 'react';

interface GroupMessageContextValue {
  assistantGroupId: string;
}

export const MessageAggregationContext = createContext<GroupMessageContextValue | null>(null);

export const useMessageAggregationContext = () => {
  const context = useContext(MessageAggregationContext);
  if (!context) {
    throw new Error('useMessageAggregationContext must be used within MessageAggregationContext');
  }
  return context;
};