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.

422 B
Raw Blame
import type { EmitSourceEventInput } from '../types';

export const createChainRef = (sourceId: string) => ({
  chainId: `chain:${sourceId}`,
  rootSourceId: sourceId,
});

export const createBaseSource = (input: EmitSourceEventInput) => {
  return {
    chain: createChainRef(input.sourceId),
    payload: input.payload,
    scopeKey: input.scopeKey,
    sourceId: input.sourceId,
    timestamp: input.timestamp,
  };
};