中文 | English
Why can Claude Code render spinners, status bars, and message history in the terminal like a React app?
python examples/l4_ui_ink.pycomponents/screens/REPL.tsxink.tsink/
REPLAppAgentProgressLinerender
- how UI state differs from message state
- why declarative rendering still works in a terminal
- why spinner and tool progress do not break scrollback history
The demo simulates React/Ink with full redraws. The real implementation has finer component boundaries, input handling, and terminal compatibility details.
- Why is Claude Code not just a series of
print()calls? - What would go wrong if progress updates were not state-driven?
- Is
REPL.tsxmore of a product layer whileink/is more of a rendering layer?