Skip to content

fix(cli): only pad short responses to anchor prompt near bottom#4394

Open
g1y5x3 wants to merge 1 commit intoNousResearch:mainfrom
g1y5x3:fix/conditional-prompt-padding
Open

fix(cli): only pad short responses to anchor prompt near bottom#4394
g1y5x3 wants to merge 1 commit intoNousResearch:mainfrom
g1y5x3:fix/conditional-prompt-padding

Conversation

@g1y5x3
Copy link
Copy Markdown

@g1y5x3 g1y5x3 commented Apr 1, 2026

Problem

The unconditional padding from #4359 injected terminal_height // 2 blank lines after every response, creating excessive whitespace between conversation exchanges — regardless of response length. Even a response with tool output and a full response box got ~20 blank lines appended.
screenshot-2026-03-31_21-42-47

Fix

  • Only pad when the response is shorter than terminal_height // 3 lines
  • Padding amount is reduced by the actual response length
  • Long responses that already fill the screen get zero padding

This preserves the original intent (short responses don't leave the prompt stranded mid-screen) while eliminating the excessive whitespace for normal/long responses.

The unconditional padding from NousResearch#4359 injected terminal_height//2 blank
lines after every response, creating excessive whitespace between
conversation exchanges regardless of response length.

Now only pads when the response is shorter than terminal_height//3 lines,
and the padding amount is reduced by the response length. Long responses
that already fill the screen get zero padding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant