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 {
@@ -11,7 +12,8 @@ import { BlockSettingsTopToolbar } from "./BlockSettingsTopToolbar";
11
12
12
13
const Container = styled . div `
13
14
display: flex;
14
- justify-content: flex-end;
15
+ justify-content: space-between;
16
+ align-items: center;
15
17
width: 100%;
16
18
` ;
17
19
@@ -27,6 +29,15 @@ interface TopToolbarProps {
27
29
setSelectedSection : ( value : string | null ) => void ;
28
30
}
29
31
32
+ function GeneratingIndicator ( ) {
33
+ return (
34
+ < div className = "text-xs text-gray-400" >
35
+ < span > Generating</ span >
36
+ < AnimatedEllipsis />
37
+ </ div >
38
+ ) ;
39
+ }
40
+
30
41
export function LumpToolbar ( props : TopToolbarProps ) {
31
42
const dispatch = useAppDispatch ( ) ;
32
43
const ideMessenger = useContext ( IdeMessengerContext ) ;
@@ -36,6 +47,7 @@ export function LumpToolbar(props: TopToolbarProps) {
36
47
if ( ttsActive ) {
37
48
return (
38
49
< Container >
50
+ < GeneratingIndicator />
39
51
< StopButton
40
52
className = "text-gray-400"
41
53
onClick = { ( ) => {
@@ -51,6 +63,7 @@ export function LumpToolbar(props: TopToolbarProps) {
51
63
if ( isStreaming ) {
52
64
return (
53
65
< Container >
66
+ < GeneratingIndicator />
54
67
< StopButton
55
68
className = "text-gray-400"
56
69
onClick = { ( ) => {
0 commit comments