mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-06 19:31:15 -07:00
feat(ui): composer UX refresh
- Implement refreshed multi-row status area with flattened visibility logic. - Stabilize Composer row heights to prevent layout jumping during debounce and typing. - Refactor renderStatusRow to use a direct flow for Mini(ized) mode, Shell Waiting, and status states. - Relocate ToastDisplay to top Composer row - Migrate Composer tests to use real ToastDisplay component and content-based assertions. - Regenerate all CLI UI snapshots to match the final architecture.
This commit is contained in:
committed by
Jarrod Whelan
parent
cd7dced951
commit
c210b57ab9
@@ -22,16 +22,18 @@ export interface UseLoadingIndicatorProps {
|
||||
retryStatus: RetryAttemptPayload | null;
|
||||
loadingPhrasesMode?: LoadingPhrasesMode;
|
||||
customWittyPhrases?: string[];
|
||||
errorVerbosity: 'low' | 'full';
|
||||
errorVerbosity?: 'low' | 'full';
|
||||
maxLength?: number;
|
||||
}
|
||||
|
||||
export const useLoadingIndicator = ({
|
||||
streamingState,
|
||||
shouldShowFocusHint,
|
||||
retryStatus,
|
||||
loadingPhrasesMode,
|
||||
loadingPhrasesMode = 'tips',
|
||||
customWittyPhrases,
|
||||
errorVerbosity,
|
||||
errorVerbosity = 'full',
|
||||
maxLength,
|
||||
}: UseLoadingIndicatorProps) => {
|
||||
const [timerResetKey, setTimerResetKey] = useState(0);
|
||||
const isTimerActive = streamingState === StreamingState.Responding;
|
||||
@@ -40,12 +42,20 @@ export const useLoadingIndicator = ({
|
||||
|
||||
const isPhraseCyclingActive = streamingState === StreamingState.Responding;
|
||||
const isWaiting = streamingState === StreamingState.WaitingForConfirmation;
|
||||
const currentLoadingPhrase = usePhraseCycler(
|
||||
|
||||
const showTips =
|
||||
loadingPhrasesMode === 'tips' || loadingPhrasesMode === 'all';
|
||||
const showWit =
|
||||
loadingPhrasesMode === 'witty' || loadingPhrasesMode === 'all';
|
||||
|
||||
const { currentTip, currentWittyPhrase } = usePhraseCycler(
|
||||
isPhraseCyclingActive,
|
||||
isWaiting,
|
||||
shouldShowFocusHint,
|
||||
loadingPhrasesMode,
|
||||
showTips,
|
||||
showWit,
|
||||
customWittyPhrases,
|
||||
maxLength,
|
||||
);
|
||||
|
||||
const [retainedElapsedTime, setRetainedElapsedTime] = useState(0);
|
||||
@@ -86,6 +96,8 @@ export const useLoadingIndicator = ({
|
||||
streamingState === StreamingState.WaitingForConfirmation
|
||||
? retainedElapsedTime
|
||||
: elapsedTimeFromTimer,
|
||||
currentLoadingPhrase: retryPhrase || currentLoadingPhrase,
|
||||
currentLoadingPhrase: retryPhrase || currentTip || currentWittyPhrase,
|
||||
currentTip,
|
||||
currentWittyPhrase,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user