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.

510 B
Raw Blame
import type { GoalStatus } from '@lobechat/const/goal';
import { goalStatuses } from '@lobechat/const/goal';

import { goalStatusKey } from '@/features/AgentGoals/goalPresentation';

/**
 * The goal list's status label key for a search hit (`failed` reads as "Needs
 * attention"), or `undefined` for a status this client does not know.
 */
export const goalResultStatusKey = (status: string) =>
  (goalStatuses as readonly string[]).includes(status)
    ? goalStatusKey(status as GoalStatus)
    : undefined;