Skip to content

feat: add animated ellipsis to lump #4870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion gui/src/components/mainInput/Lump/LumpToolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useContext } from "react";
import styled from "styled-components";
import { AnimatedEllipsis } from "../..";
import { IdeMessengerContext } from "../../../context/IdeMessenger";
import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
import { cancelStream } from "../../../redux/thunks/cancelStream";
Expand All @@ -8,7 +9,8 @@ import { BlockSettingsTopToolbar } from "./BlockSettingsTopToolbar";

const Container = styled.div`
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
width: 100%;
`;

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

function GeneratingIndicator() {
return (
<div className="text-xs text-gray-400">
<span>Generating</span>
<AnimatedEllipsis />
</div>
);
}

export function LumpToolbar(props: TopToolbarProps) {
const dispatch = useAppDispatch();
const ideMessenger = useContext(IdeMessengerContext);
Expand All @@ -33,6 +44,7 @@ export function LumpToolbar(props: TopToolbarProps) {
if (ttsActive) {
return (
<Container>
<GeneratingIndicator />
<StopButton
className="text-gray-400"
onClick={() => {
Expand All @@ -48,6 +60,7 @@ export function LumpToolbar(props: TopToolbarProps) {
if (isStreaming) {
return (
<Container>
<GeneratingIndicator />
<StopButton
className="text-gray-400"
onClick={() => {
Expand Down
Loading