mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-27 12:54:09 +01:00
chore: preprocess artifacts for now
This commit is contained in:
parent
37002edbba
commit
efbed07569
1 changed files with 3 additions and 1 deletions
|
|
@ -9,10 +9,11 @@ import rehypeHighlight from 'rehype-highlight';
|
||||||
import remarkDirective from 'remark-directive';
|
import remarkDirective from 'remark-directive';
|
||||||
import type { PluggableList, Pluggable } from 'unified';
|
import type { PluggableList, Pluggable } from 'unified';
|
||||||
import type { Pluggable } from 'unified';
|
import type { Pluggable } from 'unified';
|
||||||
import { langSubset, preprocessLaTeX, handleDoubleClick } from '~/utils';
|
|
||||||
import { CodeBlockArtifact, CodeMarkdown } from '~/components/Artifacts/Code';
|
import { CodeBlockArtifact, CodeMarkdown } from '~/components/Artifacts/Code';
|
||||||
import { Artifact, artifactPlugin } from '~/components/Artifacts/Artifact';
|
import { Artifact, artifactPlugin } from '~/components/Artifacts/Artifact';
|
||||||
|
import { langSubset, preprocessLaTeX, handleDoubleClick } from '~/utils';
|
||||||
import CodeBlock from '~/components/Messages/Content/CodeBlock';
|
import CodeBlock from '~/components/Messages/Content/CodeBlock';
|
||||||
|
import { preprocessCodeArtifacts } from '~/utils/artifacts';
|
||||||
import { useFileDownload } from '~/data-provider';
|
import { useFileDownload } from '~/data-provider';
|
||||||
import useLocalize from '~/hooks/useLocalize';
|
import useLocalize from '~/hooks/useLocalize';
|
||||||
import { useToastContext } from '~/Providers';
|
import { useToastContext } from '~/Providers';
|
||||||
|
|
@ -133,6 +134,7 @@ const Markdown = memo(({ content = '', showCursor, isLatestMessage }: TContentPr
|
||||||
if (!isInitializing) {
|
if (!isInitializing) {
|
||||||
currentContent = currentContent.replace('z-index: 1;', '') || '';
|
currentContent = currentContent.replace('z-index: 1;', '') || '';
|
||||||
currentContent = LaTeXParsing ? preprocessLaTeX(currentContent) : currentContent;
|
currentContent = LaTeXParsing ? preprocessLaTeX(currentContent) : currentContent;
|
||||||
|
currentContent = codeArtifacts ? preprocessCodeArtifacts(currentContent) : currentContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rehypePlugins = [
|
const rehypePlugins = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue