fix(tui): stop empty idle dequeue from triggering ready-state OOM

This commit is contained in:
cresslank 2026-04-19 23:29:19 -05:00 committed by Teknium
parent edf1aecacd
commit 904f20d622

View file

@ -386,7 +386,12 @@ export function useMainApp(gw: GatewayClient) {
// and error paths never emit message.complete, so anything enqueued while // and error paths never emit message.complete, so anything enqueued while
// `!sleep` / a failed turn was running would stay stuck forever. // `!sleep` / a failed turn was running would stay stuck forever.
useEffect(() => { useEffect(() => {
if (!ui.sid || ui.busy || composerRefs.queueEditRef.current !== null) { if (
!ui.sid ||
ui.busy ||
composerRefs.queueEditRef.current !== null ||
composerRefs.queueRef.current.length === 0
) {
return return
} }