657
*/
658
export function createDefaultChatSummary(session: SessionSummary, chatUri: ProtocolURI): ChatSummary {
660
>
resource: chatUri,
661
>
title: session.title,
662
>
status: session.status,
663
>
modifiedAt: session.modifiedAt,
664
>
origin: { kind: ChatOriginKind.User },
665
>
};
666
>
if (session.activity !== undefined) { summary.activity = session.activity; }
667
>
// `workingDirectories` is deliberately NOT copied: per the protocol it is a
668
>
// per-chat SUBSET override and, when absent, the chat inherits the session's
669
>
// full set of working directories (see `mergeSessionWithDefaultChat`).
670
>
// Seeding it here would denormalize the session default onto every chat as a
671
>
// fake override, which then goes stale when the session's working
672
>
// directories are resolved later (e.g. a worktree resolved at
673
>
// materialization). `primaryWorkingDirectory` is per-chat and fixed at chat
674
>
// creation (the session has no primary), so it is likewise not seeded here.
675
>
return summary;
676
>
}
677
678
/** Activity bits (0-4) of {@link SessionStatus}; the high bits carry orthogonal flags (IsRead / IsArchived). */