From 807ad666c24b3ca812ae4d14e7cc25eb1e675b5f Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Mon, 31 Jul 2023 19:21:38 -0400 Subject: [PATCH] Add attribution to Mckay Wrigley --- components/chat-message.tsx | 7 +++++-- components/ui/codeblock.tsx | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/chat-message.tsx b/components/chat-message.tsx index 75f6e6f..df5b5fd 100644 --- a/components/chat-message.tsx +++ b/components/chat-message.tsx @@ -1,3 +1,6 @@ +// Inspired by Chatbot-UI and modified to fit the needs of this project +// @see https://github.com/mckaywrigley/chatbot-ui/blob/main/components/Chat/ChatMessage.tsx + import { Message } from 'ai' import remarkGfm from 'remark-gfm' import remarkMath from 'remark-math' @@ -28,7 +31,7 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) { > {message.role === 'user' ? : } -
+
▍ + ) } diff --git a/components/ui/codeblock.tsx b/components/ui/codeblock.tsx index aabda4e..ccbf82d 100644 --- a/components/ui/codeblock.tsx +++ b/components/ui/codeblock.tsx @@ -1,3 +1,6 @@ +// Inspired by Chatbot-UI and modified to fit the needs of this project +// @see https://github.com/mckaywrigley/chatbot-ui/blob/main/components/Markdown/CodeBlock.tsx + 'use client' import { FC, memo } from 'react' @@ -90,8 +93,8 @@ const CodeBlock: FC = memo(({ language, value }) => { } return ( -
-
+
+
{language}