Remove MCP Tips and reorganize MCP slash commands (#11387)

This commit is contained in:
Tommaso Sciortino
2025-10-17 12:35:14 -07:00
committed by GitHub
parent 6786684962
commit 7c086fe55b
8 changed files with 139 additions and 169 deletions
@@ -175,33 +175,36 @@ describe('mcpCommand', () => {
description: tool.description,
schema: tool.schema,
})),
showTips: true,
}),
expect.any(Number),
);
});
it('should display tool descriptions when desc argument is used', async () => {
await mcpCommand.action!(mockContext, 'desc');
const descSubCommand = mcpCommand.subCommands!.find(
(c) => c.name === 'desc',
);
await descSubCommand!.action!(mockContext, '');
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
expect.objectContaining({
type: MessageType.MCP_STATUS,
showDescriptions: true,
showTips: false,
}),
expect.any(Number),
);
});
it('should not display descriptions when nodesc argument is used', async () => {
await mcpCommand.action!(mockContext, 'nodesc');
const listSubCommand = mcpCommand.subCommands!.find(
(c) => c.name === 'list',
);
await listSubCommand!.action!(mockContext, '');
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
expect.objectContaining({
type: MessageType.MCP_STATUS,
showDescriptions: false,
showTips: false,
}),
expect.any(Number),
);