Refactor AI chat: streaming, tool calls, UI polish
All checks were successful
CI / check (pull_request) Successful in 3m25s

This commit is contained in:
2026-07-24 16:27:50 +08:00
parent e605586fc9
commit 8656394b9b
55 changed files with 2774 additions and 460 deletions

View File

@@ -9,6 +9,7 @@
}
.ai-chat-layout {
position: relative;
display: flex;
height: 100%;
min-height: 0;
@@ -38,6 +39,10 @@
overflow-y: auto;
}
.ai-chat-sidebar .ant-conversations-creation {
margin-bottom: 8px;
}
.ai-chat-sidebar__loading {
position: absolute;
inset: 68px 0 auto;
@@ -62,10 +67,22 @@
}
.ai-chat-toolbar .ant-typography {
flex: 1 1 auto;
min-width: 0;
font-weight: 600;
}
.ai-chat-welcome {
display: grid;
width: min(720px, 100%);
gap: 20px;
padding: 32px;
}
.ai-chat-welcome .ant-welcome-icon {
color: #007aff;
}
.ai-chat-messages {
display: flex;
flex: 1 1 auto;
@@ -91,6 +108,10 @@
white-space: pre-wrap;
}
.ai-chat-user-content {
max-width: 100%;
}
.ai-chat-answer {
width: 100%;
min-width: 0;
@@ -108,33 +129,11 @@
overflow-x: auto;
}
.ai-chat-tools {
display: grid;
gap: 6px;
padding: 8px 10px;
background: #f7f7f8;
border: 1px solid #ededf0;
border-radius: 8px;
}
.ai-chat-tool {
display: flex;
align-items: flex-start;
gap: 6px;
min-width: 0;
}
.ai-chat-tool .ant-tag {
flex: 0 0 auto;
margin: 0;
}
.ai-chat-tool__summary {
min-width: 0;
overflow: hidden;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
.ai-chat-answer .ant-thought-chain {
padding: 10px 12px;
background: #f7f8fa;
border: 1px solid #eceef2;
border-radius: 10px;
}
.ai-chat-composer {
@@ -144,6 +143,15 @@
border-top: 1px solid #ededf0;
}
.ai-chat-composer .ant-sender {
max-width: 820px;
margin: 0 auto;
}
.ai-chat-composer .ant-attachments {
max-width: 820px;
}
.ai-chat-composer .ant-sender-input:focus,
.ai-chat-composer .ant-sender-input:focus-visible,
.ai-chat-composer .ant-sender-input:focus-within {