diff options
author | Grail Finder <wohilas@gmail.com> | 2025-05-27 11:19:01 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-05-27 11:19:01 +0300 |
commit | 3500b44b2f3c793315e75526bc69cf8f20d18ad2 (patch) | |
tree | 61dc4cdcd27a3bc5c0f94ea7f52461c229788f57 | |
parent | 4a17dd745cbd7354a24b046b76838f7670af51c6 (diff) |
Fix: update status line panic
-rw-r--r-- | tui.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,10 +1,10 @@ package main import ( + "fmt" "gf-lt/extra" "gf-lt/models" "gf-lt/pngmeta" - "fmt" "image" _ "image/jpeg" _ "image/png" @@ -140,7 +140,11 @@ func colorText() { } func updateStatusLine() { - position.SetText(fmt.Sprintf(indexLine, botRespMode, cfg.AssistantRole, activeChatName, cfg.RAGEnabled, cfg.ToolUse, chatBody.Model, cfg.CurrentAPI, cfg.ThinkUse, logLevel.Level(), asr.IsRecording())) + isRecording := false + if asr != nil { + isRecording = asr.IsRecording() + } + position.SetText(fmt.Sprintf(indexLine, botRespMode, cfg.AssistantRole, activeChatName, cfg.RAGEnabled, cfg.ToolUse, chatBody.Model, cfg.CurrentAPI, cfg.ThinkUse, logLevel.Level(), isRecording)) } func initSysCards() ([]string, error) { |