MCPcopy Create free account
hub / github.com/codeaashu/claude-code / resumeHandler

Method resumeHandler

src/ink/components/App.tsx:416–436  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414
415 // Set up resume handler
416 const resumeHandler = () => {
417 // Restore raw mode to exact previous state
418 for (let i = 0; i < rawModeCountBeforeSuspend; i++) {
419 if (this.isRawModeSupported()) {
420 this.handleSetRawMode(true);
421 }
422 }
423
424 // Hide cursor (unless in accessibility mode) and re-enable focus reporting after resuming
425 if (this.props.stdout.isTTY) {
426 if (!isEnvTruthy(process.env.CLAUDE_CODE_ACCESSIBILITY)) {
427 this.props.stdout.write(HIDE_CURSOR);
428 }
429 // Re-enable focus reporting to restore terminal state
430 this.props.stdout.write(EFE);
431 }
432
433 // Emit resume event for Claude Code to handle
434 this.internal_eventEmitter.emit('resume');
435 process.removeListener('SIGCONT', resumeHandler);
436 };
437 process.on('SIGCONT', resumeHandler);
438 process.kill(process.pid, 'SIGSTOP');
439 };

Callers

nothing calls this directly

Calls 4

isRawModeSupportedMethod · 0.95
isEnvTruthyFunction · 0.85
emitMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected