quivr/frontend/app/chat/[chatId]/components/Dialog.tsx
Mamadou DICKO 80be40ad34
feat: update chat ui (#907)
* feat: remove react-mentions

* feat: add chat header

* feat: remove v2/chat

* feat: add fature flag

* feat: add new chat UI

* feat: add prompt and brain name to messages
2023-08-11 10:06:20 +02:00

20 lines
467 B
TypeScript

import { useFeature } from "@growthbook/growthbook-react";
import { useChatContext } from "@/lib/context";
import { ChatMessages } from "./ChatMessages";
import { ShortCuts } from "./ShortCuts";
export const ChatDialog = (): JSX.Element => {
const { history } = useChatContext();
const shouldDisplayShortcuts =
useFeature("new-ux").on && history.length === 0;
if (!shouldDisplayShortcuts) {
return <ChatMessages />;
}
return <ShortCuts />;
};