/
aqa
/
claude-code
Обзор
Документация
Войти
/
aqa
/
claude-code
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
hooks/useMergedCommands.ts
15 строк
423 B
kuberwastaken
new initial commit (history rewritten)
01 апр 2026, 14:57
01 апр 2026, 14:57
c1996f2
Код
Авторство
О чём код?
import uniqBy from 'lodash-es/uniqBy.js' import { useMemo } from 'react' import type { Command } from '../commands.js' export function useMergedCommands( initialCommands: Command[], mcpCommands: Command[], ): Command[] { return useMemo(() => { if (mcpCommands.length > 0) { return uniqBy([...initialCommands, ...mcpCommands], 'name') } return initialCommands }, [initialCommands, mcpCommands]) }