mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-09 20:55:06 +02:00
improved timing
This commit is contained in:
@@ -20,7 +20,7 @@ export function useOrderedPhases(externalPhase: StreamingPhase) {
|
|||||||
const [phaseQueue, setPhaseQueue] = useState<StreamingPhase[]>([]);
|
const [phaseQueue, setPhaseQueue] = useState<StreamingPhase[]>([]);
|
||||||
const [displayedPhases, setDisplayedPhases] = useState<StreamingPhase[]>([]);
|
const [displayedPhases, setDisplayedPhases] = useState<StreamingPhase[]>([]);
|
||||||
const lastDisplayTimeRef = useRef<number>(Date.now());
|
const lastDisplayTimeRef = useRef<number>(Date.now());
|
||||||
const MIN_DELAY = 1000; // 0.5 seconds
|
const MIN_DELAY = 300; // 0.5 seconds
|
||||||
|
|
||||||
const getPhaseIndex = (phase: StreamingPhase) => PHASES_ORDER.indexOf(phase);
|
const getPhaseIndex = (phase: StreamingPhase) => PHASES_ORDER.indexOf(phase);
|
||||||
const finalPhaseIndex = useRef<number | null>(null);
|
const finalPhaseIndex = useRef<number | null>(null);
|
||||||
|
Reference in New Issue
Block a user