summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-05-27 11:19:01 +0300
committerGrail Finder <wohilas@gmail.com>2025-05-27 11:19:01 +0300
commit3500b44b2f3c793315e75526bc69cf8f20d18ad2 (patch)
tree61dc4cdcd27a3bc5c0f94ea7f52461c229788f57
parent4a17dd745cbd7354a24b046b76838f7670af51c6 (diff)
Fix: update status line panic
-rw-r--r--tui.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/tui.go b/tui.go
index 43df360..df300bb 100644
--- a/tui.go
+++ b/tui.go
@@ -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) {