diff --git a/packages/cli/src/components/SearchBox.tsx b/packages/cli/src/components/SearchBox.tsx index 049d009..e40ee21 100644 --- a/packages/cli/src/components/SearchBox.tsx +++ b/packages/cli/src/components/SearchBox.tsx @@ -5,8 +5,16 @@ import {Divider} from './Divider.js' import Spinner from 'ink-spinner' import {Box, Text} from 'ink' -export function SearchBox({components, helper}: {components: string[]; helper: string}) { - const [query, setQuery] = useState('') +export function SearchBox({ + components, + helper, + initialQuery, +}: { + components: string[] + helper: string + initialQuery?: string +}) { + const [query, setQuery] = useState(initialQuery ?? '') const [isLoading, setLoading] = useState(false) const [suggestions, setSuggestions] = useState([])