diff --git a/src/web/consoles/workbench/components/chat/ChatPanel.tsx b/src/web/consoles/workbench/components/chat/ChatPanel.tsx
index a90fab6..5bbf264 100644
--- a/src/web/consoles/workbench/components/chat/ChatPanel.tsx
+++ b/src/web/consoles/workbench/components/chat/ChatPanel.tsx
@@ -1,6 +1,6 @@
import { useChat } from "@ai-sdk/react";
import { DefaultChatTransport, type UIMessage } from "ai";
-import { App, Avatar, Button, Card, Collapse, Divider, Empty, Flex, Input, Spin, Typography } from "antd";
+import { App, Button, Card, Collapse, Empty, Flex, Input, Spin, Typography } from "antd";
import { useCallback, useEffect, useRef, useState } from "react";
import { Streamdown } from "streamdown";
@@ -98,15 +98,11 @@ export function ChatPanel({ conversationId, projectId }: ChatPanelProps) {
{messages.map((msg) => (
-
-
- {msg.role === "user" ? "你" : "AI"}
-
- }
- title={msg.role === "user" ? "你" : "Alfred"}
- />
+ 阿福}
+ >
{msg.parts.map((part: Record
, i: number) => (
@@ -183,8 +179,5 @@ function PartRenderer({ part, role }: { part: Record; role: str
/>
);
}
- if (partType === "step-start") {
- return ;
- }
return null;
}
diff --git a/src/web/styles.css b/src/web/styles.css
index 073420f..1940a61 100644
--- a/src/web/styles.css
+++ b/src/web/styles.css
@@ -4,7 +4,8 @@ body {
}
.app-layout {
- min-height: 100vh;
+ height: 100vh;
+ overflow: hidden;
}
.app-header {
@@ -50,11 +51,13 @@ body {
}
.app-content {
+ overflow: auto;
padding: var(--ant-padding-xl) var(--ant-padding-xl);
}
.app-chat-page {
height: 100%;
+ overflow: hidden;
}
.app-console-title {
@@ -92,6 +95,7 @@ body {
.app-chat-sidebar-list {
flex: 1;
+ min-height: 0;
overflow: auto;
}
@@ -135,6 +139,7 @@ body {
display: flex;
flex: 1;
flex-direction: column;
+ min-height: 0;
min-width: 0;
}
@@ -151,18 +156,11 @@ body {
}
.chat-input-area {
+ flex-shrink: 0;
padding: 8px 16px;
border-top: 1px solid var(--ant-color-border-secondary);
}
-.msg-user .ant-card-body {
- background: var(--ant-color-bg-text-hover);
-}
-
-.msg-ai .ant-card-body {
- background: var(--ant-color-bg-container);
-}
-
.message-body {
margin-top: 8px;
}
@@ -177,6 +175,7 @@ body {
.chat-scroll-area {
flex: 1;
+ min-height: 0;
overflow: auto;
padding: 16px;
}
@@ -202,6 +201,6 @@ body {
margin: 0;
}
-.avatar-ai {
- background-color: var(--ant-color-primary);
+.msg-title-ai {
+ color: var(--ant-color-primary);
}