Skip to content

Commit 12cbfe5

Browse files
chore: generate
1 parent d7b7be1 commit 12cbfe5

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

packages/app/src/pages/layout.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ import { Titlebar } from "@/components/titlebar"
6565
import { useServer } from "@/context/server"
6666
import { useLanguage, type Locale } from "@/context/language"
6767
import { pathKey } from "@/utils/path-key"
68-
import { displayName, effectiveWorkspaceOrder, errorMessage, latestRootSession, sortedRootSessions } from "./layout/helpers"
68+
import {
69+
displayName,
70+
effectiveWorkspaceOrder,
71+
errorMessage,
72+
latestRootSession,
73+
sortedRootSessions,
74+
} from "./layout/helpers"
6975
import {
7076
collectNewSessionDeepLinks,
7177
collectOpenProjectDeepLinks,
@@ -640,8 +646,7 @@ export default function Layout(props: ParentProps) {
640646
if (!expanded) continue
641647
const key = pathKey(directory)
642648
const project = projects.find(
643-
(item) =>
644-
pathKey(item.worktree) === key || item.sandboxes?.some((sandbox) => pathKey(sandbox) === key),
649+
(item) => pathKey(item.worktree) === key || item.sandboxes?.some((sandbox) => pathKey(sandbox) === key),
645650
)
646651
if (!project) continue
647652
if (project.vcs === "git" && layout.sidebar.workspaces(project.worktree)()) continue
@@ -1218,10 +1223,7 @@ export default function Layout(props: ParentProps) {
12181223
const key = pathKey(directory)
12191224
const project = layout.projects
12201225
.list()
1221-
.find(
1222-
(item) =>
1223-
pathKey(item.worktree) === key || item.sandboxes?.some((sandbox) => pathKey(sandbox) === key),
1224-
)
1226+
.find((item) => pathKey(item.worktree) === key || item.sandboxes?.some((sandbox) => pathKey(sandbox) === key))
12251227
if (project) return project.worktree
12261228

12271229
const known = Object.entries(store.workspaceOrder).find(
@@ -1634,7 +1636,7 @@ export default function Layout(props: ParentProps) {
16341636
})
16351637

16361638
const handleDelete = () => {
1637-
const leaveDeletedWorkspace = !!params.dir && pathKey(currentDir()) === pathKey(props.directory)
1639+
const leaveDeletedWorkspace = !!params.dir && pathKey(currentDir()) === pathKey(props.directory)
16381640
if (leaveDeletedWorkspace) {
16391641
navigateWithSidebarReset(`/${base64Encode(props.root)}/session`)
16401642
}
@@ -1863,9 +1865,7 @@ export default function Layout(props: ParentProps) {
18631865
const active = currentProject()
18641866
const directory = pathKey(active?.worktree ?? "") === pathKey(project.worktree) ? currentDir() : undefined
18651867
const extra =
1866-
directory &&
1867-
pathKey(directory) !== pathKey(local) &&
1868-
!dirs.some((item) => pathKey(item) === pathKey(directory))
1868+
directory && pathKey(directory) !== pathKey(local) && !dirs.some((item) => pathKey(item) === pathKey(directory))
18691869
? directory
18701870
: undefined
18711871
const pending = extra ? WorktreeState.get(extra)?.status === "pending" : false

packages/app/src/utils/persist.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ export const Persist = {
475475
},
476476
}
477477

478-
export function removePersisted(target: { storage?: string; legacyStorageNames?: string[]; key: string }, platform?: Platform) {
478+
export function removePersisted(
479+
target: { storage?: string; legacyStorageNames?: string[]; key: string },
480+
platform?: Platform,
481+
) {
479482
const isDesktop = platform?.platform === "desktop" && !!platform.storage
480483

481484
if (isDesktop) {
@@ -556,7 +559,9 @@ export function persisted<T>(
556559

557560
const current = currentStorage as AsyncStorage
558561
const legacyStore = legacyStorage as AsyncStorage | undefined
559-
const legacyStores = legacyStorageNames.map((name) => platform.storage?.(name) as AsyncStorage | undefined).filter((x) => !!x)
562+
const legacyStores = legacyStorageNames
563+
.map((name) => platform.storage?.(name) as AsyncStorage | undefined)
564+
.filter((x) => !!x)
560565

561566
const api: AsyncStorage = {
562567
getItem: async (key) => {

0 commit comments

Comments
 (0)