feat: group sidebar sessions by project
This commit is contained in:
@@ -1460,12 +1460,15 @@ function sendSessionList(ws) {
|
||||
for (const f of files) {
|
||||
try {
|
||||
const s = normalizeSession(JSON.parse(fs.readFileSync(path.join(SESSIONS_DIR, f), 'utf8')));
|
||||
const cwd = s.cwd || '';
|
||||
sessions.push({
|
||||
id: s.id,
|
||||
title: s.title || 'Untitled',
|
||||
updated: s.updated,
|
||||
hasUnread: !!s.hasUnread,
|
||||
agent: getSessionAgent(s),
|
||||
cwd,
|
||||
projectName: cwd ? path.basename(cwd.replace(/[\\/]+$/, '')) : '',
|
||||
isRunning: activeProcesses.has(s.id),
|
||||
});
|
||||
} catch {}
|
||||
|
||||
Reference in New Issue
Block a user