Skip to content

Commit 61e195f

Browse files
Kasper JungeRalphify
authored andcommitted
refactor: move _IterationSpinner next to its sibling _IterationPanel
_IterationSpinner was orphaned at the end of _console_emitter.py, after the 400-line ConsoleEmitter class, even though it's a _LivePanelBase subclass just like _IterationPanel. Relocate it to sit right after _IterationPanel so all renderable classes are grouped together before the emitter that orchestrates them. Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent f7fc721 commit 61e195f

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

src/ralphify/_console_emitter.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,28 @@ def _build_footer(self) -> Table:
564564
return self._footer_grid(summary)
565565

566566

567+
class _IterationSpinner(_LivePanelBase):
568+
"""Rich renderable for non-Claude agents that emit raw stdout.
569+
570+
Same panel chrome as :class:`_IterationPanel` so the visual feels
571+
consistent across agents — only the body content differs (raw text
572+
lines vs. structured tool rows).
573+
"""
574+
575+
def _build_footer(self) -> Table:
576+
line_count = len(self._scroll_lines)
577+
summary = Text(no_wrap=True, overflow="ellipsis")
578+
if line_count > 0:
579+
summary.append(
580+
_plural(line_count, "line"),
581+
style=f"bold {_brand.PURPLE}",
582+
)
583+
summary.append(" of agent output", style="dim")
584+
else:
585+
summary.append("waiting for agent output…", style="dim italic")
586+
return self._footer_grid(summary)
587+
588+
567589
# ── Full-screen peek ─────────────────────────────────────────────────
568590

569591
# Chrome rows that the fullscreen peek reserves on top of its viewport:
@@ -1168,25 +1190,3 @@ def _on_run_stopped(self, data: RunStoppedData) -> None:
11681190
)
11691191
self._console.print(f"\n[bold {_brand.BLUE}]{_RULE_HEAVY}[/]")
11701192
self._console.print(f"[bold {_brand.GREEN}]Done:[/] {summary}")
1171-
1172-
1173-
class _IterationSpinner(_LivePanelBase):
1174-
"""Rich renderable for non-Claude agents that emit raw stdout.
1175-
1176-
Same panel chrome as :class:`_IterationPanel` so the visual feels
1177-
consistent across agents — only the body content differs (raw text
1178-
lines vs. structured tool rows).
1179-
"""
1180-
1181-
def _build_footer(self) -> Table:
1182-
line_count = len(self._scroll_lines)
1183-
summary = Text(no_wrap=True, overflow="ellipsis")
1184-
if line_count > 0:
1185-
summary.append(
1186-
_plural(line_count, "line"),
1187-
style=f"bold {_brand.PURPLE}",
1188-
)
1189-
summary.append(" of agent output", style="dim")
1190-
else:
1191-
summary.append("waiting for agent output…", style="dim italic")
1192-
return self._footer_grid(summary)

0 commit comments

Comments
 (0)