mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix(tui): --continue selects wrong session (#5513)
This commit is contained in:
parent
fc3ffb2bf9
commit
fdf560c343
1 changed files with 3 additions and 1 deletions
|
|
@ -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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue