chore: Consolidate on one markdown rendering component (#842)

This commit is contained in:
Alex Hancock
2025-01-29 12:22:10 -05:00
committed by GitHub
parent 7e534a0b97
commit 1bfbb059fe
2 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from 'react';
import ReactMarkdown from 'react-markdown';
import MarkdownContent from './MarkdownContent';
import { Button } from './ui/button';
import { cn } from '../utils';
import { Send } from './icons';
@@ -177,7 +177,7 @@ export default function GooseResponseForm({
>
<h3 className="font-semibold text-lg mb-2 dark:text-gray-100">{opt.optionTitle}</h3>
<div className="prose prose-xs max-w-none dark:text-gray-100">
<ReactMarkdown>{opt.optionDescription}</ReactMarkdown>
<MarkdownContent content={opt.optionDescription} />
</div>
</div>
))}

View File

@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import ReactMarkdown from 'react-markdown';
import MarkdownContent from './MarkdownContent';
interface ToolCallArgumentsProps {
args: Record<string, any>;
@@ -44,9 +44,7 @@ export function ToolCallArguments({ args }: ToolCallArgumentsProps) {
</div>
{isExpanded && (
<div className="mt-2 ml-4">
<ReactMarkdown className="whitespace-pre-wrap break-words prose-pre:whitespace-pre-wrap prose-pre:break-words text-gray-600 dark:text-white">
{value}
</ReactMarkdown>
<MarkdownContent content={value} />
</div>
)}
</div>