feat: custom loading phrase when interactive shell requires input (#12535)

This commit is contained in:
Jack Wotherspoon
2025-11-21 12:19:34 -05:00
committed by GitHub
parent d72f35c2e7
commit d351f07758
13 changed files with 420 additions and 107 deletions

View File

@@ -12,6 +12,8 @@ import { useState, useEffect, useRef } from 'react'; // Added useRef
export const useLoadingIndicator = (
streamingState: StreamingState,
customWittyPhrases?: string[],
isInteractiveShellWaiting: boolean = false,
lastOutputTime: number = 0,
) => {
const [timerResetKey, setTimerResetKey] = useState(0);
const isTimerActive = streamingState === StreamingState.Responding;
@@ -23,6 +25,8 @@ export const useLoadingIndicator = (
const currentLoadingPhrase = usePhraseCycler(
isPhraseCyclingActive,
isWaiting,
isInteractiveShellWaiting,
lastOutputTime,
customWittyPhrases,
);