Update memory and context summary UI for multiple context filenames (#1282)

This commit is contained in:
Billy Biggs 2025-06-21 12:15:43 -07:00 committed by GitHub
parent 03af6235a9
commit 99a6dc0267
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 25 deletions

View file

@ -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