mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 16:02:24 +00:00
Merge branch 'tmp-2025-01-11' - resume scope toggle with async loading (#620)
This commit is contained in:
commit
9d49b4d4ed
9 changed files with 382 additions and 125 deletions
|
|
@ -636,12 +636,17 @@ const { session } = await createAgentSession({
|
|||
sessionManager: SessionManager.open("/path/to/session.jsonl"),
|
||||
});
|
||||
|
||||
// List available sessions
|
||||
const sessions = SessionManager.list(process.cwd());
|
||||
// List available sessions (async with optional progress callback)
|
||||
const sessions = await SessionManager.list(process.cwd());
|
||||
for (const info of sessions) {
|
||||
console.log(`${info.id}: ${info.firstMessage} (${info.messageCount} messages)`);
|
||||
console.log(`${info.id}: ${info.firstMessage} (${info.messageCount} messages, cwd: ${info.cwd})`);
|
||||
}
|
||||
|
||||
// List all sessions across all projects
|
||||
const allSessions = await SessionManager.listAll((loaded, total) => {
|
||||
console.log(`Loading ${loaded}/${total}...`);
|
||||
});
|
||||
|
||||
// Custom session directory (no cwd encoding)
|
||||
const customDir = "/path/to/my-sessions";
|
||||
const { session } = await createAgentSession({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue