diff src/lib/Chat.luan @ 36:2737eeedc1d5

autoplay
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 05 Aug 2025 17:24:47 -0600
parents 3117876debca
children 2a4c83ce3deb
line wrap: on
line diff
--- a/src/lib/Chat.luan	Tue Aug 05 16:41:29 2025 -0600
+++ b/src/lib/Chat.luan	Tue Aug 05 17:24:47 2025 -0600
@@ -32,6 +32,7 @@
 		language_region = doc.language_region
 		voice = doc.voice
 		show_text = doc.show_text == "true"
+		autoplay = doc.autoplay == "true"
 	}
 end
 
@@ -48,6 +49,7 @@
 		language_region = chat.language_region or error()
 		voice = chat.voice or error()
 		show_text = chat.show_text and "true" or "false"
+		autoplay = chat.autoplay and "true" or "false"
 	}
 end
 
@@ -60,6 +62,7 @@
 	chat.language_region = chat.language_region or first_region(chat.language)
 	chat.voice = chat.voice or voices[1].code
 	if chat.show_text==nil then chat.show_text = true end
+	if chat.autoplay==nil then chat.autoplay = true end
 
 	function chat.save()
 		local doc = to_doc(chat)
@@ -82,6 +85,7 @@
 			voice = chat.voice
 			name = chat.name
 			show_text = chat.show_text
+			autoplay = chat.autoplay
 		}
 	end