Enha: stop tts if msg not for user

This commit is contained in:
Grail Finder
2026-02-10 11:25:05 +03:00
parent 875de679cf
commit 46a33baabb
6 changed files with 19 additions and 18 deletions

View File

@@ -45,6 +45,18 @@ func refreshChatDisplay() {
})
}
func stopTTSIfNotForUser(msg *models.RoleMsg) {
viewingAs := cfg.UserRole
if cfg.WriteNextMsgAs != "" {
viewingAs = cfg.WriteNextMsgAs
}
// stop tts if msg is not for user
if cfg.CharSpecificContextEnabled &&
!slices.Contains(msg.KnownTo, viewingAs) && cfg.TTS_ENABLED {
TTSDoneChan <- true
}
}
func colorText() {
text := textView.GetText(false)
quoteReplacer := strings.NewReplacer(