Skip to content

Commit def4f5b

Browse files
author
zhansheng.lzs
committed
fix(acli): sync agenticCLI — capture the mouse in the TUI on Windows
With capture off the terminal never learns the app wants mouse events, so Windows Terminal and conhost translate the wheel into arrow keys or scroll their own buffer: the input box moved through its history, or the whole screen dragged, while the output area never scrolled.
1 parent e9c4736 commit def4f5b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎dashscope/acli/config.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,11 @@ class Config:
282282
protocol: str = "openai" # "openai" | "anthropic"
283283
tui: bool = True
284284
# False = let the terminal handle the mouse (native selection).
285-
# Default off on Windows: Textual's mouse-capture path is crash-prone
286-
# in PowerShell/conhost; native terminal mouse still allows selection.
287-
tui_mouse: bool = field(default_factory=lambda: os.name != "nt")
285+
# Capture is on everywhere, including Windows: without it the wheel goes
286+
# to the console host, which scrolls the whole alternate screen — the
287+
# input box moves with the output and repaints slowly. Set false only if
288+
# your terminal mishandles Textual's mouse reporting.
289+
tui_mouse: bool = True
288290
privacy_mode: bool = (
289291
False # When True, all data stays local, no cloud capabilities
290292
)

0 commit comments

Comments
 (0)