fix: --continue pull the latest session id consistently (#918)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
Jase Kraft
2025-07-14 19:32:00 -05:00
committed by GitHub
parent 1cf1d1f634
commit 294a11752e
2 changed files with 14 additions and 14 deletions

View File

@@ -121,18 +121,19 @@ export namespace Storage {
}
const glob = new Bun.Glob("**/*")
export async function* list(prefix: string) {
export async function list(prefix: string) {
const dir = await state().then((x) => x.dir)
try {
for await (const item of glob.scan({
cwd: path.join(dir, prefix),
onlyFiles: true,
})) {
const result = path.join(prefix, item.slice(0, -5))
yield result
}
const result = await Array.fromAsync(
glob.scan({
cwd: path.join(dir, prefix),
onlyFiles: true,
}),
)
result.sort()
return result
} catch {
return
return []
}
}
}