feat: manually restart gate from REPL and TUI #17
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kahliburke/Kaimon.jl!17
Loading…
Reference in a new issue
No description provided.
Delete branch "he/feat-manually-restart-gate-from"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Gate.restart()function for restarting the Julia session directly from the REPL, preserving the session ID so the TUI reconnects automatically[r] restartkeybinding on the Sessions tab alongside the existing[x] shutdownGate.restart()Details
Gate.restart()follows the same structure asstop()(wait for the message-loop task, then cleanup) but calls_exec_restartinstead of exiting. It sets_RESTARTING = truelike the MCP:restarthandler does to prevent the message-loop'sfinallyblock from racing with cleanup. No 0.3s sleep is needed since there's no ZMQ reply to flush.The TUI restart handler sends
send_restart!fire-and-forget but intentionally does not callstop_session!or remove the connection from the manager —execvpkeeps the same PID and PTY, so the managed session stays valid and the health checker picks up the reconnected gate.Closes #16
Test plan
Gate.restart()restarts the session and the TUI reconnectsGate.restart()errors when the gate is not runningGate.restart()errors whenallow_restart=falserrestarts the selected sessionretest("Gate.restart")Testing locally (macOS), I can confirm restart appears to work both through TUI and directly through REPL.
One outstanding cosmetic issue:
Upon restart, it appears the REPL isn't flushed, see:
I would expect either:
*screenshot from antigravity terminal (vscode fork). Can't confirm if this persists with other terminals.