We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6619257 commit 38d013fCopy full SHA for 38d013f
cli/src/index.tsx
@@ -28,6 +28,19 @@ import { setOscDetectedTheme } from './utils/theme-system'
28
29
import type { FileTreeNode } from '@codebuff/common/util/file'
30
31
+// Ensure SIGINT always produces a clean, visible exit even if the UI misses the key event.
32
+let globalSigintHandled = false
33
+process.on('SIGINT', () => {
34
+ if (globalSigintHandled) return
35
+ globalSigintHandled = true
36
+ try {
37
+ process.stdout.write('\nGoodbye! Exiting (SIGINT)...\nexit\n')
38
+ } catch {
39
+ // Ignore write errors during shutdown
40
+ }
41
+ process.exit(0)
42
+})
43
+
44
const require = createRequire(import.meta.url)
45
46
function loadPackageVersion(): string {
0 commit comments