使用openai进行了代码review

This commit is contained in:
2026-02-24 11:33:08 +08:00
parent 9efdf060f5
commit 0c97f02e51
32 changed files with 1499 additions and 969 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import { cn } from "@/lib/utils";
import { useSettingsStore } from "@/lib/settings-store";
import { Editor } from "@tiptap/react";
import { marked } from "marked";
import { sanitizeHtml } from "@/lib/sanitize-html";
interface Message {
id: string;
@@ -189,7 +190,7 @@ export function AIChatPanel({ editor, isOpen, onClose }: AIChatPanelProps) {
{msg.role === "assistant" ? (
<div
className="prose dark:prose-invert prose-sm max-w-none break-words [&>p]:mb-2 [&>ul]:list-disc [&>ul]:pl-4 [&>ol]:list-decimal [&>ol]:pl-4"
dangerouslySetInnerHTML={{ __html: marked.parse(msg.content) as string }}
dangerouslySetInnerHTML={{ __html: sanitizeHtml(marked.parse(msg.content) as string) }}
/>
) : (
<p className="whitespace-pre-wrap">{msg.content}</p>