Remove ctrl-t binding for /mcp commands (#11372)

This commit is contained in:
Tommaso Sciortino
2025-10-17 09:42:09 -07:00
committed by GitHub
parent 0ded546a09
commit 795e5134c7
14 changed files with 5 additions and 52 deletions

View File

@@ -111,7 +111,6 @@ const createMockUIState = (overrides: Partial<UIState> = {}): UIState =>
showEscapePrompt: false,
ideContextState: null,
geminiMdFileCount: 0,
showToolDescriptions: false,
renderMarkdown: true,
filteredConsoleMessages: [],
sessionStats: {

View File

@@ -100,7 +100,6 @@ export const Composer = () => {
contextFileNames={contextFileNames}
mcpServers={config.getMcpServers()}
blockedMcpServers={config.getBlockedMcpServers()}
showToolDescriptions={uiState.showToolDescriptions}
/>
)
)}

View File

@@ -29,7 +29,6 @@ describe('<ContextSummaryDisplay />', () => {
geminiMdFileCount: 1,
contextFileNames: ['GEMINI.md'],
mcpServers: { 'test-server': { command: 'test' } },
showToolDescriptions: false,
ideContext: {
workspaceState: {
openFiles: [{ path: '/a/b/c' }],
@@ -41,7 +40,7 @@ describe('<ContextSummaryDisplay />', () => {
const { lastFrame } = renderWithWidth(120, baseProps);
const output = lastFrame();
expect(output).toContain(
'Using: 1 open file (ctrl+g to view) | 1 GEMINI.md file | 1 MCP server (ctrl+t to view)',
'Using: 1 open file (ctrl+g to view) | 1 GEMINI.md file | 1 MCP server',
);
// Check for absence of newlines
expect(output.includes('\n')).toBe(false);
@@ -54,7 +53,7 @@ describe('<ContextSummaryDisplay />', () => {
' Using:',
' - 1 open file (ctrl+g to view)',
' - 1 GEMINI.md file',
' - 1 MCP server (ctrl+t to view)',
' - 1 MCP server',
];
const actualLines = output.split('\n');
expect(actualLines).toEqual(expectedLines);

View File

@@ -16,7 +16,6 @@ interface ContextSummaryDisplayProps {
contextFileNames: string[];
mcpServers?: Record<string, MCPServerConfig>;
blockedMcpServers?: Array<{ name: string; extensionName: string }>;
showToolDescriptions?: boolean;
ideContext?: IdeContext;
}
@@ -25,7 +24,6 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
contextFileNames,
mcpServers,
blockedMcpServers,
showToolDescriptions,
ideContext,
}) => {
const { columns: terminalWidth } = useTerminalSize();
@@ -82,16 +80,7 @@ export const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps> = ({
}
parts.push(blockedText);
}
let text = parts.join(', ');
// Add ctrl+t hint when MCP servers are available
if (mcpServers && Object.keys(mcpServers).length > 0) {
if (showToolDescriptions) {
text += ' (ctrl+t to toggle)';
} else {
text += ' (ctrl+t to view)';
}
}
return text;
return parts.join(', ');
})();
const summaryParts = [openFilesText, geminiMdText, mcpText].filter(Boolean);

View File

@@ -254,7 +254,7 @@ describe('BaseSelectionList', () => {
});
});
describe('Scrolling and Pagination (maxItemsToShow)', () => {
describe.skip('Scrolling and Pagination (maxItemsToShow)', () => {
const longList = Array.from({ length: 10 }, (_, i) => ({
value: `Item ${i + 1}`,
label: `Item ${i + 1}`,

View File

@@ -270,10 +270,6 @@ export const McpStatus: React.FC<McpStatusProps> = ({
<Text color={theme.text.accent}>/mcp auth &lt;server-name&gt;</Text>{' '}
to authenticate with OAuth-enabled servers
</Text>
<Text>
{' '}- Press <Text color={theme.text.accent}>Ctrl+T</Text> to
toggle tool descriptions on/off
</Text>
</Box>
)}
</Box>

View File

@@ -150,8 +150,7 @@ A test server
- Use /mcp desc to show server and tool descriptions
- Use /mcp schema to show tool parameter schemas
- Use /mcp nodesc to hide descriptions
- Use /mcp auth <server-name> to authenticate with OAuth-enabled servers
- Press Ctrl+T to toggle tool descriptions on/off"
- Use /mcp auth <server-name> to authenticate with OAuth-enabled servers"
`;
exports[`McpStatus > renders correctly with unauthenticated OAuth status 1`] = `