setQuery(event.target.value)}
onKeyDown={onKeyDown}
/>
{hasResults ? (
<>
{renderSection(trans.__('Recently used'), sections.recent, 0)}
{renderSection(
trans.__('Commands'),
sections.commands,
commandsStart
)}
{renderSection(trans.__('Files'), sections.files, filesStart)}
{renderSection(
trans.__('Ask an agent'),
sections.agents,
agentsStart
)}
>
) : (
{query.trim()
? trans.__('No matches.')
: trans.__(
'Search files and commands, or type a prompt and pick an agent. Prefix with > for commands or / for files.'
)}
)}