feat(tui): relocated terminal restore registration to tui init
- Moved emergency terminal restore registration to the TUI terminal initialization logic. - Ensured terminal restoration triggers correctly on fatal exits by moving registration out of a side-effect-heavy barrel module. - Added a registration guard to prevent redundant postmortem handler attachments.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
import { emergencyTerminalRestore } from "@oh-my-pi/pi-tui";
|
||||
import { postmortem } from "@oh-my-pi/pi-utils";
|
||||
|
||||
/**
|
||||
* Interactive mode and embeddable RPC client exports for the coding agent.
|
||||
*
|
||||
@@ -11,7 +8,3 @@ import { postmortem } from "@oh-my-pi/pi-utils";
|
||||
export * from "./interactive-mode";
|
||||
export * from "./rpc/rpc-client";
|
||||
export * from "./rpc/rpc-types";
|
||||
|
||||
postmortem.register("terminal-restore", () => {
|
||||
emergencyTerminalRestore();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user