feat(cli): custom witty message (#7641)

This commit is contained in:
JAYADITYA
2025-09-03 22:09:04 +05:30
committed by GitHub
parent 50b5c4303e
commit de53b30e69
7 changed files with 98 additions and 21 deletions

View File

@@ -9,7 +9,10 @@ import { useTimer } from './useTimer.js';
import { usePhraseCycler } from './usePhraseCycler.js';
import { useState, useEffect, useRef } from 'react'; // Added useRef
export const useLoadingIndicator = (streamingState: StreamingState) => {
export const useLoadingIndicator = (
streamingState: StreamingState,
customWittyPhrases?: string[],
) => {
const [timerResetKey, setTimerResetKey] = useState(0);
const isTimerActive = streamingState === StreamingState.Responding;
@@ -20,6 +23,7 @@ export const useLoadingIndicator = (streamingState: StreamingState) => {
const currentLoadingPhrase = usePhraseCycler(
isPhraseCyclingActive,
isWaiting,
customWittyPhrases,
);
const [retainedElapsedTime, setRetainedElapsedTime] = useState(0);