mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
feat(coding-agent): add resume scope toggle with async loading
- /resume and --resume now toggle between Current Folder and All sessions with Tab - SessionManager.list() and listAll() are now async with optional progress callback - Shows loading progress (e.g. Loading 5/42) while scanning sessions - SessionInfo.cwd field shows session working directory in All view - Lazy loading: All sessions only loaded when user presses Tab closes #619 Co-authored-by: Thomas Mustier <mustierthomas@gmail.com>
This commit is contained in:
parent
e8d91f2bd4
commit
302404684f
9 changed files with 263 additions and 117 deletions
|
|
@ -2876,11 +2876,10 @@ export class InteractiveMode {
|
|||
|
||||
private showSessionSelector(): void {
|
||||
this.showSelector((done) => {
|
||||
const currentSessions = SessionManager.list(this.sessionManager.getCwd(), this.sessionManager.getSessionDir());
|
||||
const allSessions = SessionManager.listAll();
|
||||
const selector = new SessionSelectorComponent(
|
||||
currentSessions,
|
||||
allSessions,
|
||||
(onProgress) =>
|
||||
SessionManager.list(this.sessionManager.getCwd(), this.sessionManager.getSessionDir(), onProgress),
|
||||
SessionManager.listAll,
|
||||
async (sessionPath) => {
|
||||
done();
|
||||
await this.handleResumeSession(sessionPath);
|
||||
|
|
@ -2892,6 +2891,7 @@ export class InteractiveMode {
|
|||
() => {
|
||||
void this.shutdown();
|
||||
},
|
||||
() => this.ui.requestRender(),
|
||||
);
|
||||
return { component: selector, focus: selector.getSessionList() };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue