From 36172979b45facc8ccec6861f124193eaebc42e9 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Thu, 17 Apr 2025 00:00:19 +0200 Subject: Update agent prompt, improve TUI patch UI, remove obsolete tool tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace and expand agent coder prompt for clarity and safety - Add patch tool and TUI dialog support for patch diffs - Sort sidebar modified files by name - Remove Bash/Edit/Sourcegraph/Write tool tests 🤖 Generated with opencode Co-Authored-By: opencode --- internal/tui/components/chat/sidebar.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'internal/tui/components/chat') diff --git a/internal/tui/components/chat/sidebar.go b/internal/tui/components/chat/sidebar.go index 54b39f4a1..fe2845a08 100644 --- a/internal/tui/components/chat/sidebar.go +++ b/internal/tui/components/chat/sidebar.go @@ -3,6 +3,7 @@ package chat import ( "context" "fmt" + "sort" "strings" tea "github.com/charmbracelet/bubbletea" @@ -141,8 +142,17 @@ func (m *sidebarCmp) modifiedFiles() string { ) } + // Sort file paths alphabetically for consistent ordering + var paths []string + for path := range m.modFiles { + paths = append(paths, path) + } + sort.Strings(paths) + + // Create views for each file in sorted order var fileViews []string - for path, stats := range m.modFiles { + for _, path := range paths { + stats := m.modFiles[path] fileViews = append(fileViews, m.modifiedFile(path, stats.additions, stats.removals)) } -- cgit v1.2.3