From d8386366d9b5b6fed748adba0715b55c74e91327 Mon Sep 17 00:00:00 2001 From: "sp.wack" <83104063+amanape@users.noreply.github.com> Date: Sat, 27 Apr 2024 15:21:29 +0300 Subject: [PATCH] feature(frontend): improve chat overflow handling and syntax highlighting (#1402) * improve overflow handling and syntax highlighting * add reference to gh page --- frontend/src/components/ChatInterface.tsx | 7 +++--- frontend/src/components/markdown/code.tsx | 28 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 frontend/src/components/markdown/code.tsx diff --git a/frontend/src/components/ChatInterface.tsx b/frontend/src/components/ChatInterface.tsx index e242270a29..e113244f5c 100644 --- a/frontend/src/components/ChatInterface.tsx +++ b/frontend/src/components/ChatInterface.tsx @@ -12,6 +12,7 @@ import { import { Message } from "#/state/chatSlice"; import { RootState } from "#/store"; import ChatInput from "./ChatInput"; +import { code } from "./markdown/code"; interface IChatBubbleProps { msg: Message; @@ -57,10 +58,10 @@ function ChatBubble({ msg }: IChatBubbleProps): JSX.Element { className={`flex mb-0 min-w-0 ${msg?.sender === "user" && "flex-row-reverse ml-auto"}`} >
{children};
+ }
+
+ return (
+