Skip to content

Commit 0399bbd

Browse files
authored
feat(markdown-stream): Adds a subtle animation when waiting for tool call response (#1860)
1 parent ab2a338 commit 0399bbd

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

js/markdown-stream/markdown-stream.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,26 @@ pre:has(.code-copy-button) {
4949
background-color: var(--bs-success, #198754);
5050
}
5151
}
52+
53+
@keyframes markdown-stream-dot-pulse {
54+
0% {
55+
transform: scale(1);
56+
opacity: 1;
57+
}
58+
50% {
59+
transform: scale(0.4);
60+
opacity: 0.4;
61+
}
62+
100% {
63+
transform: scale(1);
64+
opacity: 1;
65+
}
66+
}
67+
68+
.markdown-stream-dot {
69+
// The stream dot is appended with each streaming chunk update, so the pulse animation
70+
// only shows up when streaming pauses but isn't complete.
71+
animation: markdown-stream-dot-pulse 2s infinite cubic-bezier(0.18, 0.89, 0.32, 1.28);
72+
display: inline-block;
73+
transform-origin: center;
74+
}

shiny/www/py-shiny/markdown-stream/markdown-stream.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)