fix(coding-agent/session): switched session listing to async glob scanning
- Updated SessionManager.listAll to retrieve session files with Bun.Glob.scan instead of scanSync. - Awaited the async glob scan results via Array.fromAsync before collecting session metadata.
This commit is contained in:
@@ -2771,7 +2771,7 @@ export class SessionManager {
|
||||
static async listAll(storage: SessionStorage = new FileSessionStorage()): Promise<SessionInfo[]> {
|
||||
const sessionsRoot = path.join(getDefaultAgentDir(), "sessions");
|
||||
try {
|
||||
const files = Array.from(new Bun.Glob("**/*.jsonl").scanSync(sessionsRoot)).map(name =>
|
||||
const files = await Array.fromAsync(new Bun.Glob("*/*.jsonl").scan(sessionsRoot), name =>
|
||||
path.join(sessionsRoot, name),
|
||||
);
|
||||
return await collectSessionsFromFiles(files, storage);
|
||||
|
||||
Reference in New Issue
Block a user