From 98c1f59d76fcbf58e4fd86a45122db3b95256c7c Mon Sep 17 00:00:00 2001 From: tauraamui Date: Wed, 15 Oct 2025 17:03:45 +0100 Subject: [PATCH] chore: remove old unnused/wanted implementation --- internal/tui/components/chat/editor/editor.go | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index c962e1f45cb028ebdea7dcc1e07c5d0c97535171..6053c81206b917a8f98fd7845fdbaca60099610d 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -703,32 +703,6 @@ func (m *editorCmp) resetHistory() { m.scrollingPromptHistory = false } -func (m *editorCmp) handleMessageHistory(msg tea.KeyMsg) string { - ctx := context.Background() - userMessages, err := m.getUserMessagesAsText(ctx) - if err != nil { - return "" // Do nothing. - } - userMessages = append(userMessages, "") // Give the user a reset option. - if len(userMessages) > 0 { - if key.Matches(msg, m.keyMap.Previous) { - if m.promptHistoryIndex == 0 { - m.promptHistoryIndex = len(userMessages) - 1 - } else { - m.promptHistoryIndex -= 1 - } - } - if key.Matches(msg, m.keyMap.Next) { - if m.promptHistoryIndex == len(userMessages)-1 { - m.promptHistoryIndex = 0 - } else { - m.promptHistoryIndex += 1 - } - } - } - return userMessages[m.promptHistoryIndex] -} - func newTextArea() *textarea.Model { t := styles.CurrentTheme() ta := textarea.New()