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:
can1357
2026-07-06 08:07:24 +02:00
parent dd5c329bc3
commit 4f172fb27c
3 changed files with 15 additions and 8 deletions
-7
View File
@@ -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();
});