mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
refactor(ui): extract switch controls logic into reusable hook and terminal restoration utility
Extracts duplicated exit/switch confirmation handling from CodexDisplay and RemoteModeDisplay into a custom useSwitchControls hook. Centralizes terminal state restoration (raw mode, keyboard protocol cleanup) into a restoreTerminalState utility function used across codex modules. Improves code reusability and maintainability.
This commit is contained in:
+2
-1
@@ -64,7 +64,8 @@
|
||||
"ts-node": "^10",
|
||||
"tsx": "^4.20.6",
|
||||
"typescript": "^5",
|
||||
"vitest": "^3.2.4"
|
||||
"vitest": "^3.2.4",
|
||||
"react-test-renderer": "^19.2.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"whatwg-url": "14.2.0",
|
||||
|
||||
Reference in New Issue
Block a user