Something went wrong. Try again.
source dump of claude code forked from oppi.li/claude-code
Something went wrong. Try again.
423 B · 15 lines
TypeScript
at main
12345678910111213141516import 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])}