summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-07-21 20:52:02 +0000
committerGitHub <[email protected]>2025-07-21 20:52:02 +0000
commit1969d805f2fd559e2227a8822de5be66d3d8a184 (patch)
treee9a84b780a87a67778730b806fad0df770aebec6 /packages/cli/src/ui/components/ContextSummaryDisplay.tsx
parentd7a57d85a39535e84bba7e65eb02dcb627b9cb81 (diff)
[ide-mode] Use active files and selected text in user prompt (#4614)
Diffstat (limited to 'packages/cli/src/ui/components/ContextSummaryDisplay.tsx')
-rw-r--r--packages/cli/src/ui/components/ContextSummaryDisplay.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
index d1ef8135..626a2fa5 100644
--- a/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
+++ b/packages/cli/src/ui/components/ContextSummaryDisplay.tsx
@@ -7,7 +7,7 @@
import React from 'react';
import { Text } from 'ink';
import { Colors } from '../colors.js';
-import { type ActiveFile, type MCPServerConfig } from '@google/gemini-cli-core';
+import { type OpenFiles, type MCPServerConfig } from '@google/gemini-cli-core';
import path from 'path';
interface ContextSummaryDisplayProps {
@@ -16,7 +16,7 @@ interface ContextSummaryDisplayProps {
mcpServers?: Record<string, MCPServerConfig>;
blockedMcpServers?: Array<{ name: string; extensionName: string }>;
showToolDescriptions?: boolean;
- activeFile?: ActiveFile;
+ openFiles?: OpenFiles;
}
export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
@@ -25,7 +25,7 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
mcpServers,
blockedMcpServers,
showToolDescriptions,
- activeFile,
+ openFiles,
}) => {
const mcpServerCount = Object.keys(mcpServers || {}).length;
const blockedMcpServerCount = blockedMcpServers?.length || 0;
@@ -34,16 +34,16 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
geminiMdFileCount === 0 &&
mcpServerCount === 0 &&
blockedMcpServerCount === 0 &&
- !activeFile?.filePath
+ !openFiles?.activeFile
) {
return <Text> </Text>; // Render an empty space to reserve height
}
const activeFileText = (() => {
- if (!activeFile?.filePath) {
+ if (!openFiles?.activeFile) {
return '';
}
- return `Open File (${path.basename(activeFile.filePath)})`;
+ return `Open File (${path.basename(openFiles.activeFile)})`;
})();
const geminiMdText = (() => {