fix(app): prompt persistence and draft sessions (#33528)

This commit is contained in:
Brendan Allan 2026-06-24 01:50:19 +08:00 committed by GitHub
commit e04c5e72f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 154 additions and 32 deletions

View file

@ -185,7 +185,9 @@ function TargetDirectoryLayout(props: ParentProps) {
if (!search.draftId) return undefined
return tabs.store.find((tab): tab is DraftTab => tab.type === "draft" && tab.draftID === search.draftId)?.directory
})
const directory = createMemo<string | undefined>((prev) => prev ?? resolvedDirectory())
const directory = createMemo<string | undefined>((prev) =>
search.draftId ? resolvedDirectory() : (prev ?? resolvedDirectory()),
)
const home = () => !params.serverKey && !search.draftId
const targetDirectory = () => directory()!