summaryrefslogtreecommitdiff
path: root/tui.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-02-18 13:15:40 +0300
committerGrail Finder <wohilas@gmail.com>2026-02-18 13:15:40 +0300
commitf40f09390b7ccf365b41fa1cc134432537b50cad (patch)
treea3eec3dae4af0405830eb0eac13cac2f2f0cbebb /tui.go
parent5548991f5c488032e682fe3a410e747a72c23b90 (diff)
Feat(tts) alt+0 to replay last message in the chatHEADmaster
Diffstat (limited to 'tui.go')
-rw-r--r--tui.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/tui.go b/tui.go
index 0413a83..147d35c 100644
--- a/tui.go
+++ b/tui.go
@@ -83,6 +83,7 @@ var (
[yellow]Ctrl+l[white]: show model selection popup to choose current model
[yellow]Ctrl+k[white]: switch tool use (recommend tool use to llm after user msg)
[yellow]Ctrl+a[white]: interrupt tts (needs tts server)
+[yellow]Alt+0[white]: replay last message via tts (needs tts server)
[yellow]Ctrl+g[white]: open RAG file manager (load files for context retrieval)
[yellow]Ctrl+y[white]: list loaded RAG files (view and manage loaded files)
[yellow]Ctrl+q[white]: show user role selection popup to choose who sends next msg as
@@ -1144,6 +1145,18 @@ func init() {
if event.Key() == tcell.KeyCtrlA && cfg.TTS_ENABLED {
TTSDoneChan <- true
}
+ if event.Key() == tcell.KeyRune && event.Rune() == '0' && event.Modifiers()&tcell.ModAlt != 0 && cfg.TTS_ENABLED {
+ if len(chatBody.Messages) > 0 {
+ // Stop any currently playing TTS first
+ TTSDoneChan <- true
+ lastMsg := chatBody.Messages[len(chatBody.Messages)-1]
+ cleanedText := models.CleanText(lastMsg.Content)
+ if cleanedText != "" {
+ go orator.Speak(cleanedText)
+ }
+ }
+ return nil
+ }
if event.Key() == tcell.KeyCtrlW {
// INFO: continue bot/text message
// without new role