fixed reasoning
This commit is contained in:
@@ -99,6 +99,57 @@
|
|||||||
border: 1px solid #2a3142;
|
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 {
|
.message-notice {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ export default function Chat() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
bottomRef.current?.scrollIntoView({ behavior: "smooth" });
|
bottomRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||||
}, [messages, streaming, liveNotices]);
|
}, [messages, streaming, liveNotices, loading]);
|
||||||
|
|
||||||
|
const waitingForStream = loading && !streaming;
|
||||||
|
const pendingLabel = liveNotices.length > 0 ? "Обрабатываю…" : "Думаю…";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const seq = pomodoroStatus?.cycle?.chat_notify_seq ?? 0;
|
const seq = pomodoroStatus?.cycle?.chat_notify_seq ?? 0;
|
||||||
@@ -201,6 +204,20 @@ export default function Chat() {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
{waitingForStream && (
|
||||||
|
<div className="message message-assistant message-pending" aria-live="polite">
|
||||||
|
<div className="message-role">assistant</div>
|
||||||
|
<div className="message-content message-pending-content">
|
||||||
|
<span className="typing-indicator" aria-hidden="true">
|
||||||
|
<span />
|
||||||
|
<span />
|
||||||
|
<span />
|
||||||
|
</span>
|
||||||
|
<span className="typing-label">{pendingLabel}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{streaming && (
|
{streaming && (
|
||||||
<div className="message message-assistant">
|
<div className="message message-assistant">
|
||||||
<div className="message-role">assistant</div>
|
<div className="message-role">assistant</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user