mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-20 01:21:50 +03:00
80be40ad34
* 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
20 lines
467 B
TypeScript
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 />;
|
|
};
|