mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
- This utilizes `ink-gradient` to render GEMINI CODE in amazing colors. - Added a shared color configuration for UX (should this be in config?). It's very possible that we shouldn't be talking about the specific colors and instead be mentioning "foreground"/"background"/inlineCode etc. type colors. - Updated existing color usages to utilize `Colors.*` Fixes https://b.corp.google.com/issues/411385593
40 lines
903 B
TypeScript
40 lines
903 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { Box, Text } from 'ink';
|
|
import Spinner from 'ink-spinner';
|
|
import { Colors } from '../colors.js';
|
|
|
|
interface LoadingIndicatorProps {
|
|
isLoading: boolean;
|
|
currentLoadingPhrase: string;
|
|
elapsedTime: number;
|
|
}
|
|
|
|
export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
|
|
isLoading,
|
|
currentLoadingPhrase,
|
|
elapsedTime,
|
|
}) => {
|
|
if (!isLoading) {
|
|
return null; // Don't render anything if not loading
|
|
}
|
|
|
|
return (
|
|
<Box marginTop={1} paddingLeft={0}>
|
|
<Box marginRight={1}>
|
|
<Spinner type="dots" />
|
|
</Box>
|
|
<Text color={Colors.AccentPurple}>
|
|
{currentLoadingPhrase} ({elapsedTime}s)
|
|
</Text>
|
|
<Box flexGrow={1}>{/* Spacer */}</Box>
|
|
<Text color={Colors.SubtleComment}>(ESC to cancel)</Text>
|
|
</Box>
|
|
);
|
|
};
|