sessions: multi-chat support for the local provider (#319315)
Local sessions can now host multiple chats. The parent->child hierarchy is stored entirely in the provider's own IStorageService metadata via a new `parentUri` field on the stored session, so it survives reloads with no extra dependencies. - getSessions() surfaces only primary chats; children are aggregated into their primary's group via a cached, live ISession whose `chats` observable re-derives on membership changes and whose status/updatedAt/isRead/ lastTurnEnd are aggregated across the group. - createNewChat(sessionId) on a committed session creates a linked child; sendRequest routes follow-ups (group id + child resource) to the child. A rejected/unsent child is rolled back and never persisted. - deleteChat removes a single child; deleting the primary (or last chat) tears down the whole group. On load, an orphaned child (missing parent) is promoted to a primary. - Multi-chat is always on (no setting). Adds 10 unit tests covering grouping, persistence/restore, orphan promotion, child/primary deletion, rejected-send rollback, and group status aggregation. Updates LOCAL_CHAT_SESSIONS_PROVIDER.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
S
Sandeep Somavarapu committed
a366fa6f9dcbb43b589ae302332a1402e5b1d4ff
Parent: b9b2d90
Committed by GitHub <noreply@github.com>
on 6/1/2026, 1:57:27 PM