1
1
import { useContext } from "react" ;
2
2
import styled from "styled-components" ;
3
+ import { AnimatedEllipsis } from "../.." ;
3
4
import { IdeMessengerContext } from "../../../context/IdeMessenger" ;
4
5
import { useAppDispatch , useAppSelector } from "../../../redux/hooks" ;
5
6
import { cancelStream } from "../../../redux/thunks/cancelStream" ;
@@ -8,7 +9,8 @@ import { BlockSettingsTopToolbar } from "./BlockSettingsTopToolbar";
8
9
9
10
const Container = styled . div `
10
11
display: flex;
11
- justify-content: flex-end;
12
+ justify-content: space-between;
13
+ align-items: center;
12
14
width: 100%;
13
15
` ;
14
16
@@ -24,6 +26,15 @@ interface TopToolbarProps {
24
26
setSelectedSection : ( value : string | null ) => void ;
25
27
}
26
28
29
+ function GeneratingIndicator ( ) {
30
+ return (
31
+ < div className = "text-xs text-gray-400" >
32
+ < span > Generating</ span >
33
+ < AnimatedEllipsis />
34
+ </ div >
35
+ ) ;
36
+ }
37
+
27
38
export function LumpToolbar ( props : TopToolbarProps ) {
28
39
const dispatch = useAppDispatch ( ) ;
29
40
const ideMessenger = useContext ( IdeMessengerContext ) ;
@@ -33,6 +44,7 @@ export function LumpToolbar(props: TopToolbarProps) {
33
44
if ( ttsActive ) {
34
45
return (
35
46
< Container >
47
+ < GeneratingIndicator />
36
48
< StopButton
37
49
className = "text-gray-400"
38
50
onClick = { ( ) => {
@@ -48,6 +60,7 @@ export function LumpToolbar(props: TopToolbarProps) {
48
60
if ( isStreaming ) {
49
61
return (
50
62
< Container >
63
+ < GeneratingIndicator />
51
64
< StopButton
52
65
className = "text-gray-400"
53
66
onClick = { ( ) => {
0 commit comments