diff options
author | Grail Finder <wohilas@gmail.com> | 2025-02-02 17:58:07 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-02-02 17:58:07 +0300 |
commit | eb53b13381b6f86e8b0584b8bdc980414dbf92df (patch) | |
tree | 956e166e45a8f13d79846b604eb04fb8cd979079 /tui.go | |
parent | 7ca188dcdc9e98e3222a05a160006c76c1b84862 (diff) |
Refactor: remove icons
Diffstat (limited to 'tui.go')
-rw-r--r-- | tui.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -62,6 +62,7 @@ var ( [yellow]Ctrl+v[white]: switch between /completion and /chat api (if provided in config) [yellow]Ctrl+r[white]: menu of files that can be loaded in vector db (RAG) [yellow]Ctrl+t[white]: remove thinking (<think>) and tool messages from context (delete from chat) +[yellow]Ctrl+l[white]: update connected model name (llamacpp) Press Enter to go back ` @@ -100,7 +101,7 @@ func colorText() { // Replace code blocks with placeholders and store their styled versions text = codeBlockRE.ReplaceAllStringFunc(text, func(match string) string { // Style the code block and store it - styled := fmt.Sprintf("[brown::i]%s[-:-:-]", match) + styled := fmt.Sprintf("[brown:yellow:i]%s[-:-:-]", match) codeBlocks = append(codeBlocks, styled) // Generate a unique placeholder (e.g., "__CODE_BLOCK_0__") id := fmt.Sprintf(placeholder, counter) @@ -406,9 +407,10 @@ func init() { // delete last msg // check textarea text; if it ends with bot icon delete only icon: text := textView.GetText(true) - if strings.HasSuffix(text, cfg.AssistantIcon) { - logger.Info("deleting assistant icon", "icon", cfg.AssistantIcon) - textView.SetText(strings.TrimSuffix(text, cfg.AssistantIcon)) + assistantIcon := roleToIcon(cfg.AssistantRole) + if strings.HasSuffix(text, assistantIcon) { + logger.Info("deleting assistant icon", "icon", assistantIcon) + textView.SetText(strings.TrimSuffix(text, assistantIcon)) colorText() return nil } @@ -520,8 +522,9 @@ func init() { startNewChat() return nil } - if event.Key() == tcell.KeyCtrlM { + if event.Key() == tcell.KeyCtrlL { fetchModelName() + textArea.SetText("pressed ctrl+l", true) updateStatusLine() return nil } |