From 18c3bf3a4206d5d3be41b2510ec3940760a15e9f Mon Sep 17 00:00:00 2001
From: Billy Biggs <bbiggs@google.com>
Date: Fri, 18 Jul 2025 20:45:00 +0200
Subject: Summarize extensions and MCP servers on startup (#3977)

---
 .../src/ui/components/ContextSummaryDisplay.tsx    | 34 ++++++++++++++++++----
 1 file changed, 29 insertions(+), 5 deletions(-)

(limited to 'packages/cli/src/ui/components/ContextSummaryDisplay.tsx')

diff --git a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
index 00a95e19..314e8ebd 100644
--- a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
+++ b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
@@ -13,6 +13,7 @@ interface ContextSummaryDisplayProps {
   geminiMdFileCount: number;
   contextFileNames: string[];
   mcpServers?: Record<string, MCPServerConfig>;
+  blockedMcpServers?: Array<{ name: string; extensionName: string }>;
   showToolDescriptions?: boolean;
 }
 
@@ -20,11 +21,17 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
   geminiMdFileCount,
   contextFileNames,
   mcpServers,
+  blockedMcpServers,
   showToolDescriptions,
 }) => {
   const mcpServerCount = Object.keys(mcpServers || {}).length;
+  const blockedMcpServerCount = blockedMcpServers?.length || 0;
 
-  if (geminiMdFileCount === 0 && mcpServerCount === 0) {
+  if (
+    geminiMdFileCount === 0 &&
+    mcpServerCount === 0 &&
+    blockedMcpServerCount === 0
+  ) {
     return <Text> </Text>; // Render an empty space to reserve height
   }
 
@@ -39,10 +46,27 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
     }`;
   })();
 
-  const mcpText =
-    mcpServerCount > 0
-      ? `${mcpServerCount} MCP server${mcpServerCount > 1 ? 's' : ''}`
-      : '';
+  const mcpText = (() => {
+    if (mcpServerCount === 0 && blockedMcpServerCount === 0) {
+      return '';
+    }
+
+    const parts = [];
+    if (mcpServerCount > 0) {
+      parts.push(
+        `${mcpServerCount} MCP server${mcpServerCount > 1 ? 's' : ''}`,
+      );
+    }
+
+    if (blockedMcpServerCount > 0) {
+      let blockedText = `${blockedMcpServerCount} blocked`;
+      if (mcpServerCount === 0) {
+        blockedText += ` MCP server${blockedMcpServerCount > 1 ? 's' : ''}`;
+      }
+      parts.push(blockedText);
+    }
+    return parts.join(', ');
+  })();
 
   let summaryText = 'Using ';
   if (geminiMdText) {
-- 
cgit v1.2.3

