diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-17 00:00:19 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 13:42:02 +0200 |
| commit | 36172979b45facc8ccec6861f124193eaebc42e9 (patch) | |
| tree | 41f7683c53bd1aaa550a7ec22e027e98c29e5d4e /internal/tui/components/chat | |
| parent | cc07f7a186995f428436bc1adc66a264a95171a4 (diff) | |
| download | opencode-36172979b45facc8ccec6861f124193eaebc42e9.tar.gz opencode-36172979b45facc8ccec6861f124193eaebc42e9.zip | |
Update agent prompt, improve TUI patch UI, remove obsolete tool tests
- 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 <[email protected]>
Diffstat (limited to 'internal/tui/components/chat')
| -rw-r--r-- | internal/tui/components/chat/sidebar.go | 12 |
1 files changed, 11 insertions, 1 deletions
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)) } |
