feat(session): make generated titles optional (#39747)

This commit is contained in:
Kit Langton 2026-07-30 21:24:34 -04:00 committed by GitHub
commit eb95bd27fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 215 additions and 64 deletions

View file

@ -213,7 +213,9 @@ export function make(input: { readonly client: OpenCodeClient; readonly connecti
sessions: page.data.map((session) => ({
sessionId: session.id,
cwd: session.location.directory,
title: session.title,
title:
session.title ??
`${session.parentID ? "Child" : "New"} session - ${new Date(session.time.created).toISOString()}`,
updatedAt: new Date(session.time.updated).toISOString(),
})),
...(page.cursor.next ? { nextCursor: page.cursor.next } : {}),