chore: cleanup (#17184)

This commit is contained in:
Adam
2026-03-12 08:52:51 -05:00
committed by GitHub
parent 13402529ce
commit 12efbbfa4c
17 changed files with 135 additions and 278 deletions

View File

@@ -8,7 +8,7 @@ export const workspaceKey = (directory: string) => {
return directory.replace(/[\\/]+$/, "")
}
export function sortSessions(now: number) {
function sortSessions(now: number) {
const oneMinuteAgo = now - 60 * 1000
return (a: Session, b: Session) => {
const aUpdated = a.time.updated ?? a.time.created
@@ -22,7 +22,7 @@ export function sortSessions(now: number) {
}
}
export const isRootVisibleSession = (session: Session, directory: string) =>
const isRootVisibleSession = (session: Session, directory: string) =>
workspaceKey(session.directory) === workspaceKey(directory) && !session.parentID && !session.time?.archived
export const sortedRootSessions = (store: { session: Session[]; path: { directory: string } }, now: number) =>
@@ -90,5 +90,3 @@ export const effectiveWorkspaceOrder = (local: string, dirs: string[], persisted
return [...result, ...live.values()]
}
export const syncWorkspaceOrder = effectiveWorkspaceOrder