diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-03-04 08:29:47 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-03-04 08:29:47 +0300 |
| commit | 50ce0200af5648818e6e4f51d6541bd3bdb7e036 (patch) | |
| tree | abdafdf40139aacdfa201024c6568518bbb90abd /tui.go | |
| parent | 58ccd63f4a76a8ee6ee44d30347b9a6b12833ebf (diff) | |
Fix: graceful shutdown in tui, to avoid other key block
Diffstat (limited to 'tui.go')
| -rw-r--r-- | tui.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |
