mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-24 05:35:15 +00:00
fix: change subagent navigation order to newest-to-oldest (#5680)
This commit is contained in:
parent
a652fe9076
commit
61aecc92ea
1 changed files with 1 additions and 1 deletions
|
|
@ -225,7 +225,7 @@ export function Session() {
|
|||
const parentID = session()?.parentID ?? session()?.id
|
||||
let children = sync.data.session
|
||||
.filter((x) => x.parentID === parentID || x.id === parentID)
|
||||
.toSorted((b, a) => a.id.localeCompare(b.id))
|
||||
.toSorted((a, b) => (a.id < b.id ? -1 : a.id > b.id ? 1 : 0))
|
||||
if (children.length === 1) return
|
||||
let next = children.findIndex((x) => x.id === session()?.id) + direction
|
||||
if (next >= children.length) next = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue