Commit 36cd58a
OpenClaw Agent
fix(cli): skip output-history replay on terminal resize
_resize_clear_ghosts (introduced in NousResearch#20444) replays _OUTPUT_HISTORY after
every SIGWINCH to recover conversation content lost by the screen clear.
This causes a jarring "re-streaming" effect — all recent output lines,
including streaming tokens and spinner frames, are reprinted in rapid
succession whenever the user maximizes/restores the terminal window
(Command+Enter on macOS).
Change _recover_after_resize to only clear the screen + reset the
renderer, without replaying output history. prompt_toolkit's native
_on_resize handler redraws the input area and status bar cleanly.
Users who want to see conversation history restored after resize can
still press Ctrl+L (/redraw), which calls _force_full_redraw (that path
still includes _replay_output_history).
Fixes the symptom reported in NousResearch#19280 where resize recovery replays
entire conversation as if it were streaming from the beginning.1 parent 839cdd1 commit 36cd58a
2 files changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2521 | 2521 | | |
2522 | 2522 | | |
2523 | 2523 | | |
2524 | | - | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
2525 | 2531 | | |
2526 | | - | |
| 2532 | + | |
| 2533 | + | |
2527 | 2534 | | |
2528 | 2535 | | |
2529 | 2536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
96 | | - | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
0 commit comments