mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-29 04:59:51 +00:00
app: better loading (#23489)
This commit is contained in:
parent
84e322b0fd
commit
687b758882
9 changed files with 142 additions and 107 deletions
|
|
@ -31,7 +31,7 @@ function sortSessions(now: number) {
|
|||
const isRootVisibleSession = (session: Session, directory: string) =>
|
||||
workspaceKey(session.directory) === workspaceKey(directory) && !session.parentID && !session.time?.archived
|
||||
|
||||
const roots = (store: SessionStore) =>
|
||||
export const roots = (store: SessionStore) =>
|
||||
(store.session ?? []).filter((session) => isRootVisibleSession(session, store.path.directory))
|
||||
|
||||
export const sortedRootSessions = (store: SessionStore, now: number) => roots(store).sort(sortSessions(now))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue