fix(tui): wire Ctrl+L to Ink forceRedraw path

Expose a small forceRedraw API from @hermes/ink and use it for Ctrl/Cmd+L so the hotkey performs a real terminal clear + full repaint instead of a no-op state patch.
This commit is contained in:
Brooklyn Nicholson 2026-04-27 12:44:24 -05:00
parent da6f8449a5
commit b3e7a412e2
4 changed files with 16 additions and 6 deletions

View file

@ -73,6 +73,16 @@ export type Root = {
waitUntilExit: () => Promise<void>
}
export const forceRedraw = (stdout: NodeJS.WriteStream = process.stdout): boolean => {
const instance = instances.get(stdout)
if (!instance) {
return false
}
instance.forceRedraw()
return true
}
/**
* Mount a component and render the output.
*/