summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/components')
-rw-r--r--packages/cli/src/ui/components/AutoAcceptIndicator.tsx18
-rw-r--r--packages/cli/src/ui/components/LoadingIndicator.tsx6
2 files changed, 22 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/AutoAcceptIndicator.tsx b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx
new file mode 100644
index 00000000..dc23d5e2
--- /dev/null
+++ b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx
@@ -0,0 +1,18 @@
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import React from 'react';
+import { Box, Text } from 'ink';
+import { Colors } from '../colors.js';
+
+export const AutoAcceptIndicator: React.FC = () => (
+ <Box>
+ <Text color={Colors.AccentGreen}>
+ accepting edits
+ <Text color={Colors.SubtleComment}> (shift + tab to disable)</Text>
+ </Text>
+ </Box>
+);
diff --git a/packages/cli/src/ui/components/LoadingIndicator.tsx b/packages/cli/src/ui/components/LoadingIndicator.tsx
index ca5fb5de..4f342c9d 100644
--- a/packages/cli/src/ui/components/LoadingIndicator.tsx
+++ b/packages/cli/src/ui/components/LoadingIndicator.tsx
@@ -13,12 +13,14 @@ interface LoadingIndicatorProps {
isLoading: boolean;
currentLoadingPhrase: string;
elapsedTime: number;
+ rightContent?: React.ReactNode;
}
export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
isLoading,
currentLoadingPhrase,
elapsedTime,
+ rightContent,
}) => {
if (!isLoading) {
return null; // Don't render anything if not loading
@@ -30,10 +32,10 @@ export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
<Spinner type="dots" />
</Box>
<Text color={Colors.AccentPurple}>
- {currentLoadingPhrase} ({elapsedTime}s)
+ {currentLoadingPhrase} (esc to cancel, {elapsedTime}s)
</Text>
<Box flexGrow={1}>{/* Spacer */}</Box>
- <Text color={Colors.SubtleComment}>(ESC to cancel)</Text>
+ {rightContent && <Box>{rightContent}</Box>}
</Box>
);
};