diff options
| author | Billy Biggs <[email protected]> | 2025-06-21 12:15:43 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-21 19:15:43 +0000 |
| commit | 99a6dc026708d91bb628873a769c615640a2c0ea (patch) | |
| tree | afd188378b191f3dca11ae571d9f29095bc6e7b4 /packages/cli/src/ui/components/ContextSummaryDisplay.tsx | |
| parent | 03af6235a922c3cf753ce0b1e257830dee5340aa (diff) | |
Update memory and context summary UI for multiple context filenames (#1282)
Diffstat (limited to 'packages/cli/src/ui/components/ContextSummaryDisplay.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/ContextSummaryDisplay.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx index b277d0fc..548d1325 100644 --- a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx +++ b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx @@ -28,12 +28,16 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({ return <Text> </Text>; // Render an empty space to reserve height } - const geminiMdText = - geminiMdFileCount > 0 - ? `${geminiMdFileCount} ${contextFileNames[0]} file${ - geminiMdFileCount > 1 ? 's' : '' - }` - : ''; + const geminiMdText = (() => { + if (geminiMdFileCount === 0) { + return ''; + } + const allNamesTheSame = new Set(contextFileNames).size < 2; + const name = allNamesTheSame ? contextFileNames[0] : 'context'; + return `${geminiMdFileCount} ${name} file${ + geminiMdFileCount > 1 ? 's' : '' + }`; + })(); const mcpText = mcpServerCount > 0 |
