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.

524 B
Raw Blame
import type { AgentSignalState } from './initialState';
import {
  agentSignalReceiptsKey,
  type AgentSignalReceiptsParams,
  type AgentSignalReceiptView,
} from './projection';

/** One topic's receipts, or `undefined` before their first paint. */
const getReceipts =
  (params?: AgentSignalReceiptsParams | null) =>
  (s: AgentSignalState): AgentSignalReceiptView[] | undefined =>
    params ? s.agentSignalReceiptsMap[agentSignalReceiptsKey(params)] : undefined;

export const agentSignalSelectors = {
  getReceipts,
};