Skip to content

Commit 4c299e1

Browse files
authored
Merge pull request #4870 from continuedev/pe/generating-text-lump
feat: add animated ellipsis to lump
2 parents 16cee95 + a30bbd3 commit 4c299e1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

gui/src/components/mainInput/Lump/LumpToolbar.tsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useContext } from "react";
22
import styled from "styled-components";
3+
import { AnimatedEllipsis } from "../..";
34
import { IdeMessengerContext } from "../../../context/IdeMessenger";
45
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
56
import { cancelStream } from "../../../redux/thunks/cancelStream";
@@ -8,7 +9,8 @@ import { BlockSettingsTopToolbar } from "./BlockSettingsTopToolbar";
89

910
const Container = styled.div`
1011
display: flex;
11-
justify-content: flex-end;
12+
justify-content: space-between;
13+
align-items: center;
1214
width: 100%;
1315
`;
1416

@@ -24,6 +26,15 @@ interface TopToolbarProps {
2426
setSelectedSection: (value: string | null) => void;
2527
}
2628

29+
function GeneratingIndicator() {
30+
return (
31+
<div className="text-xs text-gray-400">
32+
<span>Generating</span>
33+
<AnimatedEllipsis />
34+
</div>
35+
);
36+
}
37+
2738
export function LumpToolbar(props: TopToolbarProps) {
2839
const dispatch = useAppDispatch();
2940
const ideMessenger = useContext(IdeMessengerContext);
@@ -33,6 +44,7 @@ export function LumpToolbar(props: TopToolbarProps) {
3344
if (ttsActive) {
3445
return (
3546
<Container>
47+
<GeneratingIndicator />
3648
<StopButton
3749
className="text-gray-400"
3850
onClick={() => {
@@ -48,6 +60,7 @@ export function LumpToolbar(props: TopToolbarProps) {
4860
if (isStreaming) {
4961
return (
5062
<Container>
63+
<GeneratingIndicator />
5164
<StopButton
5265
className="text-gray-400"
5366
onClick={() => {

0 commit comments

Comments
 (0)