INNER CODE UNIT · Python
i
VisionForge-OU/foreman · src/foreman/tui/app.py:324
i = (escs.index(self.selected) + 1) % len(escs) if self.selected in escs else 0
self.selected = escs[i]
self._show_detail()
def action_resume(self) -> None:
if not self.selected:
return
answer = self.query_one("#answer", TextArea).text.strip()
if not answer:
self.notify("Type an answer first", severity="warning")
return
slug, iid = self.slug, self.selected
async def task():
# The resume can outlive this screen (the user may navigate away during it),
# so surface the result via the app (always alive); refresh_escs self-guards.
try:
await self.app.controller.resume(slug, iid, answer)