mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
Refactor: Add GeminiRespondingSpinner to make use of streamingState idiomatic (#583)
This commit is contained in:
parent
98dcf43214
commit
05a49702d8
5 changed files with 122 additions and 67 deletions
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import Spinner from 'ink-spinner';
|
||||
import { Colors } from '../colors.js';
|
||||
import { useStreamingContext } from '../contexts/StreamingContext.js';
|
||||
import { StreamingState } from '../types.js';
|
||||
import { GeminiRespondingSpinner } from './GeminiRespondingSpinner.js';
|
||||
|
||||
interface LoadingIndicatorProps {
|
||||
currentLoadingPhrase: string;
|
||||
|
|
@ -30,11 +30,13 @@ export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
|
|||
|
||||
return (
|
||||
<Box marginTop={1} paddingLeft={0}>
|
||||
{streamingState === StreamingState.Responding && (
|
||||
<Box marginRight={1}>
|
||||
<Spinner type="dots" />
|
||||
</Box>
|
||||
)}
|
||||
<Box marginRight={1}>
|
||||
<GeminiRespondingSpinner
|
||||
nonRespondingDisplay={
|
||||
streamingState === StreamingState.WaitingForConfirmation ? '⠏' : ''
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
<Text color={Colors.AccentPurple}>
|
||||
{currentLoadingPhrase}
|
||||
{streamingState === StreamingState.WaitingForConfirmation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue