From 7a46794f1dfec6cbfe75029d37ba748c24501ab4 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 21 Jun 2023 14:04:35 -0300 Subject: [PATCH] Update radial progress & fix build trigger log handling - The radial progress now displays the percentage value correctly. - In the build trigger, we now properly handle the end of a stream event and fixed an issue with the RadialProgressComponent when isBuilding is true. --- src/frontend/src/components/RadialProgress/index.tsx | 2 +- .../src/components/chatComponent/buildTrigger/index.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/RadialProgress/index.tsx b/src/frontend/src/components/RadialProgress/index.tsx index c900042fa..c9bd8d52c 100644 --- a/src/frontend/src/components/RadialProgress/index.tsx +++ b/src/frontend/src/components/RadialProgress/index.tsx @@ -6,7 +6,7 @@ export default function RadialProgressComponent({ color, }: RadialProgressType) { const style = { - "--value": value, + "--value": value * 100, "--size": "1.5rem", "--thickness": "2px", } as React.CSSProperties; diff --git a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx index 8f7df7ac7..dd05528aa 100644 --- a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx +++ b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx @@ -83,6 +83,7 @@ export default function BuildTrigger({ // if the event is the end of the stream, close the connection if (parsedData.end_of_stream) { eventSource.close(); + return; } else if (parsedData.log) { // If the event is a log, log it @@ -162,7 +163,7 @@ export default function BuildTrigger({ >