diff --git a/web-app/src/containers/RenderMarkdown.tsx b/web-app/src/containers/RenderMarkdown.tsx index 55a085f97..b8c211506 100644 --- a/web-app/src/containers/RenderMarkdown.tsx +++ b/web-app/src/containers/RenderMarkdown.tsx @@ -21,12 +21,14 @@ interface MarkdownProps { className?: string components?: Components enableRawHtml?: boolean + isUser?: boolean } function RenderMarkdownComponent({ content, enableRawHtml, className, + isUser, components, }: MarkdownProps) { const { codeBlockStyle, showLineNumbers } = useCodeblock() @@ -71,7 +73,7 @@ function RenderMarkdownComponent({ const shouldVirtualize = code.split('\n').length > 300 - return !isInline ? ( + return !isInline && !isUser ? (
@@ -135,9 +137,7 @@ function RenderMarkdownComponent({
) : ( - - {children} - + {children} ) }, }), diff --git a/web-app/src/containers/ThreadContent.tsx b/web-app/src/containers/ThreadContent.tsx index 198489aee..ac843e4f2 100644 --- a/web-app/src/containers/ThreadContent.tsx +++ b/web-app/src/containers/ThreadContent.tsx @@ -185,10 +185,14 @@ export const ThreadContent = memo( {item.content?.[0]?.text && item.role === 'user' && (
-
-
-
- {item.content?.[0].text.value} +
+
+
+
@@ -274,7 +278,6 @@ export const ThreadContent = memo(
diff --git a/web-app/src/styles/markdown.css b/web-app/src/styles/markdown.css index bca7c1452..80b85af7b 100644 --- a/web-app/src/styles/markdown.css +++ b/web-app/src/styles/markdown.css @@ -41,6 +41,10 @@ p { line-height: 1.6; margin-bottom: 1em; + + &:last-child { + margin-bottom: 0; + } } strong { @@ -103,17 +107,17 @@ /* Code */ code { font-family: monospace; - @apply bg-main-view-fg/10 text-main-view-fg; + @apply bg-main-view-fg/6 text-main-view-fg; padding: 0.2em 0.4em; border-radius: 3px; } pre { font-family: monospace; - @apply bg-main-view-fg/10 text-main-view-fg; + @apply bg-main-view-fg/6 text-main-view-fg; overflow-x: auto; border-radius: 8px; - margin-bottom: 1em; + margin-bottom: 8px; } pre code {