Skip to content

Commit

Permalink
chore: Consolidate on one markdown rendering component (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhancock authored Jan 29, 2025
1 parent 7e534a0 commit 1bfbb05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ui/desktop/src/components/GooseResponseForm.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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>
))}
Expand Down
6 changes: 2 additions & 4 deletions ui/desktop/src/components/ToolCallArguments.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import ReactMarkdown from 'react-markdown';
import MarkdownContent from './MarkdownContent';

interface ToolCallArgumentsProps {
args: Record<string, any>;
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 1bfbb05

Please sign in to comment.