fix(coding-agent): dispose SDK example sessions

This commit is contained in:
Michael Yu
2026-05-10 23:40:12 +08:00
parent f348a06294
commit d68011dab1
12 changed files with 101 additions and 65 deletions

View File

@@ -39,9 +39,9 @@ for (const file of discovered) {
console.log(` - ${file.path} (${file.content.length} chars)`);
}
await createAgentSession({
const { session } = await createAgentSession({
resourceLoader: loader,
sessionManager: SessionManager.inMemory(),
});
console.log(`Session created with ${discovered.length + 1} context files`);
session.dispose();