This commit is contained in:
kuberwastaken 2026-03-31 16:25:52 +05:30
commit ec53fcbe95
1905 changed files with 513762 additions and 0 deletions

View file

@ -0,0 +1,15 @@
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])
}