diff options
| author | Rhys Sullivan <[email protected]> | 2025-12-17 08:22:57 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-17 10:22:57 -0600 |
| commit | 1b3919908308196f61c1aaf813edf3e158f1d583 (patch) | |
| tree | 0a1168f76463f65fff8fc421bf491ee6c7b68854 /packages | |
| parent | b8204c0bb7f6bcc77c6cd570f0020ac4ed044503 (diff) | |
| download | opencode-1b3919908308196f61c1aaf813edf3e158f1d583.tar.gz opencode-1b3919908308196f61c1aaf813edf3e158f1d583.zip | |
fix: change subagent navigation order to newest-to-oldest (#5680)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/routes/session/index.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index b9ef2580b..9b6809dc0 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -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 |
