mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
tweak cursor to appear at the end of the same line of the streaming response
This commit is contained in:
parent
a46d0a4c68
commit
cfa5354c50
@ -153,7 +153,13 @@ export function MessageBubble({
|
|||||||
<div className="whitespace-pre-wrap">{displayContent}</div>
|
<div className="whitespace-pre-wrap">{displayContent}</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<div
|
||||||
|
className={cn(
|
||||||
|
"[&>*:last-child]:inline",
|
||||||
|
!isComplete &&
|
||||||
|
"after:ml-0.5 after:inline-block after:h-4 after:w-2 after:animate-cursor-blink after:rounded-sm after:bg-foreground after:align-middle after:content-['']",
|
||||||
|
)}
|
||||||
|
>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
remarkPlugins={[remarkGfm]}
|
remarkPlugins={[remarkGfm]}
|
||||||
components={{
|
components={{
|
||||||
@ -179,10 +185,7 @@ export function MessageBubble({
|
|||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</ReactMarkdown>
|
</ReactMarkdown>
|
||||||
{!isComplete && (
|
</div>
|
||||||
<span className="ml-1 inline-block h-4 w-0.5 animate-pulse bg-foreground align-middle" />
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-0.5">
|
<div className="flex items-center gap-0.5">
|
||||||
|
|||||||
@ -49,6 +49,7 @@ module.exports = {
|
|||||||
scale4: "scale4 3s ease-in-out infinite",
|
scale4: "scale4 3s ease-in-out infinite",
|
||||||
"timeline-zoom-in": "timeline-zoom-in 0.3s ease-out",
|
"timeline-zoom-in": "timeline-zoom-in 0.3s ease-out",
|
||||||
"timeline-zoom-out": "timeline-zoom-out 0.3s ease-out",
|
"timeline-zoom-out": "timeline-zoom-out 0.3s ease-out",
|
||||||
|
"cursor-blink": "cursor-blink 1s step-end infinite",
|
||||||
},
|
},
|
||||||
aspectRatio: {
|
aspectRatio: {
|
||||||
wide: "32 / 9",
|
wide: "32 / 9",
|
||||||
@ -189,6 +190,10 @@ module.exports = {
|
|||||||
"50%": { transform: "translateY(0%)", opacity: "0.5" },
|
"50%": { transform: "translateY(0%)", opacity: "0.5" },
|
||||||
"100%": { transform: "translateY(0)", opacity: "1" },
|
"100%": { transform: "translateY(0)", opacity: "1" },
|
||||||
},
|
},
|
||||||
|
"cursor-blink": {
|
||||||
|
"0%, 100%": { opacity: "1" },
|
||||||
|
"50%": { opacity: "0" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
screens: {
|
screens: {
|
||||||
xs: "480px",
|
xs: "480px",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user