Use tab to auto complete context suggestion

This commit is contained in:
Saoud Rizwan
2024-09-21 11:18:59 -04:00
parent f7d12a3e02
commit a690fb28fe

View File

@@ -182,7 +182,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
})
return
}
if (event.key === "Enter" && selectedMenuIndex !== -1) {
if ((event.key === "Enter" || event.key === "Tab") && selectedMenuIndex !== -1) {
event.preventDefault()
const selectedOption = getContextMenuOptions(searchQuery, selectedType, queryItems)[
selectedMenuIndex