fix(tui): resume sessions in current terminal (#222)#233
Conversation
|
Thanks for working on this. I do not think this PR fixes #222 yet. The issue asks the Sessions restore path to reuse the existing Claude temp launch flow and pass This PR removes the external terminal launcher, but I would not merge this as-is. The better fix is to make the session resume action provider-aware, carry |
After carefully analyzing the original "launch temp" code, i realized this path is too complicated. Actually what needed to restore a session is only a session UUID, instead of creating a temp config file and create a shell script to delete it. So i think simply The main problem in #222 is the current code launch a new terminal window, which is intuitive for an app already running in a terminal. This problem makes session resume hard to use on headless machines. This PR fixes this. |
Replace the external terminal launch approach for session resume with direct
execin the current terminal.Previously, resuming a session would attempt to open an external terminal application (Terminal.app, iTerm2, Ghostty, etc.) via platform-specific launchers.
Now, session resume uses
exec(on Unix) to replace the current process with the resume command in the user's shell, giving a seamless in-terminal experience. On non-Unix platforms, the resume command is shown as a fallback for manual execution.Changes
session_manager::terminalmodule — deletes all platform-specific terminal launchers (macOS Terminal, iTerm2, Ghostty, Kitty, WezTerm, Kaku, Alacritty, Warp, custom)CommandExt::exec()to replace the current process with the user's shell running the resume commandpreferred_terminalsetting — field is retained for serde compatibility but marked#[allow(dead_code)]I didn't add confirmation before launch agent apps to align with the behavior of existing "launch temp"