Skip to content

Commit 384c171

Browse files
committed
fix(session): sort messages by time.created instead of alphabetical order
1 parent 1571d51 commit 384c171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/opencode/src/session/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export namespace Session {
281281
if (input.limit && result.length >= input.limit) break
282282
result.push(msg)
283283
}
284-
result.reverse()
284+
result.sort((a, b) => a.info.time.created - b.info.time.created)
285285
return result
286286
},
287287
)

0 commit comments

Comments
 (0)