calculate session files based on deltas

This commit is contained in:
Nikita Galaiko 2023-04-19 16:06:26 +02:00
parent 14bcfaa94d
commit fb41de695c

View File

@ -286,6 +286,7 @@
>
{#each $richSessions as session}
{@const isCurrent = session.id === $currentSessionId}
{@const filesChagned = new Set(session.deltas.map(([path]) => path)).size}
<li
id={isCurrent ? 'current-session' : ''}
class:bg-card-active={isCurrent}
@ -305,8 +306,8 @@
</div>
<span class="flex flex-row justify-between px-3 pb-3">
{Object.keys(session.files).length}
{Object.keys(session.files).length > 1 ? 'files' : 'file'}
{filesChagned}
{filesChagned !== 1 ? 'files' : 'file'}
</span>
{#if isCurrent}