From fa792674d32d41ff74b309425fb80e1d980363b1 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Sun, 16 Aug 2026 00:06:44 +0800 Subject: [PATCH] =?UTF-8?q?myclaude=20-r:=20=E6=B8=85=E5=9D=97=E5=90=8E=20?= =?UTF-8?q?\r=20=E5=BD=92=E4=BD=8D=E5=88=97=200=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20Resuming=20=E5=89=8D=E7=A9=BA=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit raw 模式下 ONLCR 关闭,_draw_picker_block 每行以 \n 结尾时光标停在行末列而非列 0;\x1b[12A 上移、\x1b[12M 删除后列不变,rich console.print 的 Resuming 从 ~40 列打印,前面出现一长串空格。清块后补 \r 归位。 --- myagents/launcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/myagents/launcher.py b/myagents/launcher.py index e7dba1e..8680cad 100644 --- a/myagents/launcher.py +++ b/myagents/launcher.py @@ -1048,10 +1048,14 @@ def _clear_picker_block(prev_height: int) -> None: Uses Delete Line (``CSI n M``) rather than blanking lines, so the block disappears entirely instead of leaving N empty rows below the prompt. + Ends with ``\r`` so the next writer (``console.print`` of the Resuming + line, or the shell prompt) starts at column 0, not wherever the block's + last row left the cursor. """ if prev_height: sys.stdout.write(f"\x1b[{prev_height}A") sys.stdout.write(f"\x1b[{prev_height}M") + sys.stdout.write("\r") sys.stdout.flush()