diff --git a/vscode-extension/src/automaticTools.json b/vscode-extension/src/automaticTools.json index 6e7bf5db..c4dd0066 100644 --- a/vscode-extension/src/automaticTools.json +++ b/vscode-extension/src/automaticTools.json @@ -2,7 +2,6 @@ "read_file", "copilot_readFile", "read", - "Read", "view", "view_image", "copilot_viewImage", @@ -95,7 +94,6 @@ "copilot_switchAgent", "bash", - "Bash", "vscode_editFile_internal", "vscode_fetchWebPage_internal", diff --git a/vscode-extension/src/extension.ts b/vscode-extension/src/extension.ts index 5fd50731..ddb7d7ef 100644 --- a/vscode-extension/src/extension.ts +++ b/vscode-extension/src/extension.ts @@ -1021,7 +1021,7 @@ class CopilotTokenTracker implements vscode.Disposable { Object.keys(stats.today.toolCalls.byTool).forEach(tool => allTools.add(tool)); Object.keys(stats.last30Days.toolCalls.byTool).forEach(tool => allTools.add(tool)); Object.keys(stats.month.toolCalls.byTool).forEach(tool => allTools.add(tool)); - return Array.from(allTools).filter(tool => !this.toolNameMap[tool]).sort(); + return Array.from(allTools).filter(tool => !this.toolNameMap[tool] && !this.toolNameMap[tool.toLowerCase()]).sort(); } private async showUnknownMcpToolsBanner(): Promise { diff --git a/vscode-extension/src/maturityScoring.ts b/vscode-extension/src/maturityScoring.ts index 89540c95..42fe3b78 100644 --- a/vscode-extension/src/maturityScoring.ts +++ b/vscode-extension/src/maturityScoring.ts @@ -12,7 +12,7 @@ import automaticToolIds from './automaticTools.json'; /** Set of tool IDs that Copilot uses autonomously (reading files, searching, etc.). * These are excluded from fluency scoring since the user doesn't configure them. */ -const AUTOMATIC_TOOL_SET = new Set(automaticToolIds); +const AUTOMATIC_TOOL_SET = new Set((automaticToolIds as string[]).map(id => id.toLowerCase())); /** Format a number with thousand separators for display. */ function fmt(n: number): string { @@ -445,7 +445,7 @@ export function calculateFluencyScoreForTeamMember(fd: { const hasModelSwitching = fd.mixedTierSessions > 0 || switchingFrequency > 0; const hasAgentMode = fd.agentModeCount > 0; const toolCount = Object.keys(fd.toolCallsByTool).length; - const nonAutoToolCount = Object.keys(fd.toolCallsByTool).filter(t => !AUTOMATIC_TOOL_SET.has(t)).length; + const nonAutoToolCount = Object.keys(fd.toolCallsByTool).filter(t => !AUTOMATIC_TOOL_SET.has(t.toLowerCase())).length; const avgFilesPerSession = fd.filesPerEditCount > 0 ? fd.filesPerEditSum / fd.filesPerEditCount : 0; const avgApplyRate = fd.applyRateCount > 0 ? fd.applyRateSum / fd.applyRateCount : 0; const totalContextRefs = fd.ctxFile + fd.ctxSelection + fd.ctxSymbol + fd.ctxCodebase + fd.ctxWorkspace; @@ -861,7 +861,7 @@ export async function calculateMaturityScores(lastCustomizationMatrix: Workspace // Diverse tool usage in agent mode const toolCount = Object.keys(p.toolCalls.byTool).length; - const nonAutoToolCount = Object.keys(p.toolCalls.byTool).filter(t => !AUTOMATIC_TOOL_SET.has(t)).length; + const nonAutoToolCount = Object.keys(p.toolCalls.byTool).filter(t => !AUTOMATIC_TOOL_SET.has(t.toLowerCase())).length; if (p.modeUsage.agent >= 10 && nonAutoToolCount >= 3) { agStage = 3; } diff --git a/vscode-extension/src/toolNames.json b/vscode-extension/src/toolNames.json index 670908e8..47e1eec4 100644 --- a/vscode-extension/src/toolNames.json +++ b/vscode-extension/src/toolNames.json @@ -314,7 +314,6 @@ ,"grep": "Grep" ,"kill_terminal": "Kill Terminal" ,"read": "Read" - ,"Read": "Read" ,"view": "View" ,"vscode_editFile_internal": "VSCode Edit File (Internal)" ,"vscode_fetchWebPage_internal": "VSCode Fetch Web Page (Internal)" @@ -327,9 +326,7 @@ ,"nuget_get-nuget-solver": "NuGet: Get NuGet Solver" ,"webfetch": "Web Fetch" ,"write": "Write" - ,"Write": "Write" ,"edit": "Edit" - ,"Edit": "Edit" ,"multiedit": "Multi Edit" ,"question": "Question" ,"skill": "Skill" diff --git a/vscode-extension/src/webview/logviewer/main.ts b/vscode-extension/src/webview/logviewer/main.ts index 4d5448f2..f98475ad 100644 --- a/vscode-extension/src/webview/logviewer/main.ts +++ b/vscode-extension/src/webview/logviewer/main.ts @@ -86,7 +86,7 @@ function lookupToolName(id: string): string { if (!TOOL_NAME_MAP) { return id; } - return TOOL_NAME_MAP[id] || id; + return TOOL_NAME_MAP[id] ?? TOOL_NAME_MAP[id.toLowerCase()] ?? id; } function escapeHtml(text: string): string { diff --git a/vscode-extension/src/webview/usage/main.ts b/vscode-extension/src/webview/usage/main.ts index 9dae01f5..1301d31b 100644 --- a/vscode-extension/src/webview/usage/main.ts +++ b/vscode-extension/src/webview/usage/main.ts @@ -172,13 +172,13 @@ import toolNames from '../../toolNames.json'; import automaticToolIds from '../../automaticTools.json'; let TOOL_NAME_MAP: { [key: string]: string } | null = toolNames || null; -const AUTOMATIC_TOOL_SET_WV = new Set(automaticToolIds as string[]); +const AUTOMATIC_TOOL_SET_WV = new Set((automaticToolIds as string[]).map(id => id.toLowerCase())); function lookupToolName(id: string): string { if (!TOOL_NAME_MAP) { return id; } - return TOOL_NAME_MAP[id] || id; + return TOOL_NAME_MAP[id] ?? TOOL_NAME_MAP[id.toLowerCase()] ?? id; } function lookupMcpToolName(id: string): string { @@ -304,7 +304,7 @@ function renderToolsTable(byTool: { [key: string]: number }, limit = 10, nameRes const rows = sortedTools.map(([tool, count], idx) => { const friendly = escapeHtml(nameResolver(tool)); const idEscaped = escapeHtml(tool); - const autoBadge = AUTOMATIC_TOOL_SET_WV.has(tool) + const autoBadge = AUTOMATIC_TOOL_SET_WV.has(tool.toLowerCase()) ? `auto` : ''; return ` diff --git a/vscode-extension/src/workspaceHelpers.ts b/vscode-extension/src/workspaceHelpers.ts index bbfc0668..40c51b6c 100644 --- a/vscode-extension/src/workspaceHelpers.ts +++ b/vscode-extension/src/workspaceHelpers.ts @@ -481,7 +481,7 @@ export function normalizeMcpToolName(toolName: string): string { */ export function extractMcpServerName(toolName: string, toolNameMap: { [key: string]: string } = {}): string { // First, try to get the display name from toolNames.json and extract the server part - const displayName = toolNameMap[toolName]; + const displayName = toolNameMap[toolName] ?? toolNameMap[toolName.toLowerCase()]; if (displayName && displayName.includes(':')) { // Extract the part before the colon (e.g., "GitHub MCP" from "GitHub MCP: Issue Read") return displayName.split(':')[0].trim();