From 905d756a25363a62d09f3315ef491969933d146f Mon Sep 17 00:00:00 2001 From: grigo Date: Wed, 10 Jun 2026 13:40:14 +0300 Subject: [PATCH] fixed reasoning --- frontend/src/pages/Chat.css | 51 +++++++++++++++++++++++++++++++++++++ frontend/src/pages/Chat.tsx | 19 +++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Chat.css b/frontend/src/pages/Chat.css index d586d7a..c7d8e39 100644 --- a/frontend/src/pages/Chat.css +++ b/frontend/src/pages/Chat.css @@ -99,6 +99,57 @@ border: 1px solid #2a3142; } +.message-pending { + opacity: 0.92; +} + +.message-pending-content { + display: flex; + align-items: center; + gap: 0.65rem; + color: #9aa5b8; +} + +.typing-indicator { + display: inline-flex; + align-items: center; + gap: 0.28rem; +} + +.typing-indicator span { + width: 0.45rem; + height: 0.45rem; + border-radius: 50%; + background: #6b7cff; + animation: typing-bounce 1.2s ease-in-out infinite; +} + +.typing-indicator span:nth-child(2) { + animation-delay: 0.15s; +} + +.typing-indicator span:nth-child(3) { + animation-delay: 0.3s; +} + +.typing-label { + font-size: 0.92rem; +} + +@keyframes typing-bounce { + 0%, + 60%, + 100% { + transform: translateY(0); + opacity: 0.45; + } + + 30% { + transform: translateY(-0.35rem); + opacity: 1; + } +} + .message-notice { align-self: center; max-width: 90%; diff --git a/frontend/src/pages/Chat.tsx b/frontend/src/pages/Chat.tsx index 69f9708..c4c9ead 100644 --- a/frontend/src/pages/Chat.tsx +++ b/frontend/src/pages/Chat.tsx @@ -67,7 +67,10 @@ export default function Chat() { useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: "smooth" }); - }, [messages, streaming, liveNotices]); + }, [messages, streaming, liveNotices, loading]); + + const waitingForStream = loading && !streaming; + const pendingLabel = liveNotices.length > 0 ? "Обрабатываю…" : "Думаю…"; useEffect(() => { const seq = pomodoroStatus?.cycle?.chat_notify_seq ?? 0; @@ -201,6 +204,20 @@ export default function Chat() { ))} + {waitingForStream && ( +
+
assistant
+
+
+
+ )} + {streaming && (
assistant