Skip to content

Commit

Permalink
disabling markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-Agnihotri committed Dec 19, 2024
1 parent a0396f3 commit 23ca939
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/app/components/ChatMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Image from 'next/image';
import copyTextToClipboard from '@/app/utils/chatUtils';
import { Message } from '@/types/chat';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { materialDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
// import ReactMarkdown from 'react-markdown';
// import remarkGfm from 'remark-gfm';
// import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
// import { materialDark } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { useAuth } from '@/contexts/AuthContext';
import { useState } from 'react';

Expand Down Expand Up @@ -74,7 +74,7 @@ export default function ChatMessage({ message }: ChatMessageProps) {
</svg>
)}
</div>
<ReactMarkdown
{/* <ReactMarkdown
remarkPlugins={[remarkGfm]}
components={{
code({
Expand Down Expand Up @@ -104,9 +104,9 @@ export default function ChatMessage({ message }: ChatMessageProps) {
);
},
}}
>
> */}
{message.content}
</ReactMarkdown>
{/* </ReactMarkdown> */}
</div>
</div>
);
Expand Down
6 changes: 1 addition & 5 deletions src/app/utils/requestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async function createClonedRequest(request: NextRequest) {
headers: (() => {
const headers = new Headers();
request.headers.forEach((value, key) => {
if (['authorization', 'origin', 'referer'].includes(key.toLowerCase())) {
if (['authorization', 'origin', 'referer', 'host'].includes(key.toLowerCase())) {
return;
}
headers.append(key, value);
Expand Down Expand Up @@ -61,10 +61,6 @@ export async function cloneRequest(request: NextRequest, url: string) {
status: clonedResponse.status,
});
} catch (error) {
console.log('Error:', error);
console.log((error as Error).message);
console.log((error as Error).name);
console.log((error as Error).cause);
return NextResponse.json({ error: error }, { status: 500 });
}
}

0 comments on commit 23ca939

Please sign in to comment.