Просмотр исходного кода

fix: sort sessions by updated time (resolves #5074) (#5080)

Ariane Emory 2 месяцев назад
Родитель
Сommit
130345bd5d

+ 1 - 0
packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx

@@ -26,6 +26,7 @@ export function DialogSessionList() {
     const today = new Date().toDateString()
     return sync.data.session
       .filter((x) => x.parentID === undefined)
+      .toSorted((a, b) => b.time.updated - a.time.updated)
       .map((x) => {
         const date = new Date(x.time.updated)
         let category = date.toDateString()