tweak: ensure most recently interacted with session appears at the top (#1239)

This commit is contained in:
Aiden Cline
2025-07-22 22:37:36 -05:00
committed by GitHub
parent 1acf196e98
commit 7f3c98aa1f
3 changed files with 3 additions and 4 deletions
-4
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"log/slog"
@@ -519,9 +518,6 @@ func (a *App) ListSessions(ctx context.Context) ([]opencode.Session, error) {
return []opencode.Session{}, nil
}
sessions := *response
sort.Slice(sessions, func(i, j int) bool {
return sessions[i].Time.Created-sessions[j].Time.Created > 0
})
return sessions, nil
}