🔀 fix: Address Convo/Preset Switching Issues (#2709)

* fix(schemas): interchangeability between chatGptLabel <> modelLabel

* fix: display error message from enforceModelSpecs when conversation already existed

* fix(Mention): use activeIndex on mention tab/enter

* fix: correctly navigate to new conversation when deleting/archiving a new, active convo
This commit is contained in:
Danny Avila 2024-05-14 15:19:58 -04:00 committed by GitHub
parent e42709bd1f
commit 94eeec354e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 74 additions and 51 deletions

View file

@ -99,7 +99,7 @@ export default function Mention({
} else if (e.key === 'ArrowUp') {
setActiveIndex((prevIndex) => (prevIndex - 1 + matches.length) % matches.length);
} else if (e.key === 'Enter' || e.key === 'Tab') {
const mentionOption = matches[0] as MentionOption | undefined;
const mentionOption = matches[activeIndex] as MentionOption | undefined;
if (mentionOption?.type === 'endpoint') {
e.preventDefault();
} else if (e.key === 'Enter') {