From 91ee02898a7d0fad1e5a6c72492a91a60515bed7 Mon Sep 17 00:00:00 2001
From: Jacob Richman <jacob314@gmail.com>
Date: Fri, 23 May 2025 10:25:17 -0700
Subject: feat: Modify loading indicator to support a paused state (#506)

---
 packages/cli/src/ui/components/LoadingIndicator.tsx | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

(limited to 'packages/cli/src/ui/components/LoadingIndicator.tsx')

diff --git a/packages/cli/src/ui/components/LoadingIndicator.tsx b/packages/cli/src/ui/components/LoadingIndicator.tsx
index 4f342c9d..b0c24f80 100644
--- a/packages/cli/src/ui/components/LoadingIndicator.tsx
+++ b/packages/cli/src/ui/components/LoadingIndicator.tsx
@@ -11,6 +11,7 @@ import { Colors } from '../colors.js';
 
 interface LoadingIndicatorProps {
   isLoading: boolean;
+  showSpinner: boolean;
   currentLoadingPhrase: string;
   elapsedTime: number;
   rightContent?: React.ReactNode;
@@ -18,21 +19,25 @@ interface LoadingIndicatorProps {
 
 export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
   isLoading,
+  showSpinner,
   currentLoadingPhrase,
   elapsedTime,
   rightContent,
 }) => {
   if (!isLoading) {
-    return null; // Don't render anything if not loading
+    return null;
   }
 
   return (
     <Box marginTop={1} paddingLeft={0}>
-      <Box marginRight={1}>
-        <Spinner type="dots" />
-      </Box>
+      {showSpinner && (
+        <Box marginRight={1}>
+          <Spinner type="dots" />
+        </Box>
+      )}
       <Text color={Colors.AccentPurple}>
-        {currentLoadingPhrase} (esc to cancel, {elapsedTime}s)
+        {currentLoadingPhrase}
+        {isLoading && ` (esc to cancel, ${elapsedTime}s)`}
       </Text>
       <Box flexGrow={1}>{/* Spacer */}</Box>
       {rightContent && <Box>{rightContent}</Box>}
-- 
cgit v1.2.3

