fix(tui): --continue selects wrong session (#5513)

This commit is contained in:
Ravi Kumar 2025-12-15 07:20:54 +05:30 committed by GitHub
parent fc3ffb2bf9
commit fdf560c343
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -218,7 +218,9 @@ function App() {
let continued = false
createEffect(() => {
if (continued || sync.status !== "complete" || !args.continue) return
const match = sync.data.session.find((x) => x.parentID === undefined)?.id
const match = sync.data.session
.toSorted((a, b) => b.time.updated - a.time.updated)
.find((x) => x.parentID === undefined)?.id
if (match) {
continued = true
route.navigate({ type: "session", sessionID: match })