Skip to content

Commit e24a7cc

Browse files
authored
fix(ai-help): show stopped message once + restore search animation (#10632)
* fix(ai-help): show "Stopped answering" message only once * fix(ai-help): restore animation while sources are loading
1 parent f9756d1 commit e24a7cc

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

Diff for: client/src/plus/ai-help/index.scss

+4-15
Original file line numberDiff line numberDiff line change
@@ -475,21 +475,10 @@
475475
}
476476
}
477477

478-
&.status-stopped .ai-help-message-content {
479-
&.empty::after,
480-
> :not(ol):not(ul):not(pre):last-child:after,
481-
> ol:last-child li:last-child:after,
482-
> pre:last-child code:after,
483-
> ul:last-child li:last-child:after {
484-
color: var(--text-muted);
485-
content: "\00a0Stopped answering";
486-
display: block;
487-
margin-top: 1.7rem;
488-
}
489-
490-
&.empty::after {
491-
margin-left: unset;
492-
}
478+
.stopped-message {
479+
color: var(--text-muted);
480+
display: block;
481+
margin-top: 1.7rem;
493482
}
494483
}
495484

Diff for: client/src/plus/ai-help/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ function AIHelpAssistantResponse({
489489
>
490490
{isOffTopic ? SORRY_FRONTEND : message.content}
491491
</ReactMarkdown>
492+
{message.status === "stopped" && (
493+
<section className="stopped-message">
494+
{"■\u00a0Stopped answering"}
495+
</section>
496+
)}
492497
{(message.status === "complete" || isOffTopic) && (
493498
<>
494499
<section className="ai-help-feedback">
@@ -536,7 +541,7 @@ function AIHelpAssistantResponseSources({
536541
<div
537542
className={[
538543
"ai-help-message-progress",
539-
message.status !== MessageStatus.Pending && "complete",
544+
message.status === MessageStatus.Pending ? "active" : "complete",
540545
]
541546
.filter(Boolean)
542547
.join(" ")}

0 commit comments

Comments
 (0)