diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-03-08 07:13:27 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-03-08 07:13:27 +0300 |
| commit | c200c9328c4aa7654dc41c0eac02fe1cc267d666 (patch) | |
| tree | 47d66a7073c18bef313a8283f31598f6fc5ce5a9 /tui.go | |
| parent | 23cb8f2578540e698f590bed35f973a22a8c2f90 (diff) | |
Enha: botresp, toolresp to atomic
Diffstat (limited to 'tui.go')
| -rw-r--r-- | tui.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -731,7 +731,7 @@ func initTUI() { updateStatusLine() return nil } - if event.Key() == tcell.KeyF2 && !botRespMode { + if event.Key() == tcell.KeyF2 && !botRespMode.Load() { // regen last msg if len(chatBody.Messages) == 0 { showToast("info", "no messages to regenerate") @@ -748,7 +748,7 @@ func initTUI() { chatRoundChan <- &models.ChatRoundReq{Role: cfg.UserRole, Regen: true} return nil } - if event.Key() == tcell.KeyF3 && !botRespMode { + if event.Key() == tcell.KeyF3 && !botRespMode.Load() { // delete last msg // check textarea text; if it ends with bot icon delete only icon: text := textView.GetText(true) @@ -804,9 +804,9 @@ func initTUI() { return nil } if event.Key() == tcell.KeyF6 { - interruptResp = true - botRespMode = false - toolRunningMode = false + interruptResp.Store(true) + botRespMode.Store(false) + toolRunningMode.Store(false) return nil } if event.Key() == tcell.KeyF7 { @@ -1101,7 +1101,7 @@ func initTUI() { return nil } // cannot send msg in editMode or botRespMode - if event.Key() == tcell.KeyEscape && !editMode && !botRespMode { + if event.Key() == tcell.KeyEscape && !editMode && !botRespMode.Load() { if shellMode { cmdText := shellInput.GetText() if cmdText != "" { @@ -1167,7 +1167,7 @@ func initTUI() { app.SetFocus(focusSwitcher[currentF]) return nil } - if isASCII(string(event.Rune())) && !botRespMode { + if isASCII(string(event.Rune())) && !botRespMode.Load() { return event } return event |
