From 0f5bbaa94390cd4d11facc8b2e7fb825b128ef31 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Tue, 3 Feb 2026 12:04:20 +0300 Subject: Enha: update config --- config.example.toml | 7 +++++-- config/config.go | 27 ++++++++++++++------------- props_table.go | 3 +++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/config.example.toml b/config.example.toml index 85b2662..82aa5f5 100644 --- a/config.example.toml +++ b/config.example.toml @@ -19,7 +19,7 @@ AssistantRole = "assistant" SysDir = "sysprompts" ChunkLimit = 100000 AutoScrollEnabled = true -# AutoCleanToolCallsFromCtx = false +AutoCleanToolCallsFromCtx = false # rag settings RAGBatchSize = 1 RAGWordLimit = 80 @@ -39,9 +39,12 @@ WhisperBinaryPath = "./batteries/whisper.cpp/build/bin/whisper-cli" # Path to wh WhisperModelPath = "./batteries/whisper.cpp/ggml-large-v3-turbo-q5_0.bin" # Path to whisper model file (for WHISPER_BINARY mode) STT_LANG = "en" # Language for speech recognition (for WHISPER_BINARY mode) STT_SR = 16000 # Sample rate for audio recording +# DBPATH = "gflt.db" FilePickerDir = "." # Directory where file picker should start FilePickerExts = "png,jpg,jpeg,gif,webp" # Comma-separated list of allowed file extensions for file picker EnableMouse = false # Enable mouse support in the UI -CharSpecificContextEnabled = false +# character specific context +CharSpecificContextEnabled = true CharSpecificContextTag = "__known_to_chars__" +AutoTurn = true diff --git a/config/config.go b/config/config.go index 381fa72..bed24f6 100644 --- a/config/config.go +++ b/config/config.go @@ -26,7 +26,11 @@ type Config struct { WriteNextMsgAs string WriteNextMsgAsCompletionAgent string SkipLLMResp bool - AutoCleanToolCallsFromCtx bool `toml:"AutoCleanToolCallsFromCtx"` + AutoCleanToolCallsFromCtx bool `toml:"AutoCleanToolCallsFromCtx"` + DBPATH string `toml:"DBPATH"` + FilePickerDir string `toml:"FilePickerDir"` + FilePickerExts string `toml:"FilePickerExts"` + EnableMouse bool `toml:"EnableMouse"` // embeddings RAGEnabled bool `toml:"RAGEnabled"` EmbedURL string `toml:"EmbedURL"` @@ -54,20 +58,17 @@ type Config struct { TTS_PROVIDER string `toml:"TTS_PROVIDER"` TTS_LANGUAGE string `toml:"TTS_LANGUAGE"` // STT - STT_TYPE string `toml:"STT_TYPE"` // WHISPER_SERVER, WHISPER_BINARY - STT_URL string `toml:"STT_URL"` - STT_SR int `toml:"STT_SR"` - STT_ENABLED bool `toml:"STT_ENABLED"` - WhisperBinaryPath string `toml:"WhisperBinaryPath"` - WhisperModelPath string `toml:"WhisperModelPath"` - STT_LANG string `toml:"STT_LANG"` - DBPATH string `toml:"DBPATH"` - FilePickerDir string `toml:"FilePickerDir"` - FilePickerExts string `toml:"FilePickerExts"` - EnableMouse bool `toml:"EnableMouse"` + STT_TYPE string `toml:"STT_TYPE"` // WHISPER_SERVER, WHISPER_BINARY + STT_URL string `toml:"STT_URL"` + STT_SR int `toml:"STT_SR"` + STT_ENABLED bool `toml:"STT_ENABLED"` + WhisperBinaryPath string `toml:"WhisperBinaryPath"` + WhisperModelPath string `toml:"WhisperModelPath"` + STT_LANG string `toml:"STT_LANG"` + // character spefic contetx CharSpecificContextEnabled bool `toml:"CharSpecificContextEnabled"` CharSpecificContextTag string `toml:"CharSpecificContextTag"` - AutoTurn bool + AutoTurn bool `toml:"AutoTurn"` } func LoadConfig(fn string) (*Config, error) { diff --git a/props_table.go b/props_table.go index 1b8e894..d037bb0 100644 --- a/props_table.go +++ b/props_table.go @@ -140,6 +140,9 @@ func makePropsTable(props map[string]float32) *tview.Table { addCheckboxRow("Auto turn (for cards with many chars)", cfg.AutoTurn, func(checked bool) { cfg.AutoTurn = checked }) + addCheckboxRow("Char specific context", cfg.CharSpecificContextEnabled, func(checked bool) { + cfg.CharSpecificContextEnabled = checked + }) // Add dropdowns logLevels := []string{"Debug", "Info", "Warn"} addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) { -- cgit v1.2.3