From ec27a00a78c9661a94292dbe25e05bf601368924 Mon Sep 17 00:00:00 2001 From: Kevin Heis Date: Fri, 7 Nov 2025 07:16:49 -0800 Subject: [PATCH 1/2] Prioritize tool switcher based on usage analytics (#58341) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/tools/lib/all-tools.ts | 71 +++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/src/tools/lib/all-tools.ts b/src/tools/lib/all-tools.ts index 242d798ec749..55399ab720e2 100644 --- a/src/tools/lib/all-tools.ts +++ b/src/tools/lib/all-tools.ts @@ -5,33 +5,48 @@ export interface ToolsMapping { [key: string]: string } -/** - * All the tools available for the Tool Picker - */ +/* + All the tools available for the Tool Picker + + Ordered by usage analytics to prioritize most-used tools in the tool switcher. + This ensures popular tools appear before the "More" menu in the UnderlineNav component. + + Analytics Query (KQL): + ``` + docs_v0_preference_event + | where timestamp between (ago(180d) .. now()) + | where context.hostname == 'docs.github.com' + | where abs(totimespan(context.created - timestamp)) < 1h // bot filter + | summarize Count=count() by Name=preference_name, Value=preference_value + | order by Count desc + ``` + + Data as of 2025-11-04 (180-day window) +*/ export const allTools: ToolsMapping = { - agents: 'Agents', - api: 'API', - azure_data_studio: 'Azure Data Studio', - bash: 'Bash', - cli: 'GitHub CLI', - codespaces: 'Codespaces', - copilotcli: 'Copilot CLI', - curl: 'curl', - desktop: 'Desktop', - eclipse: 'Eclipse', - github_mobile: 'GitHub Mobile', - ides: 'IDEs', - importer_cli: 'GitHub Enterprise Importer CLI', - javascript: 'JavaScript', - jetbrains: 'JetBrains IDEs', - jetbrains_beta: 'JetBrains IDEs (Beta)', - mobile: 'Mobile', - skillsets: 'Skillsets', - vimneovim: 'Vim/Neovim', - powershell: 'PowerShell', - visualstudio: 'Visual Studio', - vscode: 'Visual Studio Code', - webui: 'Web browser', - windowsterminal: 'Windows Terminal', - xcode: 'Xcode', + vscode: 'Visual Studio Code', // 310,824 + jetbrains: 'JetBrains IDEs', // 306,982 + visualstudio: 'Visual Studio', // 232,736 + cli: 'GitHub CLI', // 186,254 + webui: 'Web browser', // 173,097 + eclipse: 'Eclipse', // 63,626 + desktop: 'Desktop', // 39,662 + vimneovim: 'Vim/Neovim', // 36,009 + azure_data_studio: 'Azure Data Studio', // 32,053 + xcode: 'Xcode', // 31,860 + curl: 'curl', // 17,798 + javascript: 'JavaScript', // 12,999 + windowsterminal: 'Windows Terminal', // 10,760 + codespaces: 'Codespaces', // 7,850 + api: 'API', // 3,248 + mobile: 'Mobile', // 3,186 + copilotcli: 'Copilot CLI', // 2,682 + bash: 'Bash', // 2,174 + powershell: 'PowerShell', // 2,002 + skillsets: 'Skillsets', // 1,471 + agents: 'Agents', // 957 + jetbrains_beta: 'JetBrains IDEs (Beta)', // No analytics data available + github_mobile: 'GitHub Mobile', // No analytics data available + ides: 'IDEs', // No analytics data available + importer_cli: 'GitHub Enterprise Importer CLI', // No analytics data available } From 1a71c916960be79afd39aedb27a4774c737fdaad Mon Sep 17 00:00:00 2001 From: Robert Sese <734194+rsese@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:51:50 -0600 Subject: [PATCH 2/2] install patch-package as devDependency (#58406) --- package-lock.json | 187 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 188 insertions(+) diff --git a/package-lock.json b/package-lock.json index 6372661a8521..147d6035613c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -166,6 +166,7 @@ "mockdate": "^3.0.5", "nock": "^14.0.4", "nodemon": "3.1.10", + "patch-package": "^8.0.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "robots-parser": "^3.0.1", @@ -5095,6 +5096,13 @@ "dev": true, "license": "0BSD" }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true, + "license": "BSD-2-Clause" + }, "node_modules/abbrev": { "version": "1.1.1", "dev": true, @@ -5988,6 +5996,22 @@ "fsevents": "~2.3.2" } }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/classnames": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", @@ -8404,6 +8428,16 @@ "node": ">= 0.8" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/flat": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/flat/-/flat-6.0.1.tgz", @@ -10284,6 +10318,26 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/json-stable-stringify": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.3.0.tgz", + "integrity": "sha512-qtYiSSFlwot9XHtF9bD9c7rwKjr+RecWT//ZnPvSmEjpV5mmPOCN4j8UjY5hbjNkOwZ/jQv3J6R1/pL7RwgMsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "isarray": "^2.0.5", + "jsonify": "^0.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "dev": true, @@ -10316,6 +10370,16 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "license": "Public Domain", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -10387,6 +10451,16 @@ "node": ">=0.10.0" } }, + "node_modules/klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.11" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -12997,6 +13071,109 @@ "node": ">= 0.8" } }, + "node_modules/patch-package": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.1.tgz", + "integrity": "sha512-VsKRIA8f5uqHQ7NGhwIna6Bx6D9s/1iXlA1hthBVBEbkq+t4kXD0HHt+rJhf/Z+Ci0F/HCB2hvn0qLdLG+Qxlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^4.1.2", + "ci-info": "^3.7.0", + "cross-spawn": "^7.0.3", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^10.0.0", + "json-stable-stringify": "^1.0.2", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.6", + "open": "^7.4.2", + "semver": "^7.5.3", + "slash": "^2.0.0", + "tmp": "^0.2.4", + "yaml": "^2.2.2" + }, + "bin": { + "patch-package": "index.js" + }, + "engines": { + "node": ">=14", + "npm": ">5" + } + }, + "node_modules/patch-package/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/patch-package/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/patch-package/node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/patch-package/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -15231,6 +15408,16 @@ "node": ">=14.0.0" } }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/package.json b/package.json index 6371b1144e7e..b28b2e83324e 100644 --- a/package.json +++ b/package.json @@ -311,6 +311,7 @@ "mockdate": "^3.0.5", "nock": "^14.0.4", "nodemon": "3.1.10", + "patch-package": "^8.0.1", "prettier": "^3.3.3", "rimraf": "^6.0.1", "robots-parser": "^3.0.1",