From 29de7e15c295ae61a7f7cedaf08d04647fdcedfe Mon Sep 17 00:00:00 2001
From: Haze <709547807@qq.com>
Date: Wed, 27 May 2026 14:38:45 +0800
Subject: [PATCH] feat(chat): optimize chat and light model (#1074)
---
.../file-preview/MarkdownPreview.tsx | 2 +-
src/components/layout/TitleBar.tsx | 4 +-
src/components/ui/button.tsx | 4 +-
src/pages/Chat/ChatInput.tsx | 6 +-
src/pages/Chat/ChatMessage.tsx | 31 +++--
src/pages/Chat/ChatToolbar.tsx | 12 +-
src/pages/Chat/index.tsx | 7 +-
tests/e2e/chat-code-block-wrap.spec.ts | 130 ++++++++++++++++++
tests/unit/chat-message.test.tsx | 16 +++
9 files changed, 188 insertions(+), 24 deletions(-)
create mode 100644 tests/e2e/chat-code-block-wrap.spec.ts
diff --git a/src/components/file-preview/MarkdownPreview.tsx b/src/components/file-preview/MarkdownPreview.tsx
index 41a9906..c136d1a 100644
--- a/src/components/file-preview/MarkdownPreview.tsx
+++ b/src/components/file-preview/MarkdownPreview.tsx
@@ -108,7 +108,7 @@ export default function MarkdownPreview({ source, className }: MarkdownPreviewPr
);
},
pre: ({ children }) => (
-
+
{children}
),
diff --git a/src/components/layout/TitleBar.tsx b/src/components/layout/TitleBar.tsx
index 555f344..c1ae5b0 100644
--- a/src/components/layout/TitleBar.tsx
+++ b/src/components/layout/TitleBar.tsx
@@ -60,14 +60,14 @@ function WindowsTitleBar() {