Merge pull request #7 from heimoshuiyu/react-18
Some checks failed
Build static content / build (push) Failing after 19s
Some checks failed
Build static content / build (push) Failing after 19s
downgrade react 18, fix markdown, fix #6
This commit is contained in:
2364
package-lock.json
generated
2364
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,8 +38,8 @@
|
||||
"@radix-ui/react-toggle": "^1.1.1",
|
||||
"@radix-ui/react-toggle-group": "^1.1.1",
|
||||
"@radix-ui/react-tooltip": "^1.1.6",
|
||||
"@types/react": "^19.0.2",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@types/ungap__structured-clone": "^1.2.0",
|
||||
"@ungap/structured-clone": "^1.2.1",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
@@ -51,9 +51,9 @@
|
||||
"input-otp": "^1.4.1",
|
||||
"lucide-react": "^0.469.0",
|
||||
"next-themes": "^0.4.4",
|
||||
"react": "^19.0.0",
|
||||
"react": "^18.0.0",
|
||||
"react-day-picker": "9.4.4",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-hook-form": "^7.54.2",
|
||||
"react-markdown": "^9.0.1",
|
||||
"react-resizable-panels": "^2.1.7",
|
||||
|
||||
@@ -155,9 +155,7 @@ export default function Message(props: { messageIndex: number }) {
|
||||
) : chat.role === "tool" ? (
|
||||
<MessageToolResp chat={chat} copyToClipboard={copyToClipboard} />
|
||||
) : renderMarkdown ? (
|
||||
// [TODO] It is happening https://github.com/remarkjs/react-markdown/pull/879
|
||||
// <Markdown>{getMessageText(chat)}</Markdown>
|
||||
<></>
|
||||
<Markdown>{getMessageText(chat)}</Markdown>
|
||||
) : (
|
||||
<div className="message-content">
|
||||
{chat.content &&
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ChatStoreMessage } from "@/types/chatstore";
|
||||
import Markdown from "react-markdown";
|
||||
|
||||
interface Props {
|
||||
chat: ChatStoreMessage;
|
||||
@@ -15,8 +16,7 @@ export function MessageDetail({ chat, renderMarkdown }: Props) {
|
||||
chat.hide ? (
|
||||
mdt.text?.split("\n")[0].slice(0, 16) + " ..."
|
||||
) : renderMarkdown ? (
|
||||
// @ts-ignore
|
||||
<Markdown markdown={mdt.text} />
|
||||
<Markdown>{mdt.text}</Markdown>
|
||||
) : (
|
||||
mdt.text
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user