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
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions extensions/vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 {
Expand All @@ -11,7 +12,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 @@ -27,6 +29,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 @@ -36,6 +47,7 @@ export function LumpToolbar(props: TopToolbarProps) {
if (ttsActive) {
return (
<Container>
<GeneratingIndicator />
<StopButton
className="text-gray-400"
onClick={() => {
Expand All @@ -51,6 +63,7 @@ export function LumpToolbar(props: TopToolbarProps) {
if (isStreaming) {
return (
<Container>
<GeneratingIndicator />
<StopButton
className="text-gray-400"
onClick={() => {
Expand Down
Loading