Changed Files ({$files.length})
{#each groupedFiles as group} {@const isCollapsed = collapsedDirs.has(group.dir)} {@const dirFileCount = group.files.length} {#if groupedFiles.length > 1}
toggleDir(group.dir)} > ▸ {group.dir} ({dirFileCount})
{/if} {#if !isCollapsed} {#each group.files as file} {@const isSelected = $selectedFile === file.path} {@const commentCount = $fileCommentCounts[file.path] || 0}
selectFile(file.path)} oncontextmenu={(e) => handleContextMenu(e, file.path, file.status)} > {statusLabels[file.status]} {getFilename(file.path)} {#if file.additions > 0} +{file.additions} {/if} {#if file.deletions > 0} -{file.deletions} {/if} {#if commentCount > 0} {commentCount} {/if}
{/each} {/if} {/each}
{#if $contextFiles.length > 0 || showContextInput}
Context Files ({$contextFiles.length})
{#each $contextFiles as ctxFile}
📎 {ctxFile}
{/each}
{/if} {#if showContextInput}
{ if (e.key === 'Enter') addContextFromInput(); if (e.key === 'Escape') showContextInput = false; }} />
{/if}
{#if contextMenu}
{/if} {#if confirmingReset}
(confirmingReset = null)}>
e.stopPropagation()}>

Reset file?

{$files.find(f => f.path === confirmingReset)?.status === 'added' ? 'This will delete the file:' : 'This will discard all changes in:'}

{confirmingReset}

This action cannot be undone.

{/if}