diff --git a/package.json b/package.json index 4c6caf9..d0ef77d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "remark-breaks": "^4.0.0", "remark-gfm": "^4.0.0", "remark-math": "^6.0.0", - "remark-parse": "^11.0.0", "reveal.js": "^5.1.0", "solid-js": "^1.9.1", "solid-markdown": "^2.0.13", @@ -35,8 +34,7 @@ "solidjs-use": "^2.3.0", "svelte": "^4.2.19", "svelte-sonner": "^0.3.28", - "tiktoken": "^1.0.16", - "unified": "^11.0.5" + "tiktoken": "^1.0.16" }, "devDependencies": { "@evan-yang/eslint-config": "^1.0.9", @@ -59,5 +57,10 @@ "svelte-ripple-action": "^1.0.6", "unocss": "^0.63.1", "unocss-preset-scrollbar": "^0.3.1" + }, + "overrides": { + "remark-gfm": "^4.0.0", + "remark-parse": "^11.0.0", + "unified": "^11.0.5" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfeb2c2..1b3fb2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,9 +59,6 @@ importers: remark-math: specifier: ^6.0.0 version: 6.0.0 - remark-parse: - specifier: ^11.0.0 - version: 11.0.0 reveal.js: specifier: ^5.1.0 version: 5.1.0 @@ -86,9 +83,6 @@ importers: tiktoken: specifier: ^1.0.16 version: 1.0.16 - unified: - specifier: ^11.0.5 - version: 11.0.5 devDependencies: '@evan-yang/eslint-config': specifier: ^1.0.9 diff --git a/src/components/MessageItem.tsx b/src/components/MessageItem.tsx index de72070..eb9bcb5 100644 --- a/src/components/MessageItem.tsx +++ b/src/components/MessageItem.tsx @@ -4,8 +4,6 @@ import rehypeKatex from 'rehype-katex' import rehypeHighlight from 'rehype-highlight' import { SolidMarkdown } from 'solid-markdown' import remarkBreaks from 'remark-breaks' -import { unified } from 'unified' -import remarkParse from 'remark-parse' import IconRefresh from './icons/Refresh' import CodeBlock from './CodeBlock' import type { Accessor } from 'solid-js' @@ -36,8 +34,6 @@ export default ({ role, message, showRetry, onRetry }: Props) => { : markdown } - unified().use(remarkParse) // a weird workaround to fix a strange bug in solid-markdown that "setting on undefined" error - return (