MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / restoreStty

Function restoreStty

apps/kimi-code/src/cli/run-shell.ts:150–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 /* ignore */
149 }
150 const restoreStty = (): void => {
151 if (savedStty === undefined) return;
152 const args = savedStty.split(/\s+/).filter((arg) => arg.length > 0);
153 if (args.length === 0) return;
154 spawnSync('stty', args, { stdio: ['inherit', 'ignore', 'ignore'] });
155 };
156
157 // If we crash without going through KimiTUI.stop(), the terminal is left in
158 // raw mode with a hidden cursor and XON/XOFF flow control disabled. Restore

Callers 2

emergencyExitFunction · 0.85
runShellFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected