+ Search through collections, requests, folders, and documentation. Use arrow keys to navigate results and Enter to select.
+
+ {results.length > 0 && query
+ ? `${results.length} result${results.length === 1 ? '' : 's'} found`
+ : query && results.length === 0
+ ? 'No results found'
+ : ''
+ }
+
+ {results.length === 0 && query ? (
+
+
+ No results found for "{query}".
+
+
+ The item might not exist yet, or its collection isn’t mounted. Press Enter here (or open it from the sidebar) to mount the collection automatically.
+
+
+
+ ) : results.length === 0 ? (
+
+
+ No collections are currently mounted or visible.
+
+
+ Mount a collection via the sidebar or this search modal, then try again.
+
+
+
+ ) : (
+ results.map((result, index) => {
+ const isSelected = index === selectedIndex;
+ const typeLabel = getTypeLabel(result.type);
+
+ return (
+
handleResultSelection(result)}
+ data-selected={isSelected}
+ data-type={result.type}
+ role="option"
+ aria-selected={isSelected}
+ aria-label={`${result.name}, ${typeLabel || result.type}${result.method ? `, ${result.method}` : ''}`}
+ tabIndex={-1}
+ >
+
+ {getResultIcon(result.type)}
+
+
+
+
+ {highlightText(result.name, query)}
+
+
+ {result.type === SEARCH_TYPES.DOCUMENTATION
+ ? result.description
+ : result.type === SEARCH_TYPES.REQUEST
+ ? highlightText(result.item.request?.url || '', query)
+ : highlightText(result.path, query)}
+
+
+
+ {result.type === SEARCH_TYPES.REQUEST && result.method && (
+
+ {result.method.toUpperCase().replace(/-/g, ' ')}
+
+ )}
+ {typeLabel && (
+
+ {typeLabel}
+
+ )}
+
+
+
+ );
+ })
+ )}
+