mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-30 07:51:07 -07:00
feat(ui): build interactive session browser component (#13351)
This commit is contained in:
@@ -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}]`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user