Enha: switch tts on/off from ctrl+p

This commit is contained in:
Grail Finder
2025-12-08 16:57:08 +03:00
parent e7b542730c
commit 0911d6e640
2 changed files with 30 additions and 27 deletions

View File

@@ -121,6 +121,9 @@ func makePropsTable(props map[string]float32) *tview.Table {
addCheckboxRow("Inject role", injectRole, func(checked bool) { addCheckboxRow("Inject role", injectRole, func(checked bool) {
injectRole = checked injectRole = checked
}) })
addCheckboxRow("TTS Enabled", cfg.TTS_ENABLED, func(checked bool) {
cfg.TTS_ENABLED = checked
})
// Add dropdowns // Add dropdowns
logLevels := []string{"Debug", "Info", "Warn"} logLevels := []string{"Debug", "Info", "Warn"}
addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) { addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) {

View File

@@ -772,34 +772,34 @@ func todoDelete(args map[string]string) []byte {
func isCommandAllowed(command string) bool { func isCommandAllowed(command string) bool {
allowedCommands := map[string]bool{ allowedCommands := map[string]bool{
"grep": true, "grep": true,
"sed": true, "sed": true,
"awk": true, "awk": true,
"find": true, "find": true,
"cat": true, "cat": true,
"head": true, "head": true,
"tail": true, "tail": true,
"sort": true, "sort": true,
"uniq": true, "uniq": true,
"wc": true, "wc": true,
"ls": true, "ls": true,
"echo": true, "echo": true,
"cut": true, "cut": true,
"tr": true, "tr": true,
"cp": true, "cp": true,
"mv": true, "mv": true,
"rm": true, "rm": true,
"mkdir": true, "mkdir": true,
"rmdir": true, "rmdir": true,
"pwd": true, "pwd": true,
"df": true, "df": true,
"free": true, "free": true,
"ps": true, "ps": true,
"top": true, "top": true,
"du": true, "du": true,
"whoami": true, "whoami": true,
"date": true, "date": true,
"uname": true, "uname": true,
} }
return allowedCommands[command] return allowedCommands[command]
} }