summaryrefslogtreecommitdiff
path: root/tui.go
diff options
context:
space:
mode:
Diffstat (limited to 'tui.go')
-rw-r--r--tui.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/tui.go b/tui.go
index 4a8a7b2..67f2775 100644
--- a/tui.go
+++ b/tui.go
@@ -1001,6 +1001,17 @@ func init() {
showBotRoleSelectionPopup()
return nil
}
+ // INFO: shutdown
+ if event.Key() == tcell.KeyCtrlC {
+ logger.Info("caught Ctrl+C via tcell event")
+ go func() {
+ if err := pwShutDown(); err != nil {
+ logger.Error("shutdown failed", "err", err)
+ }
+ app.Stop()
+ }()
+ return nil // swallow the event
+ }
if event.Key() == tcell.KeyCtrlG {
// cfg.RAGDir is the directory with files to use with RAG
// rag load