import { config } from '@/config'; import type { Tool } from './tools.types'; type WithOptional = Omit & Partial>; export function defineTool( tool: WithOptional, { newTools }: { newTools: string[] } = { newTools: config.tools.newTools }, ) { const isNew = newTools.includes(tool.name); return { isNew, ...tool, }; }