feat(ui): build interactive session browser component (#13351)

This commit is contained in:
bl-ue
2025-11-21 09:16:56 -07:00
committed by GitHub
parent 3370644ffe
commit b97661553f
9 changed files with 1907 additions and 604 deletions

View File

@@ -30,8 +30,12 @@ export async function listSessions(config: Config): Promise<void> {
.forEach((session, index) => {
const current = session.isCurrentSession ? ', current' : '';
const time = formatRelativeTime(session.lastUpdated);
const title =
session.firstUserMessage.length > 100
? session.firstUserMessage.slice(0, 97) + '...'
: session.firstUserMessage;
console.log(
` ${index + 1}. ${session.firstUserMessage} (${time}${current}) [${session.id}]`,
` ${index + 1}. ${title} (${time}${current}) [${session.id}]`,
);
});
}