From 0e6d2747cde8485d4d1ce7e2dd866e03f77467fc Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 2 Feb 2026 08:29:38 +0300 Subject: Enha: auto turn config switch --- props_table.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'props_table.go') diff --git a/props_table.go b/props_table.go index a235d7c..1b8e894 100644 --- a/props_table.go +++ b/props_table.go @@ -137,6 +137,9 @@ func makePropsTable(props map[string]float32) *tview.Table { // Reconfigure the app's mouse setting app.EnableMouse(cfg.EnableMouse) }) + addCheckboxRow("Auto turn (for cards with many chars)", cfg.AutoTurn, func(checked bool) { + cfg.AutoTurn = checked + }) // Add dropdowns logLevels := []string{"Debug", "Info", "Warn"} addListPopupRow("Set log level", logLevels, GetLogLevel(), func(option string) { -- cgit v1.2.3 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 --- props_table.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'props_table.go') 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 From 4af866079c3f21eab12b02c3158567539ca40c50 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Fri, 6 Feb 2026 12:42:06 +0300 Subject: Chore: linter complaints --- props_table.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'props_table.go') diff --git a/props_table.go b/props_table.go index d037bb0..50c8886 100644 --- a/props_table.go +++ b/props_table.go @@ -313,11 +313,12 @@ func makePropsTable(props map[string]float32) *tview.Table { logger.Warn("empty options list for", "label", label, "api", cfg.CurrentAPI, "localModelsLen", len(LocalModels), "orModelsLen", len(ORFreeModels)) message := "No options available for " + label if label == "Select a model" { - if strings.Contains(cfg.CurrentAPI, "openrouter.ai") { + switch { + case strings.Contains(cfg.CurrentAPI, "openrouter.ai"): message = "No OpenRouter models available. Check token and connection." - } else if strings.Contains(cfg.CurrentAPI, "api.deepseek.com") { + case strings.Contains(cfg.CurrentAPI, "api.deepseek.com"): message = "DeepSeek models should be available. Please report bug." - } else { + default: message = "No llama.cpp models loaded. Ensure llama.cpp server is running with models." } } -- cgit v1.2.3 From 77ad2a7e7e2c3bade4d949d8eb5c36e0126f4668 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 9 Feb 2026 08:52:11 +0300 Subject: Enha: popups from the main window no longer user has to go to the props table to get a pleasant popup to choose an option --- props_table.go | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) (limited to 'props_table.go') diff --git a/props_table.go b/props_table.go index 50c8886..a7ad067 100644 --- a/props_table.go +++ b/props_table.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "slices" "strconv" "strings" "sync" @@ -53,7 +52,6 @@ func makePropsTable(props map[string]float32) *tview.Table { row++ // Store cell data for later use in selection functions cellData := make(map[string]*CellData) - var modelCellID string // will be set for the model selection row // Helper function to add a checkbox-like row addCheckboxRow := func(label string, initialValue bool, onChange func(bool)) { table.SetCell(row, 0, @@ -161,52 +159,6 @@ func makePropsTable(props map[string]float32) *tview.Table { defer localModelsMu.RUnlock() return LocalModels } - var modelRowIndex int // will be set before model row is added - // Prepare API links dropdown - ensure current API is first, avoid duplicates - apiLinks := make([]string, 0, len(cfg.ApiLinks)+1) - apiLinks = append(apiLinks, cfg.CurrentAPI) - for _, api := range cfg.ApiLinks { - if api != cfg.CurrentAPI { - apiLinks = append(apiLinks, api) - } - } - addListPopupRow("Select an api", apiLinks, cfg.CurrentAPI, func(option string) { - cfg.CurrentAPI = option - // Update model list based on new API - newModelList := getModelListForAPI(cfg.CurrentAPI) - if modelCellID != "" { - if data := cellData[modelCellID]; data != nil { - data.Options = newModelList - } - } - // Ensure chatBody.Model is in the new list; if not, set to first available model - if len(newModelList) > 0 && !slices.Contains(newModelList, chatBody.Model) { - chatBody.Model = newModelList[0] - cfg.CurrentModel = chatBody.Model - // Update the displayed cell text - need to find model row - // Search for model row by label - for r := 0; r < table.GetRowCount(); r++ { - if cell := table.GetCell(r, 0); cell != nil && cell.Text == "Select a model" { - if valueCell := table.GetCell(r, 1); valueCell != nil { - valueCell.SetText(chatBody.Model) - } - break - } - } - } - }) - // Prepare model list dropdown - modelRowIndex = row - modelCellID = fmt.Sprintf("listpopup_%d", modelRowIndex) - modelList := getModelListForAPI(cfg.CurrentAPI) - addListPopupRow("Select a model", modelList, chatBody.Model, func(option string) { - chatBody.Model = option - cfg.CurrentModel = chatBody.Model - }) - // Role selection dropdown - addListPopupRow("Write next message as", listRolesWithUser(), cfg.WriteNextMsgAs, func(option string) { - cfg.WriteNextMsgAs = option - }) // Add input fields addInputRow("New char to write msg as", "", func(text string) { if text != "" { -- cgit v1.2.3