UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

23 lines (22 loc) 846 B
/** * CLI Abort Handler (BZ-667) * * Bridges SIGINT (Ctrl+C) to an AbortController for graceful stream cancellation. * First Ctrl+C aborts the stream and shows "Stream cancelled." * Second Ctrl+C within 1 second force-exits the process. * * Uses `prependListener` so the stream handler fires BEFORE the top-level * SIGINT handler in cli/index.ts (which calls process.exit). The listener * remains registered until `cleanup()` removes it. On the first Ctrl+C the * stream is cancelled gracefully; only a rapid second press exits. * * @module cli/utils/abortHandler */ /** * Create an abort handler that wires SIGINT to an AbortController. * Call cleanup() when the stream finishes (success or error) to remove listeners. */ export declare function createStreamAbortHandler(): { signal: AbortSignal; cleanup: () => void; };