Skip to content

Commit 3bc016f

Browse files
author
Your Name
committed
Confirmations, because they are now queued, should also be globally blocking, don't re-enable input until there are no confirmations left to prevent TUI dead looping
1 parent c03ff51 commit 3bc016f

2 files changed

Lines changed: 5 additions & 29 deletions

File tree

cecli/tui/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,11 @@ def _switch_to_container(self, uuid: str, suppress_input_enable: bool = False) -
11561156
self._sync_sub_agent_display()
11571157

11581158
# Update input autocomplete data for the active agent
1159-
if not suppress_input_enable:
1159+
if (
1160+
not suppress_input_enable
1161+
and not self._confirmation_lock
1162+
and not self._confirmations_pending
1163+
):
11601164
coder = agent_service.foreground_coder
11611165
self.enable_input({}, coder=coder)
11621166

cecli/tui/io.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -639,34 +639,6 @@ async def confirm_ask(
639639
return bool(response)
640640
except queue.Empty:
641641
continue
642-
643-
# Fall back to shared queue (blocking with timeout)
644-
result = self.input_queue.get(timeout=0.1)
645-
646-
if "confirmed" in result:
647-
response = result["confirmed"]
648-
649-
# Handle special responses
650-
if response == "never":
651-
self.never_prompts.add(question_id)
652-
return False
653-
elif response == "tweak":
654-
return "tweak"
655-
elif response == "all":
656-
if group:
657-
group.preference = "all"
658-
if group_response:
659-
self.group_responses[group_response] = True
660-
return True
661-
elif response == "skip":
662-
if group:
663-
group.preference = "skip"
664-
if group_response:
665-
self.group_responses[group_response] = False
666-
return False
667-
else:
668-
# Regular boolean response
669-
return bool(response)
670642
except queue.Empty:
671643
await asyncio.sleep(0.1)
672644
except asyncio.CancelledError:

0 commit comments

Comments
 (0)