[web] Add command palette GitOrigin-RevId: 5bf1903836810ca5f0e2bc7f6c00a4b1da797ea2
17 lines
582 B
TypeScript
17 lines
582 B
TypeScript
import { useMemo } from 'react'
|
|
import { CommandPaletteSource } from '../types'
|
|
import useCommandRegistrySource from './use-command-registry-source'
|
|
import useFileTreeCommandSource from './use-file-tree-command-source'
|
|
|
|
const useCommandPaletteSources = (): CommandPaletteSource[] => {
|
|
const fileTreeSource = useFileTreeCommandSource()
|
|
const commandRegistrySource = useCommandRegistrySource()
|
|
const sources = useMemo(
|
|
() => [fileTreeSource, commandRegistrySource],
|
|
[fileTreeSource, commandRegistrySource]
|
|
)
|
|
return sources
|
|
}
|
|
|
|
export default useCommandPaletteSources
|