Added thinking message to assistant message
This commit is contained in:
parent
173df0be99
commit
1f4743ceab
2 changed files with 22 additions and 2 deletions
|
|
@ -83,8 +83,10 @@ export function AssistantMessage({
|
||||||
)}
|
)}
|
||||||
chatMessage={
|
chatMessage={
|
||||||
isStreaming
|
isStreaming
|
||||||
? content +
|
? (content.trim()
|
||||||
' <span class="inline-block w-1 h-4 bg-primary ml-1 animate-pulse"></span>'
|
? content +
|
||||||
|
' <span class="inline-block w-1 h-4 bg-primary ml-1 animate-pulse"></span>'
|
||||||
|
: '<span class="text-muted-foreground italic">Thinking<span class="thinking-dots"></span></span>')
|
||||||
: content
|
: content
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -365,4 +365,22 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thinking-dots::after {
|
||||||
|
content: ".";
|
||||||
|
animation: thinking-dots 1.4s steps(3, end) infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes thinking-dots {
|
||||||
|
0% {
|
||||||
|
content: ".";
|
||||||
|
}
|
||||||
|
33.33% {
|
||||||
|
content: "..";
|
||||||
|
}
|
||||||
|
66.66%,
|
||||||
|
100% {
|
||||||
|
content: "...";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue