Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions vscode-extension/src/automaticTools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"read_file",
"copilot_readFile",
"read",
"Read",
"view",
"view_image",
"copilot_viewImage",
Expand Down Expand Up @@ -95,7 +94,6 @@
"copilot_switchAgent",

"bash",
"Bash",

"vscode_editFile_internal",
"vscode_fetchWebPage_internal",
Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand Down
6 changes: 3 additions & 3 deletions vscode-extension/src/maturityScoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>(automaticToolIds);
const AUTOMATIC_TOOL_SET = new Set<string>((automaticToolIds as string[]).map(id => id.toLowerCase()));

/** Format a number with thousand separators for display. */
function fmt(n: number): string {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions vscode-extension/src/toolNames.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/src/webview/logviewer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions vscode-extension/src/webview/usage/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>(automaticToolIds as string[]);
const AUTOMATIC_TOOL_SET_WV = new Set<string>((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 {
Expand Down Expand Up @@ -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())
? `<span class="auto-badge" title="Automatic tool — Copilot uses this internally and it does not count toward fluency scoring">auto</span>`
: '';
return `
Expand Down
2 changes: 1 addition & 1 deletion vscode-extension/src/workspaceHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading