Bryanmorgan/add tool source description (#856)

This commit is contained in:
Bryan Morgan 2025-06-08 19:07:05 -04:00 committed by GitHub
parent 31c14ea78f
commit 152af28a34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -423,8 +423,8 @@ Add any other context about the problem here.
it('should display only Gemini CLI tools (filtering out MCP tools)', async () => {
// Create mock tools - some with serverName property (MCP tools) and some without (Gemini CLI tools)
const mockTools = [
{ name: 'tool1' },
{ name: 'tool2' },
{ name: 'tool1', displayName: 'Tool1' },
{ name: 'tool2', displayName: 'Tool2' },
{ name: 'mcp_tool1', serverName: 'mcp-server1' },
{ name: 'mcp_tool2', serverName: 'mcp-server1' },
];
@ -447,7 +447,7 @@ Add any other context about the problem here.
2,
expect.objectContaining({
type: MessageType.INFO,
text: 'Available Gemini CLI tools:\n\ntool1\ntool2',
text: 'Available Gemini CLI tools:\n\nTool1\nTool2',
}),
expect.any(Number),
);

View File

@ -350,7 +350,7 @@ export const useSlashCommandProcessor = (
// Filter out MCP tools by checking if they have a serverName property
const geminiTools = tools.filter((tool) => !('serverName' in tool));
const geminiToolList = geminiTools.map((tool) => tool.name);
const geminiToolList = geminiTools.map((tool) => tool.displayName);
addMessage({
type: MessageType.INFO,

View File

@ -32,7 +32,7 @@ export class DiscoveredMCPTool extends BaseTool<ToolParams, ToolResult> {
) {
super(
name,
name,
`${serverToolName} (${serverName} MCP Server)`,
description,
parameterSchema,
true, // isOutputMarkdown