Description
In default inline mode (non-alt-screen), submitted user prompts duplicate in the terminal scrollback history when the AI model begins streaming its response.
Holding the submitted message in a live recallable draft causes the prompt to first render in Ink's dynamic live region. When the model starts streaming and the recall window closes, moving the message into Ink's permanent <Static> transcript causes Ink to reprint the prompt to standard output, leaving a duplicate copy of the user's prompt in the scrollback buffer.
Environment
- OS: Windows 11 (also reproducible across macOS / Linux)
- Node version: v22.x
- Nanocoder version: 1.30.0
- Provider: Ollama (or any provider with latency before first stream chunk)
- Model: qwen2.5 (or any model)
Steps to Reproduce
- Start Nanocoder in default inline mode:
pnpm run start
# or
nanocoder
- Type a prompt (e.g.,
hello can u tell me what is capital of india) and hit Enter.
- While the model is processing/generating the first token, observe the prompt rendered in the dynamic live region.
- As soon as the first stream chunk arrives and the recall draft state transitions to static history, observe that Ink prints the prompt a second time into the terminal scrollback.
Expected Behavior
The submitted prompt should only appear once in the terminal transcript.
Actual Behavior
The user prompt appears twice in the terminal history:
##Screenshot
Additional Context
Description
In default inline mode (non-alt-screen), submitted user prompts duplicate in the terminal scrollback history when the AI model begins streaming its response.
Holding the submitted message in a live recallable draft causes the prompt to first render in Ink's dynamic live region. When the model starts streaming and the recall window closes, moving the message into Ink's permanent
<Static>transcript causes Ink to reprint the prompt to standard output, leaving a duplicate copy of the user's prompt in the scrollback buffer.Environment
Steps to Reproduce
pnpm run start # or nanocoderhello can u tell me what is capital of india) and hit Enter.Expected Behavior
The submitted prompt should only appear once in the terminal transcript.
Actual Behavior
The user prompt appears twice in the terminal history:
##Screenshot
Additional Context
--alt-screen) because<Static>is disabled (disableStatic: true) and rendering is handled within a virtual viewport.renderLastQueuedComponentLivemoving the prompt component from dynamic flow to<Static>in inline mode. GatingrenderLastQueuedComponentLivebehindfullscreenmode resolves the duplicate print cleanly.