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 84f6230 commit f5f8ad5Copy full SHA for f5f8ad5
cli/src/index.tsx
@@ -29,6 +29,19 @@ import { setOscDetectedTheme } from './utils/theme-system'
29
30
import type { FileTreeNode } from '@codebuff/common/util/file'
31
32
+// Ensure SIGINT always produces a clean, visible exit even if the UI misses the key event.
33
+let globalSigintHandled = false
34
+process.on('SIGINT', () => {
35
+ if (globalSigintHandled) return
36
+ globalSigintHandled = true
37
+ try {
38
+ process.stdout.write('\nGoodbye! Exiting (SIGINT)...\nexit\n')
39
+ } catch {
40
+ // Ignore write errors during shutdown
41
+ }
42
+ process.exit(0)
43
+})
44
+
45
const require = createRequire(import.meta.url)
46
47
function loadPackageVersion(): string {
0 commit comments