Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/LICENSE +73 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/code-server +22 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/LICENSE.txt +43 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/package.json +1 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/readme.md +13 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-setup/SKILL.md +20 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/4to5.md +133 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/5to6.md +324 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/6to7.md +23 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/SKILL.md +77 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/dist/configurationEditingMain.js +0 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/package.json +1 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/package.nls.json +1 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/schemas/attachContainer.schema.json +1 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/LICENSE.txt +47 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/ThirdPartyNotices.txt +0 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/copilot.woff +0 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/debug-icon.svg +4 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-cost-tips.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-improve.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-reindex.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-search.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-standup.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-tips.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/plan.prompt.md +7 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/SKILL.md +83 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/agent-instructions.md +54 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/agents.md +145 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/hooks.md +96 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/instructions.md +71 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/prompts.md +80 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/skills.md +100 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/chronicle/SKILL.md +351 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-agent/SKILL.md +28 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-hook/SKILL.md +32 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-instructions/SKILL.md +30 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-prompt/SKILL.md +28 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-skill/SKILL.md +28 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/get-search-view-results/SKILL.md +10 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/init/SKILL.md +50 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/install-vscode-extension/SKILL.md +14 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/project-setup-info-context7/SKILL.md +11 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/project-setup-info-local/SKILL.md +127 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/troubleshoot/SKILL.md +271 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/changelog.md +0 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotCLIShim.js +4 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotCLITodoWorker.js +1 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotDebugCommand.js +6 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/diffWorker.js +0 -0
- home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/suggestionsPanelWebview.js +232 -0
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/LICENSE
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS
|
| 2 |
+
MICROSOFT VISUAL STUDIO CODE REMOTE DEVELOPMENT EXTENSIONS
|
| 3 |
+
|
| 4 |
+
These license terms are an agreement between you and Microsoft Corporation (or based on where you live, one of its affiliates). They apply to the pre-release software named above. The terms also apply to any Microsoft services or updates for the software, except to the extent those have additional terms.
|
| 5 |
+
|
| 6 |
+
IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.
|
| 7 |
+
|
| 8 |
+
1. INSTALLATION AND USE RIGHTS.
|
| 9 |
+
a. General. You may use a copy of the software with each validly licensed copy of Microsoft Visual Studio Code. You may not use the software if you do not have a license for Microsoft Visual Studio Code. You may copy and install files from the software onto your application development devices, including physical devices and virtual machines or containers on those machines, whether on-premises or remote machines that are owned by you, hosted on Microsoft Azure for you, or dedicated solely to your use (collectively, “Development Devices”). You and others in your organization may use these files on your Development Devices solely to develop and test applications. For clarity, “applications” means applications developed by you and others in your organization who are each licensed to use Microsoft Visual Studio Code.
|
| 10 |
+
b. Demo Use. The uses permitted above include use of the software in demonstrating your applications.
|
| 11 |
+
c. Third Party Components. The software may include third party components with separate legal notices or governed by other agreements, as may be described in the ThirdPartyNotices file(s) accompanying the software.
|
| 12 |
+
d. Extensions. The software gives you the option to download other Microsoft and third party software packages from our extension marketplace or package managers. Those packages are under their own licenses, and not this agreement. Microsoft does not distribute, license or provide any warranties for any of the third party packages. By accessing or using our extension marketplace, you agree to the extension marketplace terms located at https://aka.ms/vsmarketplace-ToU.
|
| 13 |
+
|
| 14 |
+
2. PRE-RELEASE SOFTWARE. The software is a pre-release version. It may not work the way a final version of the software will. Microsoft may change it for the final, commercial version. We also may not release a commercial version. Microsoft is not obligated to provide maintenance, technical support or updates to you for the software.
|
| 15 |
+
|
| 16 |
+
3. ONLINE SERVICES IN THE SOFTWARE. Some features of the software make use of online services to provide you with updates to the software or extensions, to download or install additional software to enable use of this software, or to enable you to retrieve content, collaborate with others, or otherwise supplement your development. As used throughout this agreement, the term “software” includes these online service features.
|
| 17 |
+
|
| 18 |
+
4. DATA.
|
| 19 |
+
a. Data Collection. The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may opt-out of many of these scenarios, but not all, as described in the product documentation located at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting. There may also be some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
|
| 20 |
+
b. Processing of Personal Data. To the extent Microsoft is a processor or subprocessor of personal data in connection with the software, Microsoft makes the commitments in the European Union General Data Protection Regulation Terms of the Online Services Terms to all customers effective May 25, 2018, at https://go.microsoft.com/?linkid=9840733.
|
| 21 |
+
|
| 22 |
+
5. UPDATES. The software may periodically check for updates and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices.
|
| 23 |
+
|
| 24 |
+
6. FEEDBACK. If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement.
|
| 25 |
+
|
| 26 |
+
7. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. For example, if Microsoft technically limits or disables extensibility for the software, you may not extend the software by, among other things, loading or injecting into the software any non-Microsoft add-ins, macros, or packages; modifying the software registry settings; or adding features or functionality equivalent to that found in other Visual Studio products. You may not:
|
| 27 |
+
* work around any technical limitations in the software;
|
| 28 |
+
* reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included with the software;
|
| 29 |
+
* remove, minimize, block or modify any notices of Microsoft or its suppliers in the software;
|
| 30 |
+
* use the software in any way that is against the law;
|
| 31 |
+
* host, share, publish, rent or lease the software; or
|
| 32 |
+
* provide the software as a stand-alone or integrated offering or combine it with any of your applications for others to use.
|
| 33 |
+
|
| 34 |
+
8. SUPPORT SERVICES. Because the software is “as is,” we may not provide support services for it.
|
| 35 |
+
|
| 36 |
+
9. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
| 37 |
+
|
| 38 |
+
10. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users and end use. For further information on export restrictions, visit (aka.ms/exporting).
|
| 39 |
+
|
| 40 |
+
11. APPLICABLE LAW. If you acquired the software in the United States, Washington State law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its laws apply.
|
| 41 |
+
|
| 42 |
+
12. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
| 43 |
+
a. Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
|
| 44 |
+
b. Canada. If you acquired the software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
| 45 |
+
c. Germany and Austria.
|
| 46 |
+
(i) Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
|
| 47 |
+
(ii) Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
|
| 48 |
+
Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
|
| 49 |
+
|
| 50 |
+
13. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
| 51 |
+
|
| 52 |
+
14. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
| 53 |
+
|
| 54 |
+
15. LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
| 55 |
+
|
| 56 |
+
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
| 57 |
+
|
| 58 |
+
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
| 59 |
+
|
| 60 |
+
Please note: As the software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.
|
| 61 |
+
|
| 62 |
+
Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
|
| 63 |
+
|
| 64 |
+
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
|
| 65 |
+
|
| 66 |
+
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
|
| 67 |
+
|
| 68 |
+
Cette limitation concerne :
|
| 69 |
+
* tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
|
| 70 |
+
* les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
|
| 71 |
+
Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
|
| 72 |
+
|
| 73 |
+
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/bin/code-server
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env sh
|
| 2 |
+
#
|
| 3 |
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
| 4 |
+
#
|
| 5 |
+
|
| 6 |
+
case "$1" in
|
| 7 |
+
--inspect*) INSPECT="$1"; shift;;
|
| 8 |
+
esac
|
| 9 |
+
|
| 10 |
+
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
| 11 |
+
|
| 12 |
+
# Set rpath before changing the interpreter path
|
| 13 |
+
# Refs https://github.com/NixOS/patchelf/issues/524
|
| 14 |
+
if [ -n "$VSCODE_SERVER_CUSTOM_GLIBC_LINKER" ] && [ -n "$VSCODE_SERVER_CUSTOM_GLIBC_PATH" ] && [ -n "$VSCODE_SERVER_PATCHELF_PATH" ]; then
|
| 15 |
+
echo "Patching glibc from $VSCODE_SERVER_CUSTOM_GLIBC_PATH with $VSCODE_SERVER_PATCHELF_PATH..."
|
| 16 |
+
"$VSCODE_SERVER_PATCHELF_PATH" --set-rpath "$VSCODE_SERVER_CUSTOM_GLIBC_PATH" "$ROOT/node"
|
| 17 |
+
echo "Patching linker from $VSCODE_SERVER_CUSTOM_GLIBC_LINKER with $VSCODE_SERVER_PATCHELF_PATH..."
|
| 18 |
+
"$VSCODE_SERVER_PATCHELF_PATH" --set-interpreter "$VSCODE_SERVER_CUSTOM_GLIBC_LINKER" "$ROOT/node"
|
| 19 |
+
echo "Patching complete."
|
| 20 |
+
fi
|
| 21 |
+
|
| 22 |
+
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" "$@"
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/LICENSE.txt
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This license applies to the JS/TS Chat Features product. This downloadable extension includes packages and features added by Microsoft as described in README.md.
|
| 2 |
+
|
| 3 |
+
MICROSOFT SOFTWARE LICENSE TERMS
|
| 4 |
+
MICROSOFT JS/TS CHAT FEATURES
|
| 5 |
+
________________________________________
|
| 6 |
+
These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
|
| 7 |
+
1. INSTALLATION AND USE RIGHTS.
|
| 8 |
+
a) General. You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications.
|
| 9 |
+
b) Third Party Components. The software may include third party components with separate legal notices or governed by other agreements, as may be described in the ThirdPartyNotices file(s) accompanying the software.
|
| 10 |
+
2. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. For clarification Microsoft, or its licensors, retains ownership of all aspects of the software. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. For example, if Microsoft technically limits or disables extensibility for the software, you may not extend the software by, among other things, loading or injecting into the software any non-Microsoft add-ins, macros, or packages; modifying the software registry settings; or adding features or functionality equivalent to that found in Microsoft products and services. You may not:
|
| 11 |
+
a) work around any technical limitations in the software that only allow you to use it in certain ways;
|
| 12 |
+
b) reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software;
|
| 13 |
+
c) remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;
|
| 14 |
+
d) use the software in any way that is against the law or to create or propagate malware; or
|
| 15 |
+
e) share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.
|
| 16 |
+
3. DATA.
|
| 17 |
+
a) Data Collection. The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may opt-out of many of these scenarios, but not all, as described in the product documentation. There are also some features in the software that may enable you to collect data from users of your applications. If you use these features to enable data collection in your applications, you must comply with applicable law, including providing appropriate notices to users of your applications. You can learn more about data collection and use in the help documentation and the privacy statement at https://aka.ms/privacy. Your use of the software operates as your consent to these practices.
|
| 18 |
+
b) Processing of Personal Data. To the extent Microsoft is a processor or subprocessor of personal data in connection with the software, Microsoft makes the commitments in the European Union General Data Protection Regulation Terms of the Online Services Terms to all customers effective May 25, 2018, at https://docs.microsoft.com/en-us/legal/gdpr.
|
| 19 |
+
4. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit https://aka.ms/exporting.
|
| 20 |
+
5. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the software. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
| 21 |
+
6. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the software.
|
| 22 |
+
7. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired the software in any other country, its laws apply. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court. If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court.
|
| 23 |
+
8. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
| 24 |
+
a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
|
| 25 |
+
b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
| 26 |
+
c) Germany and Austria.
|
| 27 |
+
i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
|
| 28 |
+
ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
|
| 29 |
+
Subject to the foregoing clause ii., Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
|
| 30 |
+
9. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
| 31 |
+
10. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES.
|
| 32 |
+
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
|
| 33 |
+
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
|
| 34 |
+
|
| 35 |
+
Please note: As this software is distributed in Canada, some of the clauses in this agreement are provided below in French.
|
| 36 |
+
Remarque: Ce logiciel étant distribué au Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
|
| 37 |
+
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
|
| 38 |
+
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
|
| 39 |
+
Cette limitation concerne:
|
| 40 |
+
• tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers; et
|
| 41 |
+
• les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
|
| 42 |
+
Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
|
| 43 |
+
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"name":"jsts-chat-features","displayName":"JS/TS Chat Features","description":"Provides extensions to VS Family to improve the Copilot experience in JavaScript and TypeScript contexts","publisher":"TypeScriptTeam","author":"Microsoft Corp.","private":true,"version":"0.0.4","icon":"logo.png","license":"SEE LICENSE IN LICENSE.txt","engines":{"vscode":"^1.109.0"},"categories":["AI","Programming Languages"],"extensionKind":["workspace"],"contributes":{"chatSkills":[{"path":"./skills/typescript-setup/SKILL.md","when":"config.jsts-chat-features.skills.enabled"},{"path":"./skills/typescript-update/SKILL.md","when":"config.jsts-chat-features.skills.enabled"}],"configuration":{"title":"JS/TS Chat Features","type":"object","properties":{"jsts-chat-features.skills.enabled":{"type":"boolean","tags":["onExp"],"default":false,"description":"These skills provide helpful prompts and features to enhance your experience when using Copilot to work with JavaScript and TypeScript."}}}},"files":["LICENSE.txt","README.md","logo.png","skills/typescript-setup/SKILL.md","skills/typescript-update/SKILL.md","skills/typescript-update/4to5.md","skills/typescript-update/5to6.md","skills/typescript-update/6to7.md"],"__metadata":{"id":"7d881d23-233c-448d-9700-cf11a0de79c2","publisherId":{"publisherId":"4f0355d2-4a53-4ab1-a8ea-507f4a333a6f","publisherName":"ms-vscode","displayName":"Microsoft","flags":"verified"},"publisherDisplayName":"Microsoft"}}
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/readme.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# JavaScript/TypeScript Chat Features
|
| 2 |
+
|
| 3 |
+
This extension provides the following functionality:
|
| 4 |
+
|
| 5 |
+
## Skills
|
| 6 |
+
|
| 7 |
+
Skills offer Copilot Agent Mode additional information on how to perform certain tasks.
|
| 8 |
+
To enable skills, set the `jsts-chat-features.skills.enabled` configuration setting to `true`.
|
| 9 |
+
|
| 10 |
+
Currently available:
|
| 11 |
+
|
| 12 |
+
* The *TypeScript Setup Skill*, which offers better guidance on how to make a modern `tsconfig.json` for TypeScript projects
|
| 13 |
+
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-setup/SKILL.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: typescript-setup
|
| 3 |
+
description: How to set up a new TypeScript project
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
To set up a new repo with TypeScript, follow these steps unless you have reason to deviate from them:
|
| 7 |
+
|
| 8 |
+
* `npm install --save-dev typescript@latest` (or use the user's package manager of choice)
|
| 9 |
+
* Run `npx tsc --init` to create a `tsconfig.json` file
|
| 10 |
+
* Read the tsconfig.json it generates and make the edits suggested in that file:
|
| 11 |
+
* If running server-side or local scripts, add `node` to `types` and `npm install --save-dev @types/node`
|
| 12 |
+
* Set `rootDir` to `src` and `outDir` to `dist`
|
| 13 |
+
* If using vite, esbuild, or similar bundlers, set `moduleResolution` to `bundler`
|
| 14 |
+
* If you have more specific info from the bundler info, defer to it instead
|
| 15 |
+
* Create a `src` directory and add your TypeScript files there
|
| 16 |
+
* Add a build script to your `package.json` that runs `tsc`
|
| 17 |
+
* If using a bundler, add the appropriate build script for it as well
|
| 18 |
+
|
| 19 |
+
If you're running TypeScript code on the commandline, `tsx` is no longer necessary or recommended if node 22.18.0 or later is installed.
|
| 20 |
+
Enable `erasableSyntaxOnly` in the tsconfig and run e.g. `node src/index.ts` directly.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/4to5.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This document covers breaking changes introduced across TypeScript 4.0 through 4.9 that are likely to surface during a routine upgrade. These accumulate — upgrading from 4.0 to 5.0 means encountering all of them.
|
| 2 |
+
|
| 3 |
+
# TypeScript 4.x Changes
|
| 4 |
+
|
| 5 |
+
## `any`/`unknown` propagated in falsy positions
|
| 6 |
+
|
| 7 |
+
Previously `foo && somethingElse` where `foo` is `any`/`unknown` returned the type of `somethingElse`. Now it propagates `any`/`unknown`.
|
| 8 |
+
|
| 9 |
+
```diff
|
| 10 |
+
- // x was { someProp: string }
|
| 11 |
+
+ // x is now 'unknown'
|
| 12 |
+
let x = foo && somethingElse;
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
Fix: use `!!foo && someExpression` instead of `foo && someExpression`.
|
| 16 |
+
|
| 17 |
+
## Type parameter no longer optional in `Promise`:**
|
| 18 |
+
|
| 19 |
+
```diff
|
| 20 |
+
- new Promise(resolve => { resolve(); })
|
| 21 |
+
+ new Promise<void>(resolve => { resolve(); })
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
If `resolve()` is called without arguments, give `Promise` an explicit `void` type argument.
|
| 25 |
+
|
| 26 |
+
## Conditional spreads create optional properties
|
| 27 |
+
|
| 28 |
+
Object spreads like `{ ...(pet?.owner) }` now produce optional properties instead of a union type. This may cause type mismatches downstream. Correct fix is context-dependent.
|
| 29 |
+
|
| 30 |
+
## The `in` operator no longer allows primitive types on the right side
|
| 31 |
+
|
| 32 |
+
```ts
|
| 33 |
+
"foo" in 42 // Now an error
|
| 34 |
+
```
|
| 35 |
+
This is always a usercode bug.
|
| 36 |
+
|
| 37 |
+
## `.d.ts` extensions cannot be used in import paths:**
|
| 38 |
+
|
| 39 |
+
```diff
|
| 40 |
+
- import { Foo } from "./foo.d.ts";
|
| 41 |
+
+ import { Foo } from "./foo";
|
| 42 |
+
```
|
| 43 |
+
Remove the `.d.ts` suffix, replacing with `.js` if in a module mode that uses extensions.
|
| 44 |
+
|
| 45 |
+
## Always-truthy Promise checks (under `strictNullChecks`)
|
| 46 |
+
|
| 47 |
+
```ts
|
| 48 |
+
declare var p: Promise<number>;
|
| 49 |
+
if (p) { } // Error! Did you forget to use 'await'?
|
| 50 |
+
```
|
| 51 |
+
This is always a usercode bug.
|
| 52 |
+
|
| 53 |
+
## Union enums cannot be compared to arbitrary numbers
|
| 54 |
+
|
| 55 |
+
```ts
|
| 56 |
+
enum E { A = 0, B = 1 }
|
| 57 |
+
function f(x: E) {
|
| 58 |
+
if (x === -1) { } // Error! 'E' and '-1' have no overlap
|
| 59 |
+
}
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
Fix: use a type assertion `(x as number) === -1`, or this may be a usercode bug.
|
| 63 |
+
|
| 64 |
+
## `useUnknownInCatchVariables` enabled under `--strict`
|
| 65 |
+
|
| 66 |
+
Catch variables are now `unknown` instead of `any` when using `--strict`.
|
| 67 |
+
|
| 68 |
+
If the project has many errors as a result of this, turn off `useUnknownInCatchVariables`, otherwise add a `: any` (or e.g. `: Error`) type annotation where needed
|
| 69 |
+
|
| 70 |
+
## Inference changes from `Awaited` type
|
| 71 |
+
|
| 72 |
+
`Promise.all`, `Promise.race`, etc. now use the `Awaited` utility type. Explicit type arguments to these functions may need updating:
|
| 73 |
+
|
| 74 |
+
```diff
|
| 75 |
+
- Promise.all<boolean, boolean>(...)
|
| 76 |
+
+ Promise.all(...)
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Or use tuple type arguments:
|
| 80 |
+
|
| 81 |
+
```diff
|
| 82 |
+
- Promise.all<boolean, boolean>(...)
|
| 83 |
+
+ Promise.all<[boolean, boolean]>(...)
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Compiler options checking at root of `tsconfig.json`
|
| 87 |
+
|
| 88 |
+
It is now an error to add compiler option fields at the top level of `tsconfig.json` without a `compilerOptions` wrapper.
|
| 89 |
+
This is always a user misconfiguration, ask them what they meant to do.
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
## Stricter checks with template string expressions
|
| 93 |
+
|
| 94 |
+
Using a value constrained to `string | symbol` in a template string now errors:
|
| 95 |
+
|
| 96 |
+
```ts
|
| 97 |
+
function get<T, K extends keyof T>(obj: T, key: K) {
|
| 98 |
+
console.log(`${key}`); // Error if K could be symbol
|
| 99 |
+
}
|
| 100 |
+
```
|
| 101 |
+
If you can't fix this by changing the constraint to `string & keyof T`, then this is a usercode bug.
|
| 102 |
+
|
| 103 |
+
## Unconstrained generics no longer assignable to `{}`
|
| 104 |
+
|
| 105 |
+
Under `strictNullChecks`, an unconstrained type parameter `T` cannot be assigned where `null`/`undefined` are not legal:
|
| 106 |
+
|
| 107 |
+
```ts
|
| 108 |
+
function foo<T>(x: T) {
|
| 109 |
+
needsNotNullValue(x); // Error! T is not assignable to {}
|
| 110 |
+
}
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
Fix: add a constraint `<T extends {}>` (preferred), check for null/undefined at runtime, or use a non-null assertion.
|
| 114 |
+
|
| 115 |
+
# TypeScript 5.0 Specific Changes
|
| 116 |
+
|
| 117 |
+
## Decorators are now stage 3 standard
|
| 118 |
+
|
| 119 |
+
Legacy experimental decorators (`experimentalDecorators`) still work but the new decorator semantics are the default. Code using decorators may need adjustments if it was relying on the old metadata/parameter decorator behavior. You (the AI agent) will not be able to fix these; defer to the user if you think this is relevant.
|
| 120 |
+
|
| 121 |
+
## Removed compiler options/values
|
| 122 |
+
|
| 123 |
+
- `charset` - just remove, no one uses this anymore
|
| 124 |
+
- `target: ES3` - change to `ES5`
|
| 125 |
+
- `importsNotUsedAsValues` - remove
|
| 126 |
+
- `noImplicitUseStrict` - remove, this is no longer meaningful
|
| 127 |
+
- `noStrictGenericChecks` - remove and add type parameters where needed
|
| 128 |
+
- `keyofStringsOnly` - remove, use `string & keyof T` in lieu of `keyof T` where needed
|
| 129 |
+
- `suppressExcessPropertyErrors` - remove, use documented workarounds
|
| 130 |
+
- `suppressImplicitAnyIndexErrors` - remove, use documented workarounds
|
| 131 |
+
- `out` - change to `outFile`
|
| 132 |
+
- `preserveValueImports` - remove, use `verbatimModuleSyntax` instead *once you are on TS 6.0*
|
| 133 |
+
- `prepend` in project references - abort and tell the user they need to set up a bundler themselves
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/5to6.md
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This document covers breaking changes introduced across TypeScript 5.0 through 5.9 that are likely to surface during a routine upgrade. These accumulate — upgrading from 5.0 to 6.0 means encountering all of them.
|
| 2 |
+
## All enums are now union enums
|
| 3 |
+
|
| 4 |
+
Every `enum` member now gets its own unique type. Previously only enums with literal initializers were treated as union enums. This can break code that assigns computed/non-literal enum values across enum boundaries.
|
| 5 |
+
|
| 6 |
+
```ts
|
| 7 |
+
enum E { A = Math.random() }
|
| 8 |
+
declare let e: E;
|
| 9 |
+
declare let n: number;
|
| 10 |
+
e = n; // Error: Type 'number' is not assignable to type 'E'
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Fix: use an explicit cast `e = n as E` or restructure the code.
|
| 14 |
+
|
| 15 |
+
## `--module` and `--moduleResolution` must agree on Node.js settings
|
| 16 |
+
|
| 17 |
+
When using `node16` or `nodenext` for either `--module` or `--moduleResolution`, the other must also use a Node.js-related setting. Mismatches like `--module esnext --moduleResolution node16` are now rejected.
|
| 18 |
+
|
| 19 |
+
Fix: use `--module nodenext` alone, or use `--module esnext --moduleResolution bundler`.
|
| 20 |
+
|
| 21 |
+
## Consistent export checking for merged symbols in ambient contexts
|
| 22 |
+
|
| 23 |
+
When two declarations merge in ambient contexts (declaration files, `declare module` blocks), they must now agree on whether they are both exported.
|
| 24 |
+
|
| 25 |
+
```ts
|
| 26 |
+
declare module 'my-lib' {
|
| 27 |
+
export function foo(): void;
|
| 28 |
+
export {};
|
| 29 |
+
namespace foo { // Error: must also be exported
|
| 30 |
+
export function bar(): void;
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
Fix: add `export` to both, or remove `export {}` so all declarations are implicitly exported.
|
| 36 |
+
|
| 37 |
+
## `super` property accesses on instance fields now error
|
| 38 |
+
|
| 39 |
+
TypeScript now errors when `super.x` refers to a class field (as opposed to a prototype method), since this is undefined at runtime.
|
| 40 |
+
|
| 41 |
+
```ts
|
| 42 |
+
class Base {
|
| 43 |
+
myMethod = () => {};
|
| 44 |
+
}
|
| 45 |
+
class Derived extends Base {
|
| 46 |
+
call() {
|
| 47 |
+
super.myMethod(); // Error: 'super' cannot access instance fields
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
This is always a usercode bug.
|
| 53 |
+
|
| 54 |
+
## More accurate conditional type constraints
|
| 55 |
+
|
| 56 |
+
A conditional type like `T extends Foo ? A : B` where `T` is generic no longer eagerly resolves to the false branch when `T`'s constraint doesn't extend `Foo`. It produces a union instead.
|
| 57 |
+
|
| 58 |
+
```ts
|
| 59 |
+
type IsArray<T> = T extends any[] ? true : false;
|
| 60 |
+
function foo<U extends object>(x: IsArray<U>) {
|
| 61 |
+
let second: false = x; // Error (previously allowed)
|
| 62 |
+
}
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Fix: don't assume the conditional type resolves to a single branch when the type parameter is generic. This will likely be a complicated fix.
|
| 66 |
+
|
| 67 |
+
## More aggressive reduction of intersections with type variables and primitives
|
| 68 |
+
|
| 69 |
+
Intersections of type variables with primitives are now reduced more aggressively. `T & number` becomes `never` if `T`'s constraint is known to be incompatible with `number`.
|
| 70 |
+
|
| 71 |
+
```ts
|
| 72 |
+
function foo<T extends "abc" | "def">(x: T, num: number) {
|
| 73 |
+
let b = intersect(x, num); // Was 'T & number', now is 'never'
|
| 74 |
+
}
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
The correct fix is context-dependent.
|
| 78 |
+
|
| 79 |
+
## Errors when type-only imports conflict with local values (under `isolatedModules`)
|
| 80 |
+
|
| 81 |
+
A type-only import that has the same name as a local value declaration is now an error:
|
| 82 |
+
|
| 83 |
+
```ts
|
| 84 |
+
import { Something } from "./some/path";
|
| 85 |
+
let Something = 123; // Error under isolatedModules
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
Fix: add the `type` modifier to the import, or rename the local variable.
|
| 89 |
+
|
| 90 |
+
## Enum members cannot be named `Infinity`, `-Infinity`, or `NaN`
|
| 91 |
+
|
| 92 |
+
```ts
|
| 93 |
+
enum E {
|
| 94 |
+
Infinity = 0, // Error
|
| 95 |
+
NaN = 2, // Error
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
This is always a usercode bug.
|
| 100 |
+
|
| 101 |
+
## Inferred type predicates from `filter`-like callbacks
|
| 102 |
+
|
| 103 |
+
TypeScript now infers type predicates for filter-like functions. Code that relied on the wider pre-filter type may break:
|
| 104 |
+
|
| 105 |
+
```ts
|
| 106 |
+
// Previously: nums was (number | null)[]
|
| 107 |
+
// Now: nums is number[]
|
| 108 |
+
const nums = [1, 2, 3, null].filter(x => x !== null);
|
| 109 |
+
nums.push(null); // Error in 5.5+
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
Fix: add an explicit type annotation if the wider type was intended instead.
|
| 113 |
+
|
| 114 |
+
## Regular expression syntax checking
|
| 115 |
+
|
| 116 |
+
Invalid patterns, non-existent backreferences, and features unavailable at the configured `target` now produce errors:
|
| 117 |
+
|
| 118 |
+
```ts
|
| 119 |
+
let re = /@typedef \{import\((.+)\)\} \3/u;
|
| 120 |
+
// ~
|
| 121 |
+
// Error: backreference \3 refers to group that doesn't exist
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
Fix: correct the regex, if the intended meaning was clear, or upgrade `target` to the necessary ES version that supports the needed regex feature. Otherwise, treat as a usercode bug.
|
| 125 |
+
|
| 126 |
+
## Disallowed nullish and truthy checks
|
| 127 |
+
|
| 128 |
+
Expressions that are syntactically always truthy or always nullish now error:
|
| 129 |
+
|
| 130 |
+
```ts
|
| 131 |
+
if (/0x[0-9a-f]/) { } // Forgot to call .test(s) ?
|
| 132 |
+
if (x => 0) { } // Probably meant to write <=
|
| 133 |
+
value < options.max ?? 100; // Missing parens on right side
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
If the intended meaning was obvious (usually missing parens), fix it, otherwise flag as a usercode bug.
|
| 137 |
+
|
| 138 |
+
## Respecting file extensions and `package.json` inside `node_modules`
|
| 139 |
+
|
| 140 |
+
TypeScript now reads `.mjs`/`.cjs` extensions and `package.json` `"type"` fields inside `node_modules` in all module modes, not only under `node16`/`nodenext`. Previously-valid default imports from ESM packages may now error:
|
| 141 |
+
|
| 142 |
+
```ts
|
| 143 |
+
// May now fail if "dep" is ESM and this is a default import in a CJS context
|
| 144 |
+
import dep from "dep";
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
Fix: use namespace import `import * as dep from "dep"` or switch module settings.
|
| 148 |
+
|
| 149 |
+
## Correct `override` checks on computed properties
|
| 150 |
+
|
| 151 |
+
Computed properties marked `override` now properly check for the existence of a base class member, and `noImplicitOverride` now catches missing `override` on computed properties that shadow base members.
|
| 152 |
+
|
| 153 |
+
## Checks for never-initialized variables
|
| 154 |
+
|
| 155 |
+
Variables that are _never_ initialized (not just possibly uninitialized) now error when accessed from nested functions:
|
| 156 |
+
|
| 157 |
+
```ts
|
| 158 |
+
function foo() {
|
| 159 |
+
let result: number;
|
| 160 |
+
function printResult() {
|
| 161 |
+
console.log(result); // Error: used before assigned
|
| 162 |
+
}
|
| 163 |
+
}
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
Unless the fix is obvious, treat this as a usercode bug.
|
| 167 |
+
|
| 168 |
+
## `TypedArray`s are now generic over `ArrayBufferLike`
|
| 169 |
+
|
| 170 |
+
All `TypedArray` types (e.g. `Uint8Array`) now have a type parameter for the buffer type. This can break code using Node.js `Buffer`:
|
| 171 |
+
|
| 172 |
+
```
|
| 173 |
+
error TS2322: Type 'Buffer' is not assignable to type 'Uint8Array<ArrayBufferLike>'.
|
| 174 |
+
```
|
| 175 |
+
|
| 176 |
+
Fix: update `@types/node` to the latest version.
|
| 177 |
+
|
| 178 |
+
## Validated JSON imports in `--module nodenext`
|
| 179 |
+
|
| 180 |
+
JSON file imports now require an import attribute with `type: "json"`:
|
| 181 |
+
|
| 182 |
+
```diff
|
| 183 |
+
- import myConfig from "./myConfig.json";
|
| 184 |
+
+ import myConfig from "./myConfig.json" with { type: "json" };
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
Also, named exports from JSON are no longer available; use the `default` import instead.
|
| 188 |
+
|
| 189 |
+
## Granular checks for branches in return expressions
|
| 190 |
+
|
| 191 |
+
Each branch of a conditional expression in a `return` statement is now independently checked against the return type:
|
| 192 |
+
|
| 193 |
+
```ts
|
| 194 |
+
function getUrl(s: string): URL {
|
| 195 |
+
return cache.has(s) ? cache.get(s) : s;
|
| 196 |
+
// ~
|
| 197 |
+
// Error: 'string' is not assignable to 'URL'
|
| 198 |
+
}
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
Unless the fix is obvious, treat this as a usercode bug.
|
| 202 |
+
|
| 203 |
+
## Import assertions replaced by import attributes
|
| 204 |
+
|
| 205 |
+
The `assert` keyword is no longer accepted; use `with`:
|
| 206 |
+
|
| 207 |
+
```diff
|
| 208 |
+
- import data from "./data.json" assert { type: "json" };
|
| 209 |
+
+ import data from "./data.json" with { type: "json" };
|
| 210 |
+
```
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
# TypeScript 6.0 Migration
|
| 214 |
+
|
| 215 |
+
TypeScript 6.0 changes many defaults.
|
| 216 |
+
When upgrading to TS 6.0, you will want to explicitly set any config value that would be inferred differently to avoid unwanted changes.
|
| 217 |
+
|
| 218 |
+
| Setting | Old Default | New Default | Quick Fix |
|
| 219 |
+
| ------------------------------ | --------------------- | ------------------------ | --------------------------------------------------------- |
|
| 220 |
+
| `strict` | `false` | `true` | Add `"strict": false` to restore old behavior |
|
| 221 |
+
| `types` | `["*"]` (all @types) | `[]` (none) | Depends |
|
| 222 |
+
| `rootDir` | inferred from sources | `.` (tsconfig directory) | Add `"rootDir": "./src"` |
|
| 223 |
+
| `module` | `commonjs` | `esnext` | Determine correct setting based on project |
|
| 224 |
+
| `target` | `es5` | `es2025` | Set to ES6 if the project really needs to target ancient stacks |
|
| 225 |
+
| `noUncheckedSideEffectImports` | `false` | `true` | Set to `false` to restore old behavior *if needed* |
|
| 226 |
+
| `libReplacement` | `true` | `false` | Set to `true` to restore old behavior *if needed* |
|
| 227 |
+
|
| 228 |
+
During 6.0 migration, you *must* check `rootDir`. If all TS files are under `src`, you *must* set `rootDir` since otherwise TS will output to e.g. `./outDir/src` instead.
|
| 229 |
+
|
| 230 |
+
## `types` directives
|
| 231 |
+
|
| 232 |
+
With `types` defaulting to `[]`, you may need to add entries to this array depending on the intended global environment:
|
| 233 |
+
* `Buffer`, modules like `"fs"`, `"path"`, etc: Add `"node"`
|
| 234 |
+
* `describe`, `it`, etc: add the correct test framework (`"jest"`, `"mocha"`, etc)
|
| 235 |
+
|
| 236 |
+
## `'rootDir' is expected to contain all source files`**
|
| 237 |
+
|
| 238 |
+
Explicitly add the appropriate `rootDir`
|
| 239 |
+
```diff
|
| 240 |
+
{
|
| 241 |
+
"compilerOptions": {
|
| 242 |
+
+ "rootDir": "./src"
|
| 243 |
+
}
|
| 244 |
+
}
|
| 245 |
+
```
|
| 246 |
+
|
| 247 |
+
## Error: `Option 'moduleResolution' with value 'node10' is deprecated`** (or `classic`)
|
| 248 |
+
|
| 249 |
+
For Node.js projects:
|
| 250 |
+
|
| 251 |
+
```diff
|
| 252 |
+
{
|
| 253 |
+
"compilerOptions": {
|
| 254 |
+
- "module": "commonjs"
|
| 255 |
+
+ "module": "nodenext"
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
```
|
| 259 |
+
|
| 260 |
+
For web projects using a bundler:
|
| 261 |
+
|
| 262 |
+
```diff
|
| 263 |
+
{
|
| 264 |
+
"compilerOptions": {
|
| 265 |
+
- "module": "commonjs",
|
| 266 |
+
- "moduleResolution": "node10"
|
| 267 |
+
+ "module": "esnext",
|
| 268 |
+
+ "moduleResolution": "bundler"
|
| 269 |
+
}
|
| 270 |
+
}
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
## Error: `Option 'baseUrl' is deprecated`**
|
| 274 |
+
|
| 275 |
+
If you can simply remove `baseUrl`, do. However, if the tsconfig has `paths` entries, run `npx -y @andrewbranch/ts5to6 --fixBaseUrl tsconfig.json` to fix path mappings automatically
|
| 276 |
+
|
| 277 |
+
## Error: `Option 'outFile' is deprecated`
|
| 278 |
+
|
| 279 |
+
Abort and tell the user they need to use their own bundler now.
|
| 280 |
+
|
| 281 |
+
## Error: `Option 'module' with value 'amd' is deprecated`** (or `system`, `umd`):
|
| 282 |
+
|
| 283 |
+
Abort and tell the user they need to pick a new module format
|
| 284 |
+
|
| 285 |
+
## `Option 'esModuleInterop' cannot be set to 'false'` (or `allowSyntheticDefaultImports`)
|
| 286 |
+
|
| 287 |
+
These are always-on in TypeScript 6.0. Remove the explicit `false` setting. You may need to update imports:
|
| 288 |
+
|
| 289 |
+
```diff
|
| 290 |
+
- import * as express from "express";
|
| 291 |
+
+ import express from "express";
|
| 292 |
+
```
|
| 293 |
+
|
| 294 |
+
---
|
| 295 |
+
|
| 296 |
+
## Option 'downlevelIteration' is deprecated`
|
| 297 |
+
|
| 298 |
+
Only had effect on ES5 emit, which is also deprecated. Remove the setting from the config entirely.
|
| 299 |
+
|
| 300 |
+
## TS2307 on private package subpaths
|
| 301 |
+
|
| 302 |
+
**Symptom:** After switching `moduleResolution` to `bundler` (or `node16` / `nodenext`), imports that reach into a package's internals fail:
|
| 303 |
+
|
| 304 |
+
```
|
| 305 |
+
src/utils/zod.ts(3,26): error TS2307: Cannot find module 'zod/v4/core/util.cjs'
|
| 306 |
+
```
|
| 307 |
+
|
| 308 |
+
Under these resolvers TypeScript honors the package's `exports` map, so subpaths that the package does not publish are no longer reachable — even if the file exists on disk.
|
| 309 |
+
|
| 310 |
+
**Fix:**
|
| 311 |
+
|
| 312 |
+
Find the public `exports`-mapped path that exposes the same symbol.
|
| 313 |
+
Every well-maintained package publishes types through its `exports` map — the private subpath exists only for the package's own internal use. Look in order:
|
| 314 |
+
|
| 315 |
+
1. Check the package's top-level export (`import { X } from 'pkg'`).
|
| 316 |
+
2. Check documented sub-entry-points in the `exports` field of `package.json` (e.g. `zod/v4`, `zod/v4/core`).
|
| 317 |
+
3. Run `node -e "console.log(Object.keys(require('pkg/package.json').exports))"` to see all published paths at once.
|
| 318 |
+
4. Search the package's type declaration files for the symbol name to locate which public entry re-exports it.
|
| 319 |
+
|
| 320 |
+
Do **not** fall back to inlining a local copy of the type.
|
| 321 |
+
That creates drift and hides the real fix.
|
| 322 |
+
If you cannot locate a public re-export after the steps above, open the package's repo and search its `exports` map directly — it is almost always there under a different entry point than the one the code was using.
|
| 323 |
+
|
| 324 |
+
Do not work around this by disabling `exports` resolution or downgrading `moduleResolution`.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/6to7.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TypeScript 7.0 Migration
|
| 2 |
+
|
| 3 |
+
**Package name changed**: `typescript` → `@typescript/native-preview`
|
| 4 |
+
|
| 5 |
+
## Install
|
| 6 |
+
|
| 7 |
+
**npm:** `npm install -D @typescript/native-preview@latest`
|
| 8 |
+
**yarn:** `yarn add -D @typescript/native-preview@latest`
|
| 9 |
+
**pnpm:** `pnpm add -D @typescript/native-preview@latest`
|
| 10 |
+
|
| 11 |
+
## Upgrade Checklist
|
| 12 |
+
|
| 13 |
+
1. Install `@typescript/native-preview`
|
| 14 |
+
2. **Rename `tsc` → `tsgo` in `package.json` scripts** (only on the `@typescript/native-preview` hop; if the project is still on the `typescript` package, the build command stays `tsc`). Do this immediately after install and BEFORE building. Edit each non-`node_modules` `package.json` by hand: replace script values where `tsc` is being invoked as the compiler — use the trailing-space guard (`"tsc "` → `"tsgo "`) so tool names like `tsc-alias` and `tscpaths` are untouched. The literal `"tsc"` with no arguments should be left alone unless you are certain it is only a compiler call; if unsure, ask the user. If the project keeps both packages installed (see Compatibility Note), some `tsc` invocations may intentionally target the classic compiler — review each rewritten line before committing.
|
| 15 |
+
3. Build the project (e.g., `tsgo --noEmit` or the project's existing build script) to check for errors
|
| 16 |
+
4. Fix any deprecated feature errors — all TS6 deprecations are fully removed in TS7
|
| 17 |
+
|
| 18 |
+
## Compatibility Note
|
| 19 |
+
|
| 20 |
+
If tools require the TypeScript API (linters, formatters, bundlers generating `.d.ts` files), keep both packages installed:
|
| 21 |
+
```bash
|
| 22 |
+
npm install -D typescript @typescript/native-preview
|
| 23 |
+
```
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/TypeScriptTeam.jsts-chat-features/skills/typescript-update/SKILL.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: typescript-update
|
| 3 |
+
description: Guidance for updating to the newer versions of TypeScript. Use this when you need to upgrade TypeScript or as part of a larger dependency update process.
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
Your role is to upgrade TypeScript through each major version incrementally, fixing compilation errors at each step, until you reach the latest TypeScript version.
|
| 7 |
+
|
| 8 |
+
## How To Upgrade
|
| 9 |
+
|
| 10 |
+
Our plan is as follows:
|
| 11 |
+
|
| 12 |
+
* Verify that the current build is correctly building. Don't attempt to upgrade if you can't get the build to work.
|
| 13 |
+
* Read the project's `package.json` to determine the current `typescript` version
|
| 14 |
+
* Upgrade in this sequence, starting at whatever version is higher than where you started:
|
| 15 |
+
* 4.9, 5.0, 5.5, 5.9, 6.0, 7.0
|
| 16 |
+
* Fix any errors, consulting the version-specific guides if needed. Don't proceed until the build is clean at each step.
|
| 17 |
+
* Repeat until we've reached the latest version (which may be a .minor version, e.g. 7.1).
|
| 18 |
+
|
| 19 |
+
You should run unit tests, if they exist, when making possible runtime-affecting changes such as edits to module imports and exports.
|
| 20 |
+
Type definitions never affect runtime behavior, so don't bother running unit tests for them.
|
| 21 |
+
|
| 22 |
+
## Forbidden Fixes
|
| 23 |
+
|
| 24 |
+
Do not paper over upgrade errors with suppression escape hatches. Specifically:
|
| 25 |
+
|
| 26 |
+
- Do not use `ignoreDeprecations`. The target version will not support this option.
|
| 27 |
+
- Do not add `// @ts-ignore`, `// @ts-expect-error`, or `// @ts-nocheck` to silence new errors.
|
| 28 |
+
- Do not use `any` just to make an error go away.
|
| 29 |
+
- Do not disable `tsconfig.json` strictness flags (`strict`, `noImplicitAny`, `strictNullChecks`, `skipLibCheck`, etc.)
|
| 30 |
+
|
| 31 |
+
## Version-Specific Guidance
|
| 32 |
+
|
| 33 |
+
Additional files are provided to document version-specific changes and migration steps:
|
| 34 |
+
* [4to5.md](4to5.md) covers upgrading from 4.x to 5.0.
|
| 35 |
+
* [5to6.md](5to6.md) covers upgrading from 5.x to 6.0.
|
| 36 |
+
* [6to7.md](6to7.md) covers upgrading from 6.x to 7.0.
|
| 37 |
+
|
| 38 |
+
Many upgrades will be straightforward. Attempt to upgrade to each version in sequence, build, and then only consult these files if you encounter issues.
|
| 39 |
+
|
| 40 |
+
## Common Issues
|
| 41 |
+
|
| 42 |
+
All versions of TypeScript may include updates to the DOM. These are not specifically documented anywhere. Use your best judgment to determine how to fix these, keeping in mind that you should not be making runtime-affecting changes unless absolutely justified.
|
| 43 |
+
|
| 44 |
+
## Usercode Bugs
|
| 45 |
+
|
| 46 |
+
Newer versions TypeScript may sometimes find *unambiguous problems* in the user's code that were not caught by previous versions.
|
| 47 |
+
Sometimes you will be able to easily determine the correct fix (i.e. what was intended).
|
| 48 |
+
If you can't determine the correct fix, add a temporary `ts-ignore` comment to suppress the error so you can continue with the upgrade process:
|
| 49 |
+
```ts
|
| 50 |
+
// @ts-ignore BUG: This is always a runtime error! Fix as appropriate depending on intended meaning
|
| 51 |
+
const p = "foo" in 42;
|
| 52 |
+
```
|
| 53 |
+
When you're done, remove the `@ts-ignore` part of the comment, but leave behind the explanation of why the code is wrong.
|
| 54 |
+
Report all bugs you found in the summary.
|
| 55 |
+
|
| 56 |
+
## `@types` dependencies
|
| 57 |
+
|
| 58 |
+
You may need to update `@types` dependencies alongside the main TypeScript version.
|
| 59 |
+
Check the `package.json` for any `@types/` entries and update them to the latest version compatible with the corresponding core dependency.
|
| 60 |
+
|
| 61 |
+
## Version 7.0 Specifics
|
| 62 |
+
|
| 63 |
+
At time of writing, TypeScript 7.0 is hosted in the `@typescript/native-preview` package, and uses `tsgo` instead of `tsc` for compilation.
|
| 64 |
+
|
| 65 |
+
Check to see if `typescript@latest` is 7.0 or higher (this would mean TS 7 has been released). If so, proceed, treating it as a normal TS upgrade.
|
| 66 |
+
|
| 67 |
+
Otherwise, check if the project's build system is straightforward (e.g. just calls `tsc` in a few places), and if it is, ask the user if they want to try using the 7.0 TypeScript-go preview
|
| 68 |
+
|
| 69 |
+
## Summarize
|
| 70 |
+
|
| 71 |
+
After all version upgrades are complete, summarize for the user:
|
| 72 |
+
- Starting TypeScript version
|
| 73 |
+
- Ending TypeScript version
|
| 74 |
+
- Any notable edits you had to make
|
| 75 |
+
- Bugs in usercode you found
|
| 76 |
+
- Offer to remove the `// @ts-ignore` comments you added
|
| 77 |
+
- If you had to stop before reaching latest, explain what happened
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/dist/configurationEditingMain.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"name":"configuration-editing","displayName":"%displayName%","description":"%description%","version":"10.0.0","publisher":"vscode","license":"MIT","engines":{"vscode":"^1.0.0"},"icon":"images/icon.png","activationEvents":["onProfile","onProfile:github","onLanguage:json","onLanguage:jsonc"],"enabledApiProposals":["profileContentHandlers"],"main":"./dist/configurationEditingMain","browser":"./dist/browser/configurationEditingMain","capabilities":{"virtualWorkspaces":true,"untrustedWorkspaces":{"supported":true}},"contributes":{"languages":[{"id":"jsonc","extensions":[".code-workspace","language-configuration.json","icon-theme.json","color-theme.json"],"filenames":["settings.json","launch.json","tasks.json","mcp.json","keybindings.json","extensions.json","argv.json","profiles.json","devcontainer.json",".devcontainer.json"]},{"id":"json","extensions":[".code-profile"]}],"jsonValidation":[{"fileMatch":"vscode://defaultsettings/keybindings.json","url":"vscode://schemas/keybindings"},{"fileMatch":"%APP_SETTINGS_HOME%/keybindings.json","url":"vscode://schemas/keybindings"},{"fileMatch":"%APP_SETTINGS_HOME%/profiles/*/keybindings.json","url":"vscode://schemas/keybindings"},{"fileMatch":"vscode://defaultsettings/*.json","url":"vscode://schemas/settings/default"},{"fileMatch":"%APP_SETTINGS_HOME%/settings.json","url":"vscode://schemas/settings/user"},{"fileMatch":"%APP_SETTINGS_HOME%/profiles/*/settings.json","url":"vscode://schemas/settings/profile"},{"fileMatch":"%MACHINE_SETTINGS_HOME%/settings.json","url":"vscode://schemas/settings/machine"},{"fileMatch":"%APP_WORKSPACES_HOME%/*/workspace.json","url":"vscode://schemas/workspaceConfig"},{"fileMatch":"**/*.code-workspace","url":"vscode://schemas/workspaceConfig"},{"fileMatch":"**/argv.json","url":"vscode://schemas/argv"},{"fileMatch":"/.vscode/settings.json","url":"vscode://schemas/settings/folder"},{"fileMatch":"/.vscode/launch.json","url":"vscode://schemas/launch"},{"fileMatch":"/.vscode/tasks.json","url":"vscode://schemas/tasks"},{"fileMatch":"/.vscode/mcp.json","url":"vscode://schemas/mcp"},{"fileMatch":"%APP_SETTINGS_HOME%/tasks.json","url":"vscode://schemas/tasks"},{"fileMatch":"%APP_SETTINGS_HOME%/chatLanguageModels.json","url":"vscode://schemas/language-models"},{"fileMatch":"%APP_SETTINGS_HOME%/profiles/*/chatLanguageModels.json","url":"vscode://schemas/language-models"},{"fileMatch":"%APP_SETTINGS_HOME%/snippets/*.json","url":"vscode://schemas/snippets"},{"fileMatch":"%APP_SETTINGS_HOME%/prompts/*.toolsets.jsonc","url":"vscode://schemas/toolsets"},{"fileMatch":"%APP_SETTINGS_HOME%/profiles/*/snippets/.json","url":"vscode://schemas/snippets"},{"fileMatch":"%APP_SETTINGS_HOME%/sync/snippets/preview/*.json","url":"vscode://schemas/snippets"},{"fileMatch":"**/*.code-snippets","url":"vscode://schemas/global-snippets"},{"fileMatch":"/.vscode/extensions.json","url":"vscode://schemas/extensions"},{"fileMatch":"devcontainer.json","url":"https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json"},{"fileMatch":".devcontainer.json","url":"https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json"},{"fileMatch":"%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/nameConfigs/*.json","url":"./schemas/attachContainer.schema.json"},{"fileMatch":"%APP_SETTINGS_HOME%/globalStorage/ms-vscode-remote.remote-containers/imageConfigs/*.json","url":"./schemas/attachContainer.schema.json"},{"fileMatch":"**/quality/*/product.json","url":"vscode://schemas/vscode-product"}]},"repository":{"type":"git","url":"https://github.com/microsoft/vscode.git"}}
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/package.nls.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"displayName":"Configuration Editing","description":"Provides capabilities (advanced IntelliSense, auto-fixing) in configuration files like settings, launch, and extension recommendation files."}
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/configuration-editing/schemas/attachContainer.schema.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"$schema":"http://json-schema.org/draft-07/schema#","description":"Configures an attached to container","allowComments":true,"allowTrailingCommas":true,"type":"object","definitions":{"attachContainer":{"type":"object","properties":{"workspaceFolder":{"type":"string","description":"The path of the workspace folder inside the container."},"forwardPorts":{"type":"array","description":"Ports that are forwarded from the container to the local machine. Can be an integer port number, or a string of the format \"host:port_number\".","items":{"oneOf":[{"type":"integer","maximum":65535,"minimum":0},{"type":"string","pattern":"^([a-z0-9_-]+):(\\d{1,5})$"}]}},"portsAttributes":{"type":"object","patternProperties":{"(^\\d+(-\\d+)?$)|(.+)":{"type":"object","description":"A port, range of ports (ex. \"40000-55000\"), or regular expression (ex. \".+\\\\/server.js\"). For a port number or range, the attributes will apply to that port number or range of port numbers. Attributes which use a regular expression will apply to ports whose associated process command line matches the expression.","properties":{"onAutoForward":{"type":"string","enum":["notify","openBrowser","openBrowserOnce","openPreview","silent","ignore"],"enumDescriptions":["Shows a notification when a port is automatically forwarded.","Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.","Opens the browser when the port is automatically forwarded, but only the first time the port is forward during a session. Depending on your settings, this could open an embedded browser.","Opens a preview in the same window when the port is automatically forwarded.","Shows no notification and takes no action when this port is automatically forwarded.","This port will not be automatically forwarded."],"description":"Defines the action that occurs when the port is discovered for automatic forwarding","default":"notify"},"elevateIfNeeded":{"type":"boolean","description":"Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.","default":false},"label":{"type":"string","description":"Label that will be shown in the UI for this port.","default":"Application"},"requireLocalPort":{"type":"boolean","markdownDescription":"When true, a modal dialog will show if the chosen local port isn't used for forwarding.","default":false},"protocol":{"type":"string","enum":["http","https"],"description":"The protocol to use when forwarding this port."}},"default":{"label":"Application","onAutoForward":"notify"}}},"markdownDescription":"Set default properties that are applied when a specific port number is forwarded. For example:\n\n```\n\"3000\": {\n \"label\": \"Application\"\n},\n\"40000-55000\": {\n \"onAutoForward\": \"ignore\"\n},\n\".+\\\\/server.js\": {\n \"onAutoForward\": \"openPreview\"\n}\n```","defaultSnippets":[{"body":{"${1:3000}":{"label":"${2:Application}","onAutoForward":"notify"}}}],"additionalProperties":false},"otherPortsAttributes":{"type":"object","properties":{"onAutoForward":{"type":"string","enum":["notify","openBrowser","openPreview","silent","ignore"],"enumDescriptions":["Shows a notification when a port is automatically forwarded.","Opens the browser when the port is automatically forwarded. Depending on your settings, this could open an embedded browser.","Opens a preview in the same window when the port is automatically forwarded.","Shows no notification and takes no action when this port is automatically forwarded.","This port will not be automatically forwarded."],"description":"Defines the action that occurs when the port is discovered for automatic forwarding","default":"notify"},"elevateIfNeeded":{"type":"boolean","description":"Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is required if the local port is a privileged port.","default":false},"label":{"type":"string","description":"Label that will be shown in the UI for this port.","default":"Application"},"requireLocalPort":{"type":"boolean","markdownDescription":"When true, a modal dialog will show if the chosen local port isn't used for forwarding.","default":false},"protocol":{"type":"string","enum":["http","https"],"description":"The protocol to use when forwarding this port."}},"defaultSnippets":[{"body":{"onAutoForward":"ignore"}}],"markdownDescription":"Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`. For example:\n\n```\n{\n \"onAutoForward\": \"ignore\"\n}\n```","additionalProperties":false},"settings":{"$ref":"vscode://schemas/settings/machine","description":"Machine specific settings that should be copied into the container. These are only copied when connecting to the container for the first time."},"remoteEnv":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Remote environment variables. If these are used in the Integrated Terminal, make sure the 'Terminal > Integrated: Inherit Env' setting is enabled."},"remoteUser":{"type":"string","description":"The user VS Code Server will be started with. The default is the same user as the container."},"extensions":{"type":"array","description":"An array of extensions that should be installed into the container.","items":{"type":"string","pattern":"^([a-z0-9A-Z][a-z0-9A-Z-]*)\\.([a-z0-9A-Z][a-z0-9A-Z-]*)(@(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?$","errorMessage":"Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'."}},"userEnvProbe":{"type":"string","enum":["none","loginShell","loginInteractiveShell","interactiveShell"],"description":"User environment probe to run. The default is none."},"postAttachCommand":{"type":["string","array"],"description":"A command to run after attaching to the container. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell.","items":{"type":"string"}}}}},"allOf":[{"$ref":"#/definitions/attachContainer"}]}
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/LICENSE.txt
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GITHUB LICENSE TERMS FOR EXTENSIONS
|
| 2 |
+
|
| 3 |
+
© GitHub, Inc. (“GitHub”). All rights reserved.
|
| 4 |
+
|
| 5 |
+
These license terms are an agreement between you and GitHub. They apply to the extensions (“Extensions”) published by GitHub or its affiliates that enable access to services provided by GitHub, Inc. (“GitHub Services). If you comply with these license terms, you have the rights below. By using the Extensions, you accept these terms.
|
| 6 |
+
|
| 7 |
+
1. INSTALLATION AND USE RIGHTS.
|
| 8 |
+
a) General. You may install and use any number of copies of Extensions only with GitHub approved software to develop and test your applications.
|
| 9 |
+
b) GitHub Components. The Extensions contain libraries that enable you to interact with GitHub Services. You must separately obtain access to the desired functionality, and your use of GitHub Services is pursuant to the separate agreement(s) between you and GitHub, including any data collection provisions. Extensions may also include third-party components with separate legal notices or governed by other agreements, as may be described in the notices file(s) accompanying the software.
|
| 10 |
+
|
| 11 |
+
2. FEEDBACK. If you give feedback about Extensions to GitHub, you give to GitHub, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You will not give feedback that is subject to a license that requires GitHub to license its software or documentation to third parties because we include your feedback in them. These rights survive this license.
|
| 12 |
+
|
| 13 |
+
3. SCOPE OF LICENSE. Extensions are licensed, not sold. This license only gives you some rights to use Extensions. GitHub reserves all other rights. For clarification, GitHub or any applicable licensors retain ownership of all aspects of Extensions. Unless applicable law gives you more rights despite this limitation, you may use Extensions only as expressly permitted in this license. In doing so, you must comply with any technical limitations in Extensions that only allow you to use them in certain ways. You may not:
|
| 14 |
+
a) work around any technical limitations in Extensions that only allow you to use them in certain ways;
|
| 15 |
+
b) reverse engineer, decompile or disassemble Extensions, or otherwise attempt to derive the source code for Extensions, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in Extensions;
|
| 16 |
+
c) remove, minimize, block, or modify any notices of GitHub or its suppliers in Extensions;
|
| 17 |
+
d) use Extensions in any way that is against the law or to create or propagate malware;
|
| 18 |
+
e) share, publish, distribute, or lease Extensions; or
|
| 19 |
+
f) provide Extensions as a stand-alone offering or combine it with any of your applications for others to use, or transfer Extensions or this license to any third party.
|
| 20 |
+
|
| 21 |
+
4. DATA.
|
| 22 |
+
a) Data Collection. Extensions may collect information about you and your use of the software, and send that to GitHub or its affiliates (including Microsoft). GitHub or its affiliates may use this information to provide and improve the extensions and GitHub Services and their delivery to the software enabled by the Extensions and as otherwise described in the GitHub Privacy Statement at https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement.
|
| 23 |
+
b) Processing of Personal Data. To the extent GitHub is a processor or subprocessor of personal data in connection with the Extensions, GitHub makes the commitments in the GitHub Data Protection Agreement available at https://gh.io/dpa.
|
| 24 |
+
|
| 25 |
+
5. EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to Extensions, which include restrictions on destinations, end users, and end use.
|
| 26 |
+
|
| 27 |
+
6. SUPPORT SERVICES. GitHub is not obligated under this license to provide any support services for Extensions. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
| 28 |
+
|
| 29 |
+
7. ENTIRE AGREEMENT. Without limiting Section 1(b), this license, and any other terms GitHub may provide for supplements, updates, or third-party applications, is the entire agreement for Extensions.
|
| 30 |
+
|
| 31 |
+
8. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired Extensions in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this license, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles. If you acquired Extensions in any other country, its laws apply. If U.S. federal jurisdiction exists, you and GitHub consent to exclusive jurisdiction and venue in the federal court in King County, Washington; if not, you and GitHub consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington.
|
| 32 |
+
|
| 33 |
+
9. CONSUMER RIGHTS; REGIONAL VARIATIONS. This license describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. This Extensions License does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired Extensions in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
| 34 |
+
a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this license is intended to affect those rights.
|
| 35 |
+
b) Canada. You may stop receiving updates by turning off any applicable automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the Extensions will resume checking for and installing updates), or uninstalling Extensions. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
| 36 |
+
c) Germany and Austria.
|
| 37 |
+
i. Warranty. The properly licensed Extensions will perform substantially as described in any GitHub materials that accompany them. However, GitHub gives no contractual guarantee in relation to the licensed Extensions.
|
| 38 |
+
ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as in case of death or personal or physical injury, GitHub is liable according to the statutory law.
|
| 39 |
+
Subject to the foregoing clause ii., GitHub will only be liable for slight negligence if GitHub is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this license, the breach of which would endanger the purpose of this license and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, GitHub will not be liable for slight negligence.
|
| 40 |
+
|
| 41 |
+
10. DISCLAIMER OF WARRANTY. EXTENSIONS ARE LICENSED “AS IS.” YOU BEAR THE RISK OF USING THEM. GITHUB GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, GITHUB EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
| 42 |
+
|
| 43 |
+
11. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM GITHUB AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO $5.00 USD. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT, OR INCIDENTAL DAMAGES.
|
| 44 |
+
|
| 45 |
+
This limitation applies to (a) anything related to Extensions, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
|
| 46 |
+
|
| 47 |
+
It also applies even if GitHub knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/ThirdPartyNotices.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/copilot.woff
ADDED
|
Binary file (1.63 kB). View file
|
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/debug-icon.svg
ADDED
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-cost-tips.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:cost-tips
|
| 3 |
+
description: Get personalized tips to reduce token usage and Copilot cost
|
| 4 |
+
---
|
| 5 |
+
Analyze my recent chat session history and give me personalized, data-grounded tips to reduce token usage and Copilot cost. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema, and the Cost Tips workflow for finding expensive sessions, token-heavy patterns, and concrete habit changes.
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "cost-tips"` on every call.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-improve.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:improve
|
| 3 |
+
description: Improve agent instructions based on friction patterns in your session history
|
| 4 |
+
---
|
| 5 |
+
Analyze my recent chat session history for friction patterns and suggest improvements to my agent instructions file. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema, and the Improve workflow for detecting repeated failures, user corrections, and recurring friction across sessions, then proposing data-grounded additions to the project's agent instructions.
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "improve"` on every call.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-reindex.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:reindex
|
| 3 |
+
description: Rebuild the local session index and sync to cloud
|
| 4 |
+
---
|
| 5 |
+
Reindex my session store to pick up any missing sessions. Add 'force' to re-process already indexed sessions.
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "reindex"`.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-search.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:search
|
| 3 |
+
description: Search recent chat sessions by keyword, file path, or PR/issue ref
|
| 4 |
+
---
|
| 5 |
+
Search my Copilot session history for the query I provide — a keyword, a file path, or a PR/issue/commit ref — and list the matching sessions. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema (the `sessions` table primary key is `id`; conversation content lives in `turns`, not on `sessions`; on local SQLite use the FTS5 `search_index` table and select `session_id` directly — never join `search_index.rowid` to `turns.rowid`), and the Search workflow including the cloud perf rules (aggregate-once via `WITH hits ... JOIN sessions`, default 90-day window on `turns`).
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "search"` on every call.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-standup.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:standup
|
| 3 |
+
description: Generate a standup report from recent chat sessions
|
| 4 |
+
---
|
| 5 |
+
Generate a standup report from my recent coding sessions. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema, and the Standup workflow for summarizing the last 24h of activity from `sessions`, `session_refs`, `turns`, and `session_files`.
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "standup"` on every call.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/chronicle-tips.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle:tips
|
| 3 |
+
description: Get personalized tips based on your chat session usage patterns
|
| 4 |
+
---
|
| 5 |
+
Analyze my recent chat session history and give me personalized tips to improve my workflow. Use the **chronicle** skill — it documents the `copilot_sessionStoreSql` tool, the session-store schema, and the Tips workflow for investigating usage patterns from `sessions`, `turns`, `session_files`, and `session_refs`.
|
| 6 |
+
|
| 7 |
+
When you invoke `copilot_sessionStoreSql`, set `subcommand: "tips"` on every call.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/plan.prompt.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: plan
|
| 3 |
+
description: Research and plan with the Plan agent
|
| 4 |
+
agent: Plan
|
| 5 |
+
argument-hint: Describe what you want to plan or research
|
| 6 |
+
---
|
| 7 |
+
Plan my task.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/SKILL.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: agent-customization
|
| 3 |
+
user-invocable: false # don't show as slash command, we have sepcialized create-agent, create-instructions, create-hook prompts for that
|
| 4 |
+
description: '**WORKFLOW SKILL** — Create, update, review, fix, or debug VS Code agent customization files (.instructions.md, .prompt.md, .agent.md, SKILL.md, copilot-instructions.md, AGENTS.md). USE FOR: saving coding preferences; troubleshooting why instructions/skills/agents are ignored or not invoked; configuring applyTo patterns; defining tool restrictions; creating custom agent modes or specialized workflows; packaging domain knowledge; fixing YAML frontmatter syntax. DO NOT USE FOR: general coding questions (use default agent); runtime debugging or error diagnosis; MCP server configuration (use MCP docs directly); VS Code extension development. INVOKES: file system tools (read/write customization files), ask-questions tool (interview user for requirements), subagents for codebase exploration. FOR SINGLE OPERATIONS: For quick YAML frontmatter fixes or creating a single file from a known pattern, edit the file directly — no skill needed.'
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Agent Customization
|
| 8 |
+
|
| 9 |
+
## Decision Flow
|
| 10 |
+
|
| 11 |
+
| Primitive | When to Use |
|
| 12 |
+
|-----------|-------------|
|
| 13 |
+
| agent instructions | Always-on, applies everywhere in the project |
|
| 14 |
+
| File Instructions | Explicit via `applyTo` patterns, or on-demand via `description` |
|
| 15 |
+
| MCP | Integrates external systems, APIs, or data |
|
| 16 |
+
| Hooks | Deterministic shell commands at agent lifecycle points (block tools, auto-format, inject context) |
|
| 17 |
+
| Custom Agents | Subagents for context isolation, or multi-stage workflows with tool restrictions |
|
| 18 |
+
| Prompts | Single focused task with parameterized inputs |
|
| 19 |
+
| Skills | On-demand workflow with bundled assets (scripts/templates) |
|
| 20 |
+
|
| 21 |
+
## Quick Reference
|
| 22 |
+
|
| 23 |
+
Consult the reference docs for templates, domain examples, advanced frontmatter options, asset organization, anti-patterns, and creation checklists. If the references are not enough, load the official documentation links for each primitive.
|
| 24 |
+
|
| 25 |
+
| Type | File | Location | Reference |
|
| 26 |
+
|------|------|----------|-----------|
|
| 27 |
+
| agent instructions | `copilot-instructions.md`, `AGENTS.md` | `.github/` or root | [Link](./references/agent-instructions.md) |
|
| 28 |
+
| File Instructions | `*.instructions.md` | `.github/instructions/` | [Link](./references/instructions.md) |
|
| 29 |
+
| Prompts | `*.prompt.md` | `.github/prompts/` | [Link](./references/prompts.md) |
|
| 30 |
+
| Hooks | `*.json` | `.github/hooks/` | [Link](./references/hooks.md) |
|
| 31 |
+
| Custom Agents | `*.agent.md` | `.github/agents/` | [Link](./references/agents.md) |
|
| 32 |
+
| Skills | `SKILL.md` | `.github/skills/<name>/`, `.agents/skills/<name>/`, `.claude/skills/<name>/` | [Link](./references/skills.md) |
|
| 33 |
+
|
| 34 |
+
**User-level**: `{{VSCODE_USER_PROMPTS_FOLDER}}/` (*.prompt.md, *.instructions.md, *.agent.md; not skills)
|
| 35 |
+
Customizations roam with user's settings sync
|
| 36 |
+
|
| 37 |
+
## Creation Process
|
| 38 |
+
|
| 39 |
+
If you need to explore or validate patterns in the codebase, use a read-only subagent. If the ask-questions tool is available, use it to interview the user and clarify requirements.
|
| 40 |
+
|
| 41 |
+
Follow these steps when creating any customization file.
|
| 42 |
+
|
| 43 |
+
### 1. Determine Scope
|
| 44 |
+
|
| 45 |
+
Ask the user where they want the customization:
|
| 46 |
+
- **Workspace**: For project-specific, team-shared customizations → `.github/` folder
|
| 47 |
+
- **User profile**: For personal, cross-workspace customizations → `{{VSCODE_USER_PROMPTS_FOLDER}}/`
|
| 48 |
+
|
| 49 |
+
### 2. Choose the Right Primitive
|
| 50 |
+
|
| 51 |
+
Use the Decision Flow above to select the appropriate file type based on the user's need.
|
| 52 |
+
|
| 53 |
+
### 3. Create the File
|
| 54 |
+
|
| 55 |
+
Create the file directly at the appropriate path:
|
| 56 |
+
- Use the location tables in each reference file
|
| 57 |
+
- Include required frontmatter as needed
|
| 58 |
+
- Add the body content following the templates
|
| 59 |
+
|
| 60 |
+
### 4. Validate
|
| 61 |
+
|
| 62 |
+
After creating:
|
| 63 |
+
- Confirm the file is in the correct location
|
| 64 |
+
- Verify frontmatter syntax (YAML between `---` markers)
|
| 65 |
+
- Check that `description` is present and meaningful
|
| 66 |
+
|
| 67 |
+
## Edge Cases
|
| 68 |
+
|
| 69 |
+
**Instructions vs Skill?** Does this apply to *most* work, or *specific* tasks? Most → Instructions. Specific → Skill.
|
| 70 |
+
|
| 71 |
+
**Skill vs Prompt?** Both appear as slash commands in chat (type `/`). Multi-step workflow with bundled assets → Skill. Single focused task with inputs → Prompt.
|
| 72 |
+
|
| 73 |
+
**Skill vs Custom Agent?** Same capabilities for all steps → Skill. Need context isolation (subagent returns single output) or different tool restrictions per stage → Custom Agent.
|
| 74 |
+
|
| 75 |
+
**Hooks vs Instructions?** Instructions *guide* agent behavior (non-deterministic). Hooks *enforce* behavior via shell commands at lifecycle events like `PreToolUse` or `PostToolUse` — they can block operations, require approval, or run formatters deterministically. Hooks can be defined in standalone `.json` files (see [hooks reference](./references/hooks.md)) or inline in custom agent frontmatter via the `hooks` attribute (see [agents reference](./references/agents.md)).
|
| 76 |
+
|
| 77 |
+
## Common Pitfalls
|
| 78 |
+
|
| 79 |
+
**Description is the discovery surface.** The `description` field is how the agent decides whether to load a skill, instruction, or agent. If trigger phrases aren't IN the description, the agent won't find it. Use the "Use when..." pattern with specific keywords.
|
| 80 |
+
|
| 81 |
+
**YAML frontmatter silent failures.** Unescaped colons in values, tabs instead of spaces, `name` that doesn't match folder name — all cause silent failures with no error message. Always quote descriptions that contain colons: `description: "Use when: doing X"`.
|
| 82 |
+
|
| 83 |
+
**`applyTo: "**"` burns context.** This means "always included for every file request" — it loads the instruction into the context window on every interaction, even when irrelevant. Use specific globs (`**/*.py`, `src/api/**`) unless the instruction truly applies to all files.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/agent-instructions.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [agent instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
| 2 |
+
|
| 3 |
+
Guidelines that automatically apply to all chat requests across your entire workspace.
|
| 4 |
+
|
| 5 |
+
## File Types (Choose One)
|
| 6 |
+
|
| 7 |
+
| File | Location | Purpose |
|
| 8 |
+
|------|----------|---------|
|
| 9 |
+
| `copilot-instructions.md` | `.github/` | Project-wide standards (recommended, cross-editor) |
|
| 10 |
+
| `AGENTS.md` | Root or subfolders | Open standard, monorepo hierarchy support |
|
| 11 |
+
|
| 12 |
+
Use **only one**—not both.
|
| 13 |
+
|
| 14 |
+
## Template
|
| 15 |
+
|
| 16 |
+
Only include sections the workspace benefits from:
|
| 17 |
+
|
| 18 |
+
```markdown
|
| 19 |
+
# Project Guidelines
|
| 20 |
+
|
| 21 |
+
## Code Style
|
| 22 |
+
{Language and formatting preferences—reference key files that exemplify patterns}
|
| 23 |
+
|
| 24 |
+
## Architecture
|
| 25 |
+
{Major components, service boundaries, the "why" behind structural decisions}
|
| 26 |
+
|
| 27 |
+
## Build and Test
|
| 28 |
+
{Commands to install, build, test—agents will attempt to run these}
|
| 29 |
+
|
| 30 |
+
## Conventions
|
| 31 |
+
{Patterns that differ from common practices—include specific examples}
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
For large repos, link to detailed docs instead of embedding: `See docs/TESTING.md for test conventions.`
|
| 35 |
+
|
| 36 |
+
## When to Use
|
| 37 |
+
|
| 38 |
+
- General coding standards that apply everywhere
|
| 39 |
+
- Team preferences shared through version control
|
| 40 |
+
- Project-wide requirements (testing, documentation)
|
| 41 |
+
|
| 42 |
+
## Core Principles
|
| 43 |
+
|
| 44 |
+
1. **Minimal by default**: Only what's relevant to *every* task
|
| 45 |
+
2. **Concise and actionable**: Every line should guide behavior
|
| 46 |
+
3. **Link, don't embed**: Reference docs instead of copying content. Search for existing docs (`docs/**/*.md`, `CONTRIBUTING.md`, etc.) and catalog what they cover—only inline agent-critical gotchas not documented elsewhere
|
| 47 |
+
4. **Keep current**: Update when practices change
|
| 48 |
+
|
| 49 |
+
## Anti-patterns
|
| 50 |
+
|
| 51 |
+
- **Using both file types**: Having both `copilot-instructions.md` and `AGENTS.md`
|
| 52 |
+
- **Kitchen sink**: Everything instead of what matters most
|
| 53 |
+
- **Duplicating docs**: Copying README instead of linking
|
| 54 |
+
- **Obvious instructions**: Conventions already enforced by linters
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/agents.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [Custom Agents (.agent.md)](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
| 2 |
+
|
| 3 |
+
Custom personas with specific tools, instructions, and behaviors. Use for orchestrated workflows with role-based tool restrictions.
|
| 4 |
+
|
| 5 |
+
## Locations
|
| 6 |
+
|
| 7 |
+
| Path | Scope |
|
| 8 |
+
|------|-------|
|
| 9 |
+
| `.github/agents/*.agent.md` | Workspace |
|
| 10 |
+
| `<profile>/agents/*.agent.md` | User profile |
|
| 11 |
+
|
| 12 |
+
## Frontmatter
|
| 13 |
+
|
| 14 |
+
```yaml
|
| 15 |
+
---
|
| 16 |
+
description: "<required>" # For agent picker and subagent discovery
|
| 17 |
+
name: "Agent Name" # Optional, defaults to filename
|
| 18 |
+
tools: [search, web] # Optional: aliases, MCP (<server>/*), extension tools
|
| 19 |
+
model: "Claude Sonnet 4" # Optional, uses picker default; supports array for fallback
|
| 20 |
+
argument-hint: "Task..." # Optional, input guidance
|
| 21 |
+
agents: [agent1, agent2] # Optional, restrict allowed subagents by name (omit = all, [] = none)
|
| 22 |
+
user-invocable: true # Optional, show in agent picker (default: true)
|
| 23 |
+
disable-model-invocation: false # Optional, prevent subagent invocation (default: false)
|
| 24 |
+
handoffs: [...] # Optional, transitions to other agents
|
| 25 |
+
hooks: # Optional, inline hooks for this agent's lifecycle events
|
| 26 |
+
PreToolUse:
|
| 27 |
+
- type: command
|
| 28 |
+
command: "./scripts/validate.sh"
|
| 29 |
+
PostToolUse:
|
| 30 |
+
- type: command
|
| 31 |
+
command: "./scripts/format.sh"
|
| 32 |
+
---
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
### Invocation Control
|
| 36 |
+
|
| 37 |
+
| Attribute | Default | Effect |
|
| 38 |
+
|-----------|---------|--------|
|
| 39 |
+
| `user-invocable: false` | `true` | Hide from agent picker, only accessible as subagent |
|
| 40 |
+
| `disable-model-invocation: true` | `false` | Prevent other agents from invoking as subagent |
|
| 41 |
+
|
| 42 |
+
### Model Fallback
|
| 43 |
+
|
| 44 |
+
```yaml
|
| 45 |
+
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)'] # First available model is used
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Tools
|
| 49 |
+
|
| 50 |
+
Sources: built-in aliases, specific tools, MCP servers (`<server>/*`), extension tools.
|
| 51 |
+
|
| 52 |
+
**Special**: `[]` = no tools, omit = defaults. Body reference: `#tool:<name>`
|
| 53 |
+
|
| 54 |
+
### Tool Aliases
|
| 55 |
+
|
| 56 |
+
| Alias | Purpose |
|
| 57 |
+
|-------|---------|
|
| 58 |
+
| `execute` | Run shell commands |
|
| 59 |
+
| `read` | Read file contents |
|
| 60 |
+
| `edit` | Edit files |
|
| 61 |
+
| `search` | Search files or text |
|
| 62 |
+
| `agent` | Invoke custom agents as subagents |
|
| 63 |
+
| `web` | Fetch URLs and web search |
|
| 64 |
+
| `todo` | Manage task lists |
|
| 65 |
+
|
| 66 |
+
### Common Patterns
|
| 67 |
+
|
| 68 |
+
```yaml
|
| 69 |
+
tools: [read, search] # Read-only research
|
| 70 |
+
tools: [myserver/*] # MCP server only
|
| 71 |
+
tools: [read, edit, search] # No terminal access
|
| 72 |
+
tools: [] # Conversational only
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
To discover available tools, check your current tool list or use `#tool:` syntax in the body to reference specific tools.
|
| 76 |
+
|
| 77 |
+
## Template
|
| 78 |
+
|
| 79 |
+
```markdown
|
| 80 |
+
---
|
| 81 |
+
description: "{Use when... trigger phrases for subagent discovery}"
|
| 82 |
+
tools: [{minimal set of tool aliases}]
|
| 83 |
+
user-invocable: false
|
| 84 |
+
---
|
| 85 |
+
You are a specialist at {specific task}. Your job is to {clear purpose}.
|
| 86 |
+
|
| 87 |
+
## Constraints
|
| 88 |
+
- DO NOT {thing this agent should never do}
|
| 89 |
+
- DO NOT {another restriction}
|
| 90 |
+
- ONLY {the one thing this agent does}
|
| 91 |
+
|
| 92 |
+
## Approach
|
| 93 |
+
1. {Step one of how this agent works}
|
| 94 |
+
2. {Step two}
|
| 95 |
+
3. {Step three}
|
| 96 |
+
|
| 97 |
+
## Output Format
|
| 98 |
+
{Exactly what this agent should return}
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
## Invocation
|
| 102 |
+
|
| 103 |
+
- **Manual**: Agent selector in chat
|
| 104 |
+
- **Subagent**: Parent agent delegates based on `description` match (when `infer` allows)
|
| 105 |
+
|
| 106 |
+
## Core Principles
|
| 107 |
+
|
| 108 |
+
1. **Single role**: One persona with focused responsibilities per agent
|
| 109 |
+
2. **Minimal tools**: Only include what the role needs—excess tools dilute focus
|
| 110 |
+
3. **Clear boundaries**: Define what the agent should NOT do
|
| 111 |
+
4. **Keyword-rich description**: Include trigger words so parent agents know when to delegate
|
| 112 |
+
|
| 113 |
+
## Anti-patterns
|
| 114 |
+
|
| 115 |
+
- **Swiss-army agents**: Too many tools, tries to do everything
|
| 116 |
+
- **Vague descriptions**: "A helpful agent" doesn't guide delegation—be specific
|
| 117 |
+
- **Role confusion**: Description doesn't match body persona
|
| 118 |
+
- **Circular handoffs**: A → B → A without progress criteria
|
| 119 |
+
|
| 120 |
+
## Inline Hooks
|
| 121 |
+
|
| 122 |
+
Custom agents support inline `hooks` in frontmatter. These hooks execute shell commands at agent lifecycle points and are scoped to this agent only. The format matches standalone hook files (see [hooks reference](../hooks.md)).
|
| 123 |
+
|
| 124 |
+
### Supported Events
|
| 125 |
+
|
| 126 |
+
`SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `SubagentStart`, `SubagentStop`, `Stop`
|
| 127 |
+
|
| 128 |
+
### Example
|
| 129 |
+
|
| 130 |
+
```yaml
|
| 131 |
+
---
|
| 132 |
+
description: "Secure code reviewer that blocks dangerous commands"
|
| 133 |
+
tools: [read, search, execute]
|
| 134 |
+
hooks:
|
| 135 |
+
PreToolUse:
|
| 136 |
+
- type: command
|
| 137 |
+
command: "./scripts/block-dangerous-cmds.sh"
|
| 138 |
+
timeout: 10
|
| 139 |
+
PostToolUse:
|
| 140 |
+
- type: command
|
| 141 |
+
command: "./scripts/auto-lint.sh"
|
| 142 |
+
---
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
Each hook command supports: `type` (must be `command`), `command`, platform overrides (`windows`, `linux`, `osx`), `cwd`, `env`, `timeout`.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/hooks.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [Hooks (.json)](https://code.visualstudio.com/docs/copilot/customization/hooks)
|
| 2 |
+
|
| 3 |
+
Deterministic lifecycle automation for agent sessions. Use hooks to enforce policy, automate validation, and inject runtime context.
|
| 4 |
+
|
| 5 |
+
## Locations
|
| 6 |
+
|
| 7 |
+
| Path | Scope |
|
| 8 |
+
|------|-------|
|
| 9 |
+
| `.github/hooks/*.json` | Workspace (team-shared) |
|
| 10 |
+
| `.claude/settings.local.json` | Workspace local (not committed) |
|
| 11 |
+
| `.claude/settings.json` | Workspace |
|
| 12 |
+
| `~/.claude/settings.json` | User profile |
|
| 13 |
+
|
| 14 |
+
Hooks from all configured locations are collected and executed; workspace and user hooks do not override each other.
|
| 15 |
+
|
| 16 |
+
## Hook Events
|
| 17 |
+
|
| 18 |
+
| Event | Trigger |
|
| 19 |
+
|------|-------|
|
| 20 |
+
| `SessionStart` | First prompt of a new agent session |
|
| 21 |
+
| `UserPromptSubmit` | User submits a prompt |
|
| 22 |
+
| `PreToolUse` | Before tool invocation |
|
| 23 |
+
| `PostToolUse` | After successful tool invocation |
|
| 24 |
+
| `PreCompact` | Before context compaction |
|
| 25 |
+
| `SubagentStart` | Subagent starts |
|
| 26 |
+
| `SubagentStop` | Subagent ends |
|
| 27 |
+
| `Stop` | Agent session ends |
|
| 28 |
+
|
| 29 |
+
## Configuration Format
|
| 30 |
+
|
| 31 |
+
```json
|
| 32 |
+
{
|
| 33 |
+
"hooks": {
|
| 34 |
+
"PreToolUse": [
|
| 35 |
+
{
|
| 36 |
+
"type": "command",
|
| 37 |
+
"command": "./scripts/validate-tool.sh",
|
| 38 |
+
"timeout": 15
|
| 39 |
+
}
|
| 40 |
+
]
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Each hook command supports:
|
| 46 |
+
- `type` (must be `command`)
|
| 47 |
+
- `command` (default)
|
| 48 |
+
- `windows`, `linux`, `osx` (platform overrides)
|
| 49 |
+
- `cwd`, `env`, `timeout`
|
| 50 |
+
|
| 51 |
+
## Input / Output Contract
|
| 52 |
+
|
| 53 |
+
Hooks receive JSON on stdin and can return JSON on stdout.
|
| 54 |
+
|
| 55 |
+
- Common output: `continue`, `stopReason`, `systemMessage`
|
| 56 |
+
- `PreToolUse` permissions are read from `hookSpecificOutput.permissionDecision` (`allow` | `ask` | `deny`)
|
| 57 |
+
- `PostToolUse` output can block further processing with `decision: block`
|
| 58 |
+
|
| 59 |
+
`PreToolUse` example output:
|
| 60 |
+
|
| 61 |
+
```json
|
| 62 |
+
{
|
| 63 |
+
"hookSpecificOutput": {
|
| 64 |
+
"hookEventName": "PreToolUse",
|
| 65 |
+
"permissionDecision": "ask",
|
| 66 |
+
"permissionDecisionReason": "Needs user confirmation"
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Exit codes:
|
| 72 |
+
- `0` success
|
| 73 |
+
- `2` blocking error
|
| 74 |
+
- Other values produce non-blocking warnings
|
| 75 |
+
|
| 76 |
+
## Hooks vs Other Customizations
|
| 77 |
+
|
| 78 |
+
| Primitive | Behavior |
|
| 79 |
+
|------|-------|
|
| 80 |
+
| Instructions / Prompts / Skills / Agents | Guidance (non-deterministic) |
|
| 81 |
+
| Hooks | Runtime enforcement and deterministic automation |
|
| 82 |
+
|
| 83 |
+
Use hooks when behavior must be guaranteed (for example: block dangerous commands, force validation, auto-inject context).
|
| 84 |
+
|
| 85 |
+
## Core Principles
|
| 86 |
+
|
| 87 |
+
1. Keep hooks small and auditable
|
| 88 |
+
2. Validate and sanitize hook inputs
|
| 89 |
+
3. Avoid hardcoded secrets in scripts
|
| 90 |
+
4. Prefer workspace hooks for team policy, user hooks for personal automation
|
| 91 |
+
|
| 92 |
+
## Anti-patterns
|
| 93 |
+
|
| 94 |
+
- Running long hooks that block normal flow
|
| 95 |
+
- Using hooks where plain instructions are sufficient
|
| 96 |
+
- Letting agents edit hook scripts without approval controls
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/instructions.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [File-Specific Instructions (.instructions.md)](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
| 2 |
+
|
| 3 |
+
Guidelines loaded on-demand when relevant to the current task, or explicitly when files match a pattern.
|
| 4 |
+
|
| 5 |
+
## Locations
|
| 6 |
+
|
| 7 |
+
| Path | Scope |
|
| 8 |
+
|------|-------|
|
| 9 |
+
| `.github/instructions/*.instructions.md` | Workspace |
|
| 10 |
+
| `<profile>/instructions/*.instructions.md` | User profile |
|
| 11 |
+
|
| 12 |
+
## Frontmatter
|
| 13 |
+
|
| 14 |
+
```yaml
|
| 15 |
+
---
|
| 16 |
+
description: "<required>" # For on-demand discovery—keyword-rich
|
| 17 |
+
name: "Instruction Name" # Optional, defaults to filename
|
| 18 |
+
applyTo: "**/*.ts" # Optional, auto-attach for matching files
|
| 19 |
+
---
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Discovery Modes
|
| 23 |
+
|
| 24 |
+
| Mode | Trigger | Use Case |
|
| 25 |
+
|------|---------|----------|
|
| 26 |
+
| **On-demand** (`description`) | Agent detects task relevance | Task-based: migrations, refactoring, API work |
|
| 27 |
+
| **Explicit** (`applyTo`) | Files matching glob in context | File-based: language standards, framework rules |
|
| 28 |
+
| **Manual** | `Add Context` → `Instructions` | Ad-hoc attachment |
|
| 29 |
+
|
| 30 |
+
## Template
|
| 31 |
+
|
| 32 |
+
```markdown
|
| 33 |
+
---
|
| 34 |
+
description: "Use when writing database migrations, schema changes, or data transformations. Covers safety checks and rollback patterns."
|
| 35 |
+
---
|
| 36 |
+
# Migration Guidelines
|
| 37 |
+
|
| 38 |
+
- Always create reversible migrations
|
| 39 |
+
- Test rollback before merging
|
| 40 |
+
- Never drop columns in the same release as code removal
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Note the "Use when..." pattern in the description—this helps on-demand discovery.
|
| 44 |
+
|
| 45 |
+
## Explicit File Matching (optional)
|
| 46 |
+
|
| 47 |
+
Use `applyTo` when the instruction applies to specific file types or folders:
|
| 48 |
+
|
| 49 |
+
```yaml
|
| 50 |
+
applyTo: "**" # ALWAYS included, no matter the file or description (use with caution)
|
| 51 |
+
applyTo: "**/*.py" # All Python files
|
| 52 |
+
applyTo: ["src/**", "lib/**"] # Multiple patterns (OR)
|
| 53 |
+
applyTo: src/**, lib/** # Multiple patterns without array syntax (OR)
|
| 54 |
+
applyTo: "src/api/**/*.ts" # Specific folder + extension
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Applied when creating or modifying matching files, not for read-only operations.
|
| 58 |
+
|
| 59 |
+
## Core Principles
|
| 60 |
+
|
| 61 |
+
1. **Keyword-rich descriptions**: Include trigger words for on-demand discovery
|
| 62 |
+
2. **One concern per file**: Separate files for testing, styling, documentation
|
| 63 |
+
3. **Concise and actionable**: Share context window—keep focused
|
| 64 |
+
4. **Show, don't tell**: Brief code examples over lengthy explanations
|
| 65 |
+
|
| 66 |
+
## Anti-patterns
|
| 67 |
+
|
| 68 |
+
- **Vague descriptions**: "Helpful coding tips" doesn't enable discovery
|
| 69 |
+
- **Overly broad applyTo**: `"**"` with content only relevant to specific files
|
| 70 |
+
- **Duplicating docs**: Copy README instead of linking
|
| 71 |
+
- **Mixing concerns**: Testing + API design + styling in one file
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/prompts.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [Prompts (.prompt.md)](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
| 2 |
+
|
| 3 |
+
Reusable task templates triggered on-demand in chat. Single focused task with parameterized inputs.
|
| 4 |
+
|
| 5 |
+
## Locations
|
| 6 |
+
|
| 7 |
+
| Path | Scope |
|
| 8 |
+
|------|-------|
|
| 9 |
+
| `.github/prompts/*.prompt.md` | Workspace |
|
| 10 |
+
| `<profile>/prompts/*.prompt.md` | User profile |
|
| 11 |
+
|
| 12 |
+
## Frontmatter
|
| 13 |
+
|
| 14 |
+
```yaml
|
| 15 |
+
---
|
| 16 |
+
description: "<recommended>" # Optional, but improves discoverability
|
| 17 |
+
name: "Prompt Name" # Optional, defaults to filename
|
| 18 |
+
argument-hint: "Task..." # Optional: hint shown in chat input
|
| 19 |
+
agent: "agent" # Optional: ask, agent, plan, or custom agent
|
| 20 |
+
model: "GPT-5 (copilot)" # Optional: selected model, or fallback array
|
| 21 |
+
tools: [search, web] # Optional: built-in, tool sets, MCP (<server>/*), extension
|
| 22 |
+
---
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
Model fallback is supported:
|
| 26 |
+
|
| 27 |
+
```yaml
|
| 28 |
+
model: ['GPT-5 (copilot)', 'Claude Sonnet 4.5 (copilot)']
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Template
|
| 32 |
+
|
| 33 |
+
```markdown
|
| 34 |
+
---
|
| 35 |
+
description: "Generate test cases for selected code"
|
| 36 |
+
agent: "agent"
|
| 37 |
+
---
|
| 38 |
+
Generate comprehensive test cases for the provided code:
|
| 39 |
+
- Include edge cases and error scenarios
|
| 40 |
+
- Follow existing test patterns in the codebase
|
| 41 |
+
- Use descriptive test names
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
**Context references**: Use Markdown links for files (`[config](./config.json)`) and `#tool:<name>` for tools.
|
| 45 |
+
|
| 46 |
+
## Invocation
|
| 47 |
+
|
| 48 |
+
- **Chat**: Type `/` → select from prompts and skills
|
| 49 |
+
- **Command**: `Chat: Run Prompt...`
|
| 50 |
+
- **Editor**: Open prompt file → play button
|
| 51 |
+
|
| 52 |
+
> Both prompts and skills appear as slash commands in chat. Skills provide multi-step workflows with bundled assets; prompts are single focused tasks.
|
| 53 |
+
|
| 54 |
+
**Tip**: Use `chat.promptFilesRecommendations` to show prompts as actions when starting a new chat.
|
| 55 |
+
|
| 56 |
+
## Tool Priority
|
| 57 |
+
|
| 58 |
+
When both prompt and custom agent define tools:
|
| 59 |
+
1. Tools from prompt file
|
| 60 |
+
2. Tools from referenced custom agent
|
| 61 |
+
3. Default tools for selected agent
|
| 62 |
+
|
| 63 |
+
## When to Use
|
| 64 |
+
|
| 65 |
+
- Generate test cases for specific code
|
| 66 |
+
- Create READMEs from specs
|
| 67 |
+
- Summarize metrics with custom parameters
|
| 68 |
+
- One-off generation tasks
|
| 69 |
+
|
| 70 |
+
## Core Principles
|
| 71 |
+
|
| 72 |
+
1. **Single task focus**: One prompt = one well-defined task
|
| 73 |
+
2. **Output examples**: Show expected format when quality depends on structure
|
| 74 |
+
3. **Reuse over duplication**: Reference instruction files instead of copying
|
| 75 |
+
|
| 76 |
+
## Anti-patterns
|
| 77 |
+
|
| 78 |
+
- **Multi-task prompts**: "create and test and deploy" in one prompt
|
| 79 |
+
- **Vague descriptions**: Descriptions that don't help users understand when to use
|
| 80 |
+
- **Over-tooling**: Many tools when the task only needs search or file access
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/agent-customization/references/skills.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [Agent Skills (SKILL.md)](https://code.visualstudio.com/docs/copilot/customization/agent-skills)
|
| 2 |
+
|
| 3 |
+
Folders of instructions, scripts, and resources that agents load on-demand for specialized tasks.
|
| 4 |
+
|
| 5 |
+
## Structure
|
| 6 |
+
|
| 7 |
+
```
|
| 8 |
+
.github/skills/<skill-name>/
|
| 9 |
+
├── SKILL.md # Required (name must match folder)
|
| 10 |
+
├── scripts/ # Executable code
|
| 11 |
+
├── references/ # Docs loaded as needed
|
| 12 |
+
└── assets/ # Templates, boilerplate
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
## Locations
|
| 16 |
+
|
| 17 |
+
| Path | Scope |
|
| 18 |
+
|------|-------|
|
| 19 |
+
| `.github/skills/<name>/` | Project |
|
| 20 |
+
| `.agents/skills/<name>/` | Project |
|
| 21 |
+
| `.claude/skills/<name>/` | Project |
|
| 22 |
+
| `~/.copilot/skills/<name>/` | Personal |
|
| 23 |
+
| `~/.agents/skills/<name>/` | Personal |
|
| 24 |
+
| `~/.claude/skills/<name>/` | Personal |
|
| 25 |
+
|
| 26 |
+
## SKILL.md Format
|
| 27 |
+
|
| 28 |
+
```yaml
|
| 29 |
+
---
|
| 30 |
+
name: skill-name # Required: 1-64 chars, lowercase alphanumeric + hyphens, must match folder
|
| 31 |
+
description: 'What and when to use. Max 1024 chars.'
|
| 32 |
+
argument-hint: 'Optional hint shown for slash invocation'
|
| 33 |
+
user-invocable: true # Optional: show as slash command (default: true)
|
| 34 |
+
disable-model-invocation: false # Optional: disable automatic model-triggered loading
|
| 35 |
+
---
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### Body
|
| 39 |
+
|
| 40 |
+
- What the skill accomplishes
|
| 41 |
+
- When to use (triggers and use cases)
|
| 42 |
+
- Step-by-step procedures
|
| 43 |
+
- References to resources: `[script](./scripts/test.js)`
|
| 44 |
+
|
| 45 |
+
## Template
|
| 46 |
+
|
| 47 |
+
```markdown
|
| 48 |
+
---
|
| 49 |
+
name: webapp-testing
|
| 50 |
+
description: 'Test web applications using Playwright. Use for verifying frontend, debugging UI, capturing screenshots.'
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
# Web Application Testing
|
| 54 |
+
|
| 55 |
+
## When to Use
|
| 56 |
+
- Verify frontend functionality
|
| 57 |
+
- Debug UI behavior
|
| 58 |
+
|
| 59 |
+
## Procedure
|
| 60 |
+
1. Start the web server
|
| 61 |
+
2. Run [test script](./scripts/test.js)
|
| 62 |
+
3. Review screenshots in `./screenshots/`
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## Progressive Loading
|
| 66 |
+
|
| 67 |
+
1. **Discovery** (~100 tokens): Agent reads `name` and `description`
|
| 68 |
+
2. **Instructions** (<5000 tokens): Loads `SKILL.md` body when relevant
|
| 69 |
+
3. **Resources**: Additional files load only when referenced
|
| 70 |
+
|
| 71 |
+
Keep file references one level deep from `SKILL.md`.
|
| 72 |
+
|
| 73 |
+
## Slash Command Behavior
|
| 74 |
+
|
| 75 |
+
Skills and prompt files both appear after typing `/` in chat.
|
| 76 |
+
|
| 77 |
+
| Configuration | Slash command | Auto-loaded |
|
| 78 |
+
|---|---|---|
|
| 79 |
+
| Default (both omitted) | Yes | Yes |
|
| 80 |
+
| `user-invocable: false` | No | Yes |
|
| 81 |
+
| `disable-model-invocation: true` | Yes | No |
|
| 82 |
+
| Both set | No | No |
|
| 83 |
+
|
| 84 |
+
## When to Use
|
| 85 |
+
|
| 86 |
+
Repeatable, on-demand workflows with bundled assets (scripts, templates, reference docs).
|
| 87 |
+
|
| 88 |
+
## Core Principles
|
| 89 |
+
|
| 90 |
+
1. **Keyword-rich descriptions**: Include trigger words for discovery
|
| 91 |
+
2. **Progressive loading**: Keep SKILL.md under 500 lines; use reference files
|
| 92 |
+
3. **Relative paths**: Always use `./` for skill resources
|
| 93 |
+
4. **Self-contained**: Include all procedural knowledge to complete the task
|
| 94 |
+
|
| 95 |
+
## Anti-patterns
|
| 96 |
+
|
| 97 |
+
- **Vague descriptions**: "A helpful skill" doesn't enable discovery
|
| 98 |
+
- **Monolithic SKILL.md**: Everything in one file instead of references
|
| 99 |
+
- **Name mismatch**: Folder name doesn't match `name` field
|
| 100 |
+
- **Missing procedures**: Descriptions without step-by-step guidance
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/chronicle/SKILL.md
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: chronicle
|
| 3 |
+
description: Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting session data.
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Chronicle
|
| 7 |
+
|
| 8 |
+
Analyze the user's Copilot session history using the `copilot_sessionStoreSql` tool. This skill handles standup reports, usage analysis, session search, and session store maintenance.
|
| 9 |
+
|
| 10 |
+
Sessions may be stored locally (SQLite) and optionally synced to the cloud for cross-device access. Cloud sync is controlled by the `chat.sessionSync.enabled` setting.
|
| 11 |
+
|
| 12 |
+
**Prerequisite:** Chronicle requires the `github.copilot.chat.localIndex.enabled` setting to be `true`. If the `copilot_sessionStoreSql` tool is not available, tell the user to enable this setting in VS Code Settings.
|
| 13 |
+
|
| 14 |
+
## Available Tool Actions
|
| 15 |
+
|
| 16 |
+
The `copilot_sessionStoreSql` tool supports two actions:
|
| 17 |
+
|
| 18 |
+
| Action | Purpose | `query` param |
|
| 19 |
+
|--------|---------|---------------|
|
| 20 |
+
| `query` | Execute a read-only SQL query | Required |
|
| 21 |
+
| `reindex` | Rebuild local session index + cloud sync | Not needed |
|
| 22 |
+
|
| 23 |
+
## Workflows
|
| 24 |
+
|
| 25 |
+
### Standup
|
| 26 |
+
|
| 27 |
+
When the user asks for a standup, daily summary, or "what did I do" (e.g. `/chronicle standup`):
|
| 28 |
+
|
| 29 |
+
**Step 1: Gather the last 24h of activity**
|
| 30 |
+
|
| 31 |
+
Use `copilot_sessionStoreSql` with `action: "query"` and follow the SQL dialect shown in the tool description (SQLite locally, DuckDB on cloud — see the **Database Schema** and **Query Guidelines** sections below).
|
| 32 |
+
|
| 33 |
+
Query the `sessions` table for rows where `updated_at` falls within the last 24 hours, ordered by `updated_at` descending. Recent-window predicate by backend:
|
| 34 |
+
|
| 35 |
+
- **Local SQLite**: `WHERE updated_at >= datetime('now', '-1 day')`
|
| 36 |
+
- **Cloud DuckDB**: `WHERE updated_at >= now() - INTERVAL '1 day'`
|
| 37 |
+
|
| 38 |
+
Then, for those session ids, pull related references from `session_refs` (PRs, issues, commits). If you need more detail on a particular session, query `turns` (and `session_files`, or `checkpoints` on cloud) further — don't dump every turn for every session up front.
|
| 39 |
+
|
| 40 |
+
If no sessions are found in the last 24 hours, tell the user there's no recent activity to report, suggest a longer window or `/chronicle reindex`, and stop. Do not fabricate a standup.
|
| 41 |
+
|
| 42 |
+
**Step 2: Include PR-less work**
|
| 43 |
+
|
| 44 |
+
Treat every recent session as a candidate work item, even when it has no PR, issue, or commit reference. PRs are supporting evidence, not the source of truth. Do not omit a session or branch solely because it has no PR — use session summaries and turn content to decide what to include.
|
| 45 |
+
|
| 46 |
+
**Step 3: Check PR status and format**
|
| 47 |
+
|
| 48 |
+
For any PR references found, use the GitHub CLI or MCP tools to check current status (open, merged, draft, closed). For each work item, include either a PR status line or a "No PR found" line — never invent a PR.
|
| 49 |
+
|
| 50 |
+
Format the result grouped by work stream (branch/feature). Use exactly this structure:
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
Standup for <date>:
|
| 54 |
+
|
| 55 |
+
**✅ Done**
|
| 56 |
+
|
| 57 |
+
**Feature name** (`branch-name` branch, `repo-name`)
|
| 58 |
+
- 3-7 words describing the status
|
| 59 |
+
- Key files: 2-3 most important files changed
|
| 60 |
+
- Merged: [#123](https://github.com/owner/repo/pull/123) or No PR found
|
| 61 |
+
- Session: `full-session-id`
|
| 62 |
+
|
| 63 |
+
**🚧 In Progress**
|
| 64 |
+
|
| 65 |
+
**Feature name** (`branch-name` branch, `repo-name`)
|
| 66 |
+
- 3-7 words describing the current state of work
|
| 67 |
+
- Key files: 2-3 most important files being worked on
|
| 68 |
+
- Draft: [#789](https://github.com/owner/repo/pull/789) or No PR found
|
| 69 |
+
- Session: `full-session-id`
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Rules:
|
| 73 |
+
- Keep it concise and succinct — the user can always ask follow-up questions
|
| 74 |
+
- Use turn data (user messages AND assistant responses) to understand WHAT was done
|
| 75 |
+
- Use file paths from `session_files` to identify which components/areas were affected
|
| 76 |
+
- Group related sessions on the same branch into one entry
|
| 77 |
+
- For sessions, only show the most recent session per feature/branch
|
| 78 |
+
- Link PRs and issues using markdown link syntax
|
| 79 |
+
- Classify as Done if work appears complete, In Progress otherwise
|
| 80 |
+
- If a session has no branch or repo, include it under an "Other" section
|
| 81 |
+
|
| 82 |
+
### Tips
|
| 83 |
+
|
| 84 |
+
When the user asks for tips, workflow recommendations, or how to improve:
|
| 85 |
+
|
| 86 |
+
**Step 1: Investigate how the user works**
|
| 87 |
+
|
| 88 |
+
Use `copilot_sessionStoreSql` with `action: "query"` to explore their recent sessions. The goal is to understand their patterns — how they prompt, what tools they use, and where they spend time.
|
| 89 |
+
|
| 90 |
+
Queries to run (do not explain what you will do first — start querying immediately):
|
| 91 |
+
- Sessions from the last 7 days: counts, durations, repositories
|
| 92 |
+
- Turn data: read actual user messages to understand prompting patterns
|
| 93 |
+
- session_files: which files and tools are used most frequently
|
| 94 |
+
- session_refs: PR/issue/commit activity patterns
|
| 95 |
+
|
| 96 |
+
**Step 2: Consider available features**
|
| 97 |
+
|
| 98 |
+
If the current workspace has a `.github/` folder, check for `.github/copilot-instructions.md`, `.github/skills/`, and `.github/agents/` to see what custom configuration exists. Do NOT look outside the workspace. Look for gaps between what's available and what the user actually uses.
|
| 99 |
+
|
| 100 |
+
**Step 3: Provide tips**
|
| 101 |
+
|
| 102 |
+
Based on what you learned, provide 3-5 specific, actionable tips. Each tip should:
|
| 103 |
+
- Be grounded in actual usage data — reference specific patterns you observed
|
| 104 |
+
- Be non-obvious — skip basic features that any regular user would already know
|
| 105 |
+
- Focus on gaps where a feature, workflow change, or different approach would meaningfully improve their experience
|
| 106 |
+
|
| 107 |
+
Analysis dimensions to explore:
|
| 108 |
+
- **Prompting patterns**: Are user messages vague or specific? Do they provide context? Do they correct or redirect the agent frequently?
|
| 109 |
+
- **Tool usage**: Which tools are used most? Are there underutilized tools that could help?
|
| 110 |
+
- **Session patterns**: How long are sessions? Are there many short abandoned sessions?
|
| 111 |
+
- **File patterns**: Which areas of the codebase get the most attention? Any repeated edits to the same files?
|
| 112 |
+
- **Workflow**: Is the user leveraging agent mode, custom instructions, prompt files, skills?
|
| 113 |
+
|
| 114 |
+
If the session store has little data, acknowledge that and suggest features to try based on what configuration you found in the workspace.
|
| 115 |
+
|
| 116 |
+
When recommending custom skills, agents, or instructions as a tip, consult the **agent-customization** skill for proper file creation patterns — don't give vague "create a custom skill" advice without actionable file structure guidance.
|
| 117 |
+
|
| 118 |
+
### Cost Tips
|
| 119 |
+
|
| 120 |
+
When the user asks for cost tips, ways to reduce token usage, or how to lower Copilot spend (e.g. `/chronicle cost-tips`):
|
| 121 |
+
|
| 122 |
+
The goal is **personalized, data-grounded recommendations** for reducing token usage — not a generic checklist. Every tip must point to a specific pattern you observed in their data.
|
| 123 |
+
|
| 124 |
+
**Scope: focus on VS Code chat sessions**
|
| 125 |
+
|
| 126 |
+
Other agent surfaces (Copilot CLI, Copilot Coding Agent, Copilot Code Review, custom agents/subagents) have very different cost profiles and would skew the analysis. By default, **filter every query to the interactive VS Code chat surface** so findings reflect that usage only. Only widen the scope if the user explicitly asks about CLI, Coding Agent, or custom agents — and when you do, run separate queries per agent type rather than mixing them.
|
| 127 |
+
|
| 128 |
+
The stored `agent_name` differs by backend — match the active backend's value **exactly** (case and spacing matter):
|
| 129 |
+
|
| 130 |
+
- **Cloud (DuckDB)**: `sessions.agent_name = 'VS Code Chat'`
|
| 131 |
+
- **Local (SQLite)**: `sessions.agent_name = 'GitHub Copilot Chat'`. Local also records subagent invocations (e.g. `Explore`, `summarizeConversationHistory`) as their own session rows; the default filter correctly excludes them.
|
| 132 |
+
|
| 133 |
+
Briefly check the agent mix once so you know what's being excluded (e.g. `SELECT agent_name, COUNT(*) AS n FROM sessions WHERE updated_at > <30-day cutoff> GROUP BY 1 ORDER BY n DESC`). If the interactive chat value is a small minority of the user's sessions, mention that in the summary so they know the tips are scoped to a slice of their activity, and **offer to run a separate pass on another agent type** — name the candidates you saw in the mix check (e.g. "want a separate pass on `Copilot CLI` or `Copilot Coding Agent`?") so the user knows widening is possible.
|
| 134 |
+
|
| 135 |
+
If the user asks to widen scope to a specific surface (e.g. "now do CLI", "cost tips for my Coding Agent sessions", "include my `Explore` subagent"), swap the default `agent_name` filter for the requested value and run the analysis against that slice **only** — do not mix surfaces in one pass. Use the exact `agent_name` strings shown by the mix-check above; common values across backends include `Copilot CLI` / `copilotcli`, `Copilot Coding Agent`, and any custom agent / subagent name (e.g. `Explore`, `summarizeConversationHistory`). Note in the summary that the tips are now scoped to that surface and call out anything you can't analyze on the active backend (e.g. cloud-only token columns when the user is on local).
|
| 136 |
+
|
| 137 |
+
**Cost-relevant schema (in addition to the Database Schema section below)**
|
| 138 |
+
|
| 139 |
+
- **Cloud DuckDB only** — the local SQLite store does **not** record per-event token usage and has no `events` table. If the active backend is local, gate all token queries and tell the user that real token-level analysis requires enabling cloud sync (`chat.sessionSync.enabled`).
|
| 140 |
+
- **events** (cloud): per-event billing — rows where `type = 'assistant.usage'` carry `usage_input_tokens`, `usage_output_tokens`, `usage_model`. JOIN `events e` to `sessions s ON s.id = e.session_id` and filter `WHERE s.agent_name = 'VS Code Chat'` to keep the scope tight.
|
| 141 |
+
- **sessions.agent_name** / **agent_description** (both backends): the interactive VS Code chat surface is stored as `'VS Code Chat'` on cloud and `'GitHub Copilot Chat'` on local. Other values include `Copilot CLI` / `copilotcli`, `Copilot Coding Agent`, subagents (`Explore`, `summarizeConversationHistory`, `panel/editAgent`, …), and custom agents.
|
| 142 |
+
- Use `LENGTH(user_message)` on `turns` (or `LENGTH(user_content)` on `events` where `type = 'user.message'`) to find oversized pastes.
|
| 143 |
+
|
| 144 |
+
**Step 1: Investigate cost and token patterns (interactive VS Code chat only)**
|
| 145 |
+
|
| 146 |
+
Use `copilot_sessionStoreSql` with `action: "query"`. Every query in this step must filter `sessions.agent_name` to the interactive VS Code chat value for the active backend — `'VS Code Chat'` on cloud, `'GitHub Copilot Chat'` on local. What to investigate depends on the active backend.
|
| 147 |
+
|
| 148 |
+
*Cloud (DuckDB) — drill into cost patterns* (filter `events` rows by `type = 'assistant.usage'` for billable rows, and join `sessions` to keep `agent_name = 'VS Code Chat'`):
|
| 149 |
+
|
| 150 |
+
- **Token-heavy sessions and turns** — sum `usage_input_tokens` and `usage_output_tokens` per session and per model from `events` where `type = 'assistant.usage'`. Which sessions burned the most tokens? Which models?
|
| 151 |
+
- **Input-to-output ratios** — when input tokens dwarf output tokens, the user is paying to re-send a bloated context every turn. Strongest signal that compaction, smaller working sets, or fresh sessions would help.
|
| 152 |
+
- **Model mix** — break down spend by `usage_model`. Are premium models being used for routine work (renames, simple edits, status checks) that a cheaper model could handle?
|
| 153 |
+
- **Per-turn growth** — within long sessions, does `usage_input_tokens` keep climbing turn-over-turn? Strong signal that compaction wasn't used.
|
| 154 |
+
- **Oversized pastes** — `LENGTH(user_content)` on `events` where `type = 'user.message'` to find user messages that should have been file references (also visible in `session_files` as repeated reads of the same path within one session).
|
| 155 |
+
|
| 156 |
+
*Local (SQLite) — no token data; use proxies* (filter `sessions.agent_name = 'GitHub Copilot Chat'` on every query):
|
| 157 |
+
|
| 158 |
+
- **Long sessions without compaction** — sessions with many turns and no rows in `checkpoints` (each `checkpoints` row is a successful compaction). `LEFT JOIN checkpoints c ON c.session_id = s.id WHERE c.session_id IS NULL` + a turn-count threshold gives prime candidates.
|
| 159 |
+
- **Late compaction** — for sessions that *do* have checkpoints, compare `checkpoints.checkpoint_number` and `created_at` against the session's turn count. A first compaction at turn 60 of an 80-turn session is far less helpful than one at turn 25.
|
| 160 |
+
- **Repeated large file reads** — in `session_files`, look for the same file read many times within one session, or across sessions.
|
| 161 |
+
- **Tool-call thrash** — sessions with many turns and repeated tool calls often indicate the agent rediscovered the same context multiple times.
|
| 162 |
+
- **Oversized pastes** — use `LENGTH(user_message)` on `turns` to find very long user messages that should have been file references.
|
| 163 |
+
|
| 164 |
+
*Both backends:*
|
| 165 |
+
|
| 166 |
+
- **Long-running sessions** — sessions with many turns or that span many hours drag a growing context window across every turn.
|
| 167 |
+
- **Repeated work** — the same file/topic showing up in many sessions, or the same agent stumbling block recurring (suggesting a custom skill, agent, or `copilot-instructions.md` entry would let the model do the work in one shot).
|
| 168 |
+
- **Subagent usage** — are heavyweight investigations being run in the main session (paying for their tokens to live in main context) when they could be delegated to a subagent that returns only a summary?
|
| 169 |
+
|
| 170 |
+
Drill into a few of the most expensive sessions and read the actual conversation turns to understand *why* they were expensive. Don't just report aggregates — explain the cause.
|
| 171 |
+
|
| 172 |
+
**Step 2: Map findings to features and habits**
|
| 173 |
+
|
| 174 |
+
If the current workspace has a `.github/` folder, check `.github/copilot-instructions.md`, `.github/skills/`, and `.github/agents/` to see what custom configuration already exists. Do NOT look outside the workspace. Cost-relevant capabilities to keep in mind:
|
| 175 |
+
|
| 176 |
+
- Mid-session compaction (e.g. `/compact`) to shrink the context window; for users who never compact, this is often the single biggest win.
|
| 177 |
+
- Model picker — switch to a cheaper model for routine work; check whether premium models are being used for simple tasks.
|
| 178 |
+
- Starting a fresh chat instead of continuing a bloated session.
|
| 179 |
+
- Subagents/delegation for offloading heavy research into a sub-context whose tokens don't accrete into the main session.
|
| 180 |
+
- Custom skills (`.github/skills/`) and custom agents (`.github/agents/`) so repeated workflows don't re-derive context each time.
|
| 181 |
+
- `.github/copilot-instructions.md` to encode project conventions the model otherwise has to be told every session.
|
| 182 |
+
- For cloud-enabled users, the Copilot usage view to inspect current premium-request spend.
|
| 183 |
+
|
| 184 |
+
**Step 3: Provide tips**
|
| 185 |
+
|
| 186 |
+
Give the user 3-5 specific, actionable tips. Each tip should:
|
| 187 |
+
|
| 188 |
+
- **Be grounded in their data** — reference a specific session, file, model, or pattern you observed (with rough numbers when you have them: turn counts, token totals, file-read counts, etc.).
|
| 189 |
+
- **Be non-obvious** — skip basics any returning user already knows. Assume they know compaction and fresh chats exist; help them notice they're not *using* them where it would matter.
|
| 190 |
+
- **Quantify the win when possible** — "compacting around turn 30 of that 80-turn session would have shaved ~X input tokens off every subsequent turn" is far better than "consider compacting".
|
| 191 |
+
- **Be concrete** — name the workflow change, command, or config file edit. If the suggestion is a custom skill or agent, sketch what it would cover.
|
| 192 |
+
- **Stay within VS Code chat scope** — tips should target interactive VS Code chat usage (compaction, model picker, fresh chats, `.github/copilot-instructions.md`, custom skills/agents, subagent delegation). Do not propose CLI- or Coding-Agent–specific changes unless the user has explicitly broadened scope.
|
| 193 |
+
|
| 194 |
+
If the session store has little data (e.g., cloud store is empty, or only a handful of local interactive chat sessions), say so plainly and offer 2-3 non-obvious cost-saving habits anchored in available features rather than fabricating findings. If the user is on local-only storage, end by noting that enabling `chat.sessionSync.enabled` unlocks per-event token analysis for sharper future tips.
|
| 195 |
+
|
| 196 |
+
### Improve
|
| 197 |
+
|
| 198 |
+
When the user asks to improve their agent instructions based on session history (e.g. `/chronicle improve`):
|
| 199 |
+
|
| 200 |
+
**Step 1: Read the current instructions file**
|
| 201 |
+
|
| 202 |
+
Read whichever instructions file the project uses (`.github/copilot-instructions.md` or `AGENTS.md`) to understand what already exists.
|
| 203 |
+
|
| 204 |
+
If the file does **not** exist, you will create it. In that case, also analyze the codebase first — consult the **init** skill and follow its codebase exploration approach. Combine that analysis with the session history findings from Step 2 to produce a comprehensive instructions file.
|
| 205 |
+
|
| 206 |
+
**Step 2: Investigate session history**
|
| 207 |
+
|
| 208 |
+
Use `copilot_sessionStoreSql` to explore. Scope all queries to sessions from the current repository or working directory.
|
| 209 |
+
|
| 210 |
+
Start by getting an overview of recent sessions for this repo, then dig deeper. You're looking for **friction** — signals that the agent misunderstood something or the user had to course-correct:
|
| 211 |
+
|
| 212 |
+
- **User messages that correct or redirect** — read the actual conversation turns of suspicious sessions. Look for areas where the user got frustrated.
|
| 213 |
+
- **Dev loop struggles** — did the agent have trouble with tests, linting, building, or type checking? Look for repeated failed commands, test retries, or build errors that required multiple attempts.
|
| 214 |
+
- **Patterns across sessions** — does the same kind of mistake recur?
|
| 215 |
+
|
| 216 |
+
Use your judgment on what queries to run. Drill into specific sessions when something looks interesting — read the actual turn-by-turn conversation to understand what went wrong.
|
| 217 |
+
|
| 218 |
+
**Step 3: Present recommendations**
|
| 219 |
+
|
| 220 |
+
Before presenting, consult the **agent-customization** skill for proper file conventions, content principles (link don't embed, minimal, concise), and anti-patterns — this frames how recommendations should be written.
|
| 221 |
+
|
| 222 |
+
Based on what you find, succinctly present 3-5 recommendations. Explain both the issue you found and what custom instructions can address it.
|
| 223 |
+
|
| 224 |
+
Focus on project-specific patterns, not generic advice. Only suggest instructions that address real problems found in the data that happened more than once.
|
| 225 |
+
|
| 226 |
+
After presenting all recommendations, ask the user which ones they'd like to apply. Then make only the approved edits to the single existing instructions file (or create `AGENTS.md` if none exists).
|
| 227 |
+
|
| 228 |
+
### Search
|
| 229 |
+
|
| 230 |
+
When the user asks to search, find, or look up past sessions by keyword (e.g. `/chronicle search <query>`):
|
| 231 |
+
|
| 232 |
+
**Search strategy**
|
| 233 |
+
|
| 234 |
+
1. Search across session summaries, conversation turns (user messages AND assistant responses), and any other indexed content (checkpoints, file paths, refs like PR/issue/commit). The user's query may match a topic, a file path, or a PR/issue number — cover all three.
|
| 235 |
+
2. For each matching session, gather enough metadata to label it: `s.id`, `s.repository`, `s.branch`, `s.summary`, `s.updated_at`, plus a short snippet that shows *why* it matched (e.g. `substr(user_message, 1, 160)` on cloud, or the matched `file_path` / `ref_value`).
|
| 236 |
+
3. Present results grouped by repository, ordered by most recently updated.
|
| 237 |
+
|
| 238 |
+
**Writing the query**
|
| 239 |
+
|
| 240 |
+
Call `copilot_sessionStoreSql` with `action: "query"` and `description: "Search sessions for <query>"`. Follow the SQL dialect shown in the tool description (SQLite vs DuckDB).
|
| 241 |
+
|
| 242 |
+
Schema essentials (full schema is in the **Database Schema** section below — re-read it before writing the query):
|
| 243 |
+
|
| 244 |
+
- The `sessions` table primary key is `id` (NOT `session_id`). Every other table uses `session_id` as the FK back to `sessions.id`. Always project `s.id` from `sessions`.
|
| 245 |
+
- Don't invent names: there is no `started_at` (use `created_at`/`updated_at`), no `workspace` (use `cwd` locally; cloud has none), no `title` (use `summary`), no `content`/`messages` (use `turns.user_message`/`turns.assistant_response`, or on cloud `events.user_content`/`events.assistant_content`).
|
| 246 |
+
- **Local SQLite**: prefer the FTS5 `search_index` table (`WHERE search_index MATCH '<query>'`) for body content — `search_index` already has a `session_id` column, so select it directly (`SELECT session_id, content FROM search_index WHERE search_index MATCH ...`). Do **not** join `search_index.rowid` to `turns.rowid`; they are unrelated and you will pull in unrelated sessions. File paths and refs aren't in the FTS index — combine with `LIKE` on `session_files.file_path` and `session_refs.ref_value`.
|
| 247 |
+
- **Cloud DuckDB**: no FTS5 — use `ILIKE '%<query>%'` across the text columns of `sessions`, `turns`, `checkpoints`, `session_files`, `session_refs`.
|
| 248 |
+
|
| 249 |
+
Escape single quotes in the user's query by doubling them (`it's` → `it''s`). For multi-word FTS5 queries, quote the whole phrase: `MATCH '"apply patch"'`.
|
| 250 |
+
|
| 251 |
+
**Performance — avoid cloud timeouts**
|
| 252 |
+
|
| 253 |
+
`ILIKE '%X%'` on `turns` is a full table scan. Cloud queries that run too long return `context deadline exceeded`. To stay under the budget:
|
| 254 |
+
|
| 255 |
+
- **Use the two-step pattern** (recommended): First, collect matching `session_id`s from `turns` with a narrow time window and `GROUP BY session_id` in a CTE. Then enrich from `sessions` using `WHERE id IN (...)`. This avoids the expensive JOIN on a large scan result that causes timeouts.
|
| 256 |
+
- Aggregate match info per session with `GROUP BY session_id` and `any_value()` / `MIN()` / `array_agg()` rather than scalar subqueries or correlated subqueries.
|
| 257 |
+
- On cloud, default to a **7-day window** on the heavy tables (`WHERE timestamp >= now() - INTERVAL '7 days'` on `turns`, same on `checkpoints` via `created_at`). If no results come back, **progressively widen**: 7 days → 30 days → 90 days. Mention the window in your summary line so the user knows it's bounded.
|
| 258 |
+
- Keep `LIMIT 50` on the final SELECT.
|
| 259 |
+
- If a query times out, narrow the window (not widen it) or drop the heaviest table (usually `turns`) and tell the user what you trimmed. Do NOT retry with the same window — always reduce scope first.
|
| 260 |
+
|
| 261 |
+
**Output format**
|
| 262 |
+
|
| 263 |
+
For each session, build a one-line label from `summary` if present, else from the returned `snippet` (truncate to ~80 chars). Never emit `(no summary)`, `(no metadata)`, or bare session-id lists.
|
| 264 |
+
|
| 265 |
+
If you applied a time window (e.g. the cloud 7-day default), include it in the header so the user knows the scope; otherwise omit the scope phrase or say "all time". Example:
|
| 266 |
+
|
| 267 |
+
```
|
| 268 |
+
**Search results for "<query>"** (<n> sessions, <scope: e.g. "last 7 days" / "all time">)
|
| 269 |
+
|
| 270 |
+
_owner/repo_
|
| 271 |
+
- `session-id` — **<summary or snippet>**
|
| 272 |
+
`branch` · updated <relative time> · matched in <match_kind>
|
| 273 |
+
- `session-id` — **<summary or snippet>**
|
| 274 |
+
`branch` · updated <relative time> · matched in <match_kind>
|
| 275 |
+
|
| 276 |
+
_other-owner/other-repo_
|
| 277 |
+
- ...
|
| 278 |
+
```
|
| 279 |
+
|
| 280 |
+
Rules:
|
| 281 |
+
- Always render one session per line — never join multiple session ids with commas.
|
| 282 |
+
- The label is `summary` if non-null; otherwise the snippet; otherwise a usable fallback like the matched file path. If even those are empty, skip the session rather than show "no summary".
|
| 283 |
+
- Include `· matched in <match_kind>` (turn / file / ref / checkpoint / meta) when you can — helps the user see why each session matched.
|
| 284 |
+
- Group by repository. Sessions whose `repository` is NULL go under an _Other_ heading, formatted the same way (one per line, with a usable label).
|
| 285 |
+
- Cap visible results per repository at ~10; if there are more, append `…and N more (refine your query)`.
|
| 286 |
+
|
| 287 |
+
**No results**
|
| 288 |
+
|
| 289 |
+
If no rows are returned, tell the user and suggest:
|
| 290 |
+
- Trying different keywords or a broader search term (single word, or a substring instead of a phrase)
|
| 291 |
+
- Widening the time window ("search all time", "include older sessions")
|
| 292 |
+
- Running `/chronicle reindex` if they haven't indexed their sessions yet
|
| 293 |
+
- Running `/chronicle standup` to see recent activity
|
| 294 |
+
|
| 295 |
+
### Reindex
|
| 296 |
+
|
| 297 |
+
When the user asks to reindex, rebuild, or refresh their session store:
|
| 298 |
+
|
| 299 |
+
1. Call `copilot_sessionStoreSql` with `action: "reindex"` and `description: "Reindex sessions"`.
|
| 300 |
+
2. The tool rebuilds the local session store from debug logs and, if cloud sync is enabled, uploads new sessions to the cloud.
|
| 301 |
+
3. Present the before/after stats and cloud sync results to the user.
|
| 302 |
+
|
| 303 |
+
If the user says "force reindex" or wants to re-process already-indexed sessions, add `force: true` to the call. By default, already-indexed sessions are skipped for speed.
|
| 304 |
+
|
| 305 |
+
### Delete Sessions
|
| 306 |
+
|
| 307 |
+
When the user asks to delete session data or clear their history:
|
| 308 |
+
|
| 309 |
+
- Guide them to run the **Delete Session Sync Data** command from the Command Palette (`github.copilot.sessionSync.deleteSessions`).
|
| 310 |
+
- This command lets them choose which sessions to delete from both local storage and the cloud.
|
| 311 |
+
- The tool itself does NOT support deletion — this is intentional to prevent accidental data loss.
|
| 312 |
+
|
| 313 |
+
## Query Guidelines
|
| 314 |
+
|
| 315 |
+
When using `action: "query"`:
|
| 316 |
+
- Only one query per call — do not combine multiple statements with semicolons
|
| 317 |
+
- Only `SELECT` and `WITH` (CTE) are allowed. `DESCRIBE`, `SHOW`, `PRAGMA`, and any mutating statements are blocked — re-read the **Database Schema** section below instead of trying to introspect
|
| 318 |
+
- Always use LIMIT (max 100) and prefer aggregations (COUNT, GROUP BY) over raw row dumps
|
| 319 |
+
- Query the **turns** table for conversation content — it gives the richest insight into what happened
|
| 320 |
+
- Query **session_files** for file paths and tool usage patterns
|
| 321 |
+
- Query **session_refs** for PR/issue/commit links
|
| 322 |
+
- Join tables using session_id for complete analysis
|
| 323 |
+
- Always filter on **updated_at** (not created_at) for time ranges
|
| 324 |
+
- Always JOIN sessions with turns to get session content — do not rely on sessions.summary alone
|
| 325 |
+
|
| 326 |
+
### Query routing
|
| 327 |
+
|
| 328 |
+
The tool automatically routes queries based on the user's cloud sync settings:
|
| 329 |
+
- **Cloud enabled**: Queries go to the cloud DuckDB backend which contains ALL sessions across devices and agents (VS Code, CLI, Copilot Coding Agent, PR reviews). The tool description will show DuckDB SQL syntax — follow it.
|
| 330 |
+
- **Cloud disabled**: Queries go to local SQLite which only contains sessions from this device. The tool description will show SQLite syntax.
|
| 331 |
+
|
| 332 |
+
The tool's description dynamically changes based on the active backend. **Always follow the SQL syntax shown in the tool description** — it matches the active backend.
|
| 333 |
+
|
| 334 |
+
## Database Schema
|
| 335 |
+
|
| 336 |
+
### Tables (both local and cloud unless noted)
|
| 337 |
+
|
| 338 |
+
- **sessions**: id, cwd (workspace folder path — always NULL in cloud), repository, branch, host_type, summary, agent_name, agent_description, created_at, updated_at
|
| 339 |
+
- **turns**: session_id, turn_index, user_message, assistant_response (first ~1000 chars, may be truncated), timestamp
|
| 340 |
+
- **checkpoints**: session_id, checkpoint_number, title, overview, history, work_done, technical_details, important_files, next_steps, created_at — compaction checkpoints storing summarized state. Note: cloud has fewer columns (no history/work_done/technical_details).
|
| 341 |
+
- **session_files**: session_id, file_path, tool_name, turn_index, first_seen_at
|
| 342 |
+
- **session_refs**: session_id, ref_type (commit/pr/issue), ref_value, turn_index, created_at
|
| 343 |
+
- **search_index**: FTS5 virtual table (local only). Columns: `content`, `session_id`, `source_type` (`turn`/`assistant`/`checkpoint`/etc.), `source_id`. Use `WHERE search_index MATCH 'query'` for full-text search and project `session_id` directly — **do NOT** join `search_index.rowid` to `turns.rowid` (the rowids are independent and the join will match the wrong rows). Use `snippet(search_index, 0, '[', ']', '…', 12)` or `substr(content, 1, 160)` for a snippet.
|
| 344 |
+
|
| 345 |
+
### Cloud-only tables
|
| 346 |
+
|
| 347 |
+
- **events**: Raw event table (~90 columns). Key columns: session_id, timestamp, type, user_content, assistant_content, tool_start_name, tool_complete_success, tool_complete_result_content, usage_model, usage_input_tokens, usage_output_tokens
|
| 348 |
+
- **tool_requests**: session_id, tool_call_id, name, arguments_json
|
| 349 |
+
|
| 350 |
+
Date math (SQLite): `datetime('now', '-1 day')`, `datetime('now', '-7 days')`
|
| 351 |
+
Date math (Cloud/DuckDB): `now() - INTERVAL '1 day'`, `now() - INTERVAL '7 days'`. Use `ILIKE` for text search (no FTS5/MATCH), `date_diff('minute', start, end)` for durations.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-agent/SKILL.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: create-agent
|
| 3 |
+
description: 'Create a custom agent (.agent.md) for a specific job.'
|
| 4 |
+
argument-hint: What job should this agent do and how?
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
Related skill: `agent-customization`. Load and follow **agents.md** for template and principles.
|
| 8 |
+
|
| 9 |
+
Guide the user to create an `.agent.md`.
|
| 10 |
+
|
| 11 |
+
## Extract from Conversation
|
| 12 |
+
First, review the conversation history. If the user has been using the agent in a specialized way (e.g., restricting tools, following a specific persona, focusing on certain file types), generalize that into a custom agent. Extract:
|
| 13 |
+
- The specialized role or persona being assumed
|
| 14 |
+
- Tool preferences (which to use, which to avoid)
|
| 15 |
+
- The domain or job scope
|
| 16 |
+
|
| 17 |
+
## Clarify if Needed
|
| 18 |
+
If no clear specialization emerges from the conversation, clarify:
|
| 19 |
+
- What job should this agent do?
|
| 20 |
+
- When should it be picked over the default agent?
|
| 21 |
+
- Which tools should it use (or avoid)?
|
| 22 |
+
|
| 23 |
+
## Iterate
|
| 24 |
+
1. Draft the agent file and save it.
|
| 25 |
+
2. Identify the most ambiguous or weak parts and ask about those.
|
| 26 |
+
3. Once finalized, summarize what the agent does, suggest example prompts to try it, and propose related customizations to create next.
|
| 27 |
+
|
| 28 |
+
Remember to follow the `agent-customization` guidelines to create highly effective agents.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-hook/SKILL.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: create-hook
|
| 3 |
+
description: 'Create a hook (.json) to enforce policy or automate agent lifecycle events.'
|
| 4 |
+
argument-hint: What should be enforced or automated?
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
Related skill: `agent-customization`. Load and follow **hooks.md** for template and principles.
|
| 8 |
+
|
| 9 |
+
Guide the user to create a hook in `.github/hooks/`.
|
| 10 |
+
|
| 11 |
+
## Extract from Conversation
|
| 12 |
+
First, review the conversation history. If the user has been expressing concerns about agent behavior (e.g., "don't run this command", "always check before doing X", "inject this context"), generalize that into a hook. Extract:
|
| 13 |
+
- Actions that should be blocked or gated
|
| 14 |
+
- Context that should be injected at certain points
|
| 15 |
+
- Automation needs at session start/end or tool use
|
| 16 |
+
|
| 17 |
+
## Clarify if Needed
|
| 18 |
+
If no clear policy need emerges from the conversation, clarify:
|
| 19 |
+
- What event should trigger this hook? (e.g. PreToolUse, SessionStart, Stop)
|
| 20 |
+
- Should it block, warn, or inject context?
|
| 21 |
+
- Does it need a companion script?
|
| 22 |
+
|
| 23 |
+
## Path Conventions
|
| 24 |
+
- Hook commands and companion scripts run with `cwd` defaulting to the workspace root (when a workspace folder is available); otherwise `cwd` falls back to the user home directory. Relative paths resolve from `cwd`. Absolute paths are fine when intentional — just be deliberate about which you use.
|
| 25 |
+
- Do not use environment variables for pathing. The only exception is plugin-provided environment variables in hooks shipped as part of an agent plugin; never use environment variables for pathing outside of a plugin context.
|
| 26 |
+
|
| 27 |
+
## Iterate
|
| 28 |
+
1. Draft the hook JSON (and any scripts) and save them.
|
| 29 |
+
2. Identify the most ambiguous or weak parts and ask about those.
|
| 30 |
+
3. Once finalized, summarize what the hook enforces, suggest ways to test it, and propose related customizations to create next.
|
| 31 |
+
|
| 32 |
+
Remember to follow the `agent-customization` guidelines to create highly effective hooks.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-instructions/SKILL.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: create-instructions
|
| 3 |
+
description: 'Create an instructions file (.instructions.md) for a project rule or convention.'
|
| 4 |
+
argument-hint: What rule or convention to enforce?
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
Related skill: `agent-customization`. Load and follow **instructions.md** for template and principles.
|
| 8 |
+
|
| 9 |
+
Guide the user to create an instructions file.
|
| 10 |
+
|
| 11 |
+
## Extract from Conversation
|
| 12 |
+
First, review the conversation history. If the user has been correcting the agent's output or asking for specific patterns (e.g., "always use X", "never do Y", "follow this style"), generalize that into a persistent instruction. Extract:
|
| 13 |
+
- Corrections or preferences mentioned during the conversation
|
| 14 |
+
- Coding patterns the user enforced or requested
|
| 15 |
+
- Project-specific conventions referenced
|
| 16 |
+
|
| 17 |
+
## Clarify if Needed
|
| 18 |
+
If no clear rule emerges from the conversation, clarify:
|
| 19 |
+
- Should this apply everywhere or only to specific files?
|
| 20 |
+
- Which technologies or file types are affected?
|
| 21 |
+
- Is this a hard rule or a preference?
|
| 22 |
+
|
| 23 |
+
Explore the codebase using subagents if you need more context.
|
| 24 |
+
|
| 25 |
+
## Iterate
|
| 26 |
+
1. Draft the instruction and save it.
|
| 27 |
+
2. Identify the most ambiguous or weak parts and ask about those.
|
| 28 |
+
3. Once finalized, summarize what the instruction enforces, suggest example prompts to see it in action, and propose related customizations to create next.
|
| 29 |
+
|
| 30 |
+
Remember to follow the `agent-customization` guidelines to create highly effective instructions.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-prompt/SKILL.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: create-prompt
|
| 3 |
+
description: 'Create a reusable prompt file (.prompt.md) for a common task.'
|
| 4 |
+
argument-hint: What task should this prompt help with?
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
Related skill: `agent-customization`. Load and follow **prompts.md** for template and principles.
|
| 8 |
+
|
| 9 |
+
Guide the user to create a `.prompt.md`.
|
| 10 |
+
|
| 11 |
+
## Extract from Conversation
|
| 12 |
+
First, review the conversation history. If the user has been working on a repeatable task pattern (e.g., explaining code, generating tests, refactoring), generalize that into a reusable prompt. Extract:
|
| 13 |
+
- The core task being performed repeatedly
|
| 14 |
+
- Any implicit inputs (selected code, file type, context)
|
| 15 |
+
- The desired output format or style
|
| 16 |
+
|
| 17 |
+
## Clarify if Needed
|
| 18 |
+
If no clear pattern emerges from the conversation, clarify:
|
| 19 |
+
- What task should this prompt help with?
|
| 20 |
+
- Should it take arguments or use fixed context?
|
| 21 |
+
- Workspace-scoped or personal?
|
| 22 |
+
|
| 23 |
+
## Iterate
|
| 24 |
+
1. Draft the prompt and save it.
|
| 25 |
+
2. Identify the most ambiguous or weak parts and ask about those.
|
| 26 |
+
3. Once finalized, summarize what the prompt does, suggest example invocations, and propose related customizations to create next.
|
| 27 |
+
|
| 28 |
+
Remember to follow the `agent-customization` guidelines to create highly effective prompts.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/create-skill/SKILL.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: create-skill
|
| 3 |
+
description: 'Create a reusable skill (SKILL.md) that packages a workflow.'
|
| 4 |
+
argument-hint: What should this skill produce?
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
Related skill: `agent-customization`. Load and follow **skills.md** for template and principles.
|
| 8 |
+
|
| 9 |
+
Guide the user to create a `SKILL.md`.
|
| 10 |
+
|
| 11 |
+
## Extract from Conversation
|
| 12 |
+
First, review the conversation history. If the user has been following a multi-step workflow or methodology (e.g., debugging approach, review checklist, implementation pattern), generalize that into a reusable skill. Extract:
|
| 13 |
+
- The step-by-step process being followed
|
| 14 |
+
- Decision points and branching logic
|
| 15 |
+
- Quality criteria or completion checks
|
| 16 |
+
|
| 17 |
+
## Clarify if Needed
|
| 18 |
+
If no clear workflow emerges from the conversation, clarify:
|
| 19 |
+
- What outcome should this skill produce?
|
| 20 |
+
- Workspace-scoped or personal?
|
| 21 |
+
- Quick checklist or full multi-step workflow?
|
| 22 |
+
|
| 23 |
+
## Iterate
|
| 24 |
+
1. Draft the skill and save it.
|
| 25 |
+
2. Identify the most ambiguous or weak parts and ask about those.
|
| 26 |
+
3. Once finalized, summarize what the skill produces, suggest example prompts to try it, and propose related customizations to create next.
|
| 27 |
+
|
| 28 |
+
Remember to follow the `agent-customization` guidelines to create highly effective skills.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/get-search-view-results/SKILL.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: get-search-view-results
|
| 3 |
+
description: 'Get the current search results from the Search view in VS Code'
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Getting Search View Results
|
| 7 |
+
|
| 8 |
+
1. VS Code has a search view, and it can have existing search results.
|
| 9 |
+
2. To get the current search results, you can use the VS Code command `search.action.getSearchResults`.
|
| 10 |
+
3. Run that command via the `copilot_runVscodeCommand` tool. Make sure to pass the `skipCheck` argument as true to avoid checking if the command exists, as we know it does.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/init/SKILL.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: init
|
| 3 |
+
description: Generate or update chat customization files for AI coding agents
|
| 4 |
+
argument-hint: Optionally specify a focus area or pattern to document for agents
|
| 5 |
+
disable-model-invocation: true
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
The purpose of this command is to create or update chat customization files
|
| 9 |
+
- the agent instructions file (`.github/copilot-instructions.md` or `AGENTS.md`) to help AI coding agents understand the codebase and be immediately productive
|
| 10 |
+
- skills and custom agents to automate common tasks or enforce conventions in the codebase
|
| 11 |
+
|
| 12 |
+
The user can optionally call this command with an argument. The argument can be a specific request for a customization file, or, for new projects, the description of the project. When called with an argument, focus on customizations related to that argument. Only create or modify chat customization files. Never start working on a task in the argument.
|
| 13 |
+
|
| 14 |
+
When the command is invoked, immediately tell the user that you are now exploring the codebase and work on creating and improving the chat customization files. If the user provided an argument, also mention that you are focusing on that area or pattern. Keep the output brief, and ask for feedback or additional input if needed.
|
| 15 |
+
|
| 16 |
+
Use the related skill `agent-customization` for detailed information about the different types of customization files.
|
| 17 |
+
Explore the codebase to get a good understanding of the project and its conventions, and then create or update the relevant chat customization files to help AI coding agents be productive in this codebase.
|
| 18 |
+
|
| 19 |
+
When complete, print a table of the added or modified chat customization files, along with a short explanation why this file is useful to the AI coding agents.
|
| 20 |
+
|
| 21 |
+
## Workflow
|
| 22 |
+
|
| 23 |
+
1. **Discover existing conventions**
|
| 24 |
+
Search: `**/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md}`
|
| 25 |
+
|
| 26 |
+
2. **Explore the codebase** via subagent, 1-3 in parallel if needed
|
| 27 |
+
Find essential knowledge that helps an AI agent be immediately productive:
|
| 28 |
+
- Build/test commands (agents run these automatically)
|
| 29 |
+
- Architecture decisions and component boundaries
|
| 30 |
+
- Project-specific conventions that differ from common practices
|
| 31 |
+
- Potential pitfalls or common development environment issues
|
| 32 |
+
- Key files/directories that exemplify patterns
|
| 33 |
+
|
| 34 |
+
Also inventory existing documentation (`docs/**/*.md`, `CONTRIBUTING.md`, `ARCHITECTURE.md`, etc.) to identify topics that should be linked, not duplicated.
|
| 35 |
+
|
| 36 |
+
3. **Generate or merge**
|
| 37 |
+
- New file: Prefer AGENTS.md over `.github/copilot-instructions.md`. If the user already has one of these files, update it instead of creating a new one.
|
| 38 |
+
- Existing file: Preserve valuable content, update outdated sections, remove duplication
|
| 39 |
+
- Follow the guidelines in the `agent-customization` skill:
|
| 40 |
+
1. **Link, don't embed** principle. Do not copy existing documentation that exists in the workspace, link to them with a Markdown link instead.
|
| 41 |
+
2. **Minimal by default**: Only what's relevant and cannot be easily discovered by an agent should be included. Link to other documentation for details.
|
| 42 |
+
3. **Concise and actionable**: Every line should guide behavior
|
| 43 |
+
|
| 44 |
+
4. **Iterate**
|
| 45 |
+
- Ask for feedback on unclear or incomplete sections
|
| 46 |
+
- If the workspace is complex, suggest creating separate instructions files or skills for specific areas (e.g., frontend, backend, tests)
|
| 47 |
+
|
| 48 |
+
Once finalized, propose related agent-customizations to create next (`/create-(agent|hook|instruction|prompt|skill) …`), explaining the customization and how it would be used in practice.
|
| 49 |
+
|
| 50 |
+
If session history is available, use the **chronicle** skill to check for friction patterns in past sessions — this can surface project-specific conventions or pitfalls that codebase exploration alone wouldn't reveal. Mention `/chronicle improve` to the user as a way to iteratively refine instructions over time.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/install-vscode-extension/SKILL.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: install-vscode-extension
|
| 3 |
+
description: 'How to install a VS Code extension from an extension ID. Useful when the user wants to add new capabilities to their VS Code environment by installing extensions.'
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Installing VS Code extensions
|
| 7 |
+
|
| 8 |
+
1. VS Code extensions are identified by their unique extension ID, which typically follows the format `publisher.extensionName`. For example, the Python extension by Microsoft has the ID `ms-python.python`.
|
| 9 |
+
2. To install a VS Code extension, you need to use the VS Code command `workbench.extensions.installExtension` and pass in the extension ID. The args are of the format:
|
| 10 |
+
```
|
| 11 |
+
[extensionId, { enable: true, installPreReleaseVersion: boolean }]
|
| 12 |
+
```
|
| 13 |
+
> NOTE: install the pre-release version of the extension if the user explicitly mentions it or if the current environment is VS Code Insiders. Otherwise, install the stable version.
|
| 14 |
+
3. Run that command via the `copilot_runVscodeCommand` tool. Make sure to pass the `skipCheck` argument as true to avoid checking if the command exists, as we know it does.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/project-setup-info-context7/SKILL.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: project-setup-info-context7
|
| 3 |
+
description: "Comprehensive setup steps to help the user create complete project structures in a VS Code workspace. This tool is designed for full project initialization and scaffolding, not for creating individual files. When to use this tool: when the user wants to create a new complete project from scratch; when setting up entire project frameworks (TypeScript projects, React apps, Node.js servers, etc.); when initializing Model Context Protocol (MCP) servers with full structure; when creating VS Code extensions with proper scaffolding; when setting up Next.js, Vite, or other framework-based projects; when the user asks for \"new project\", \"create a workspace\", or \"set up a [framework] project\"; when you need to establish a complete development environment with dependencies, config files, and folder structure. When NOT to use this tool: when creating single files or small code snippets; when adding individual files to existing projects; when making modifications to existing codebases; when the user asks to \"create a file\" or \"add a component\"; for simple code examples or demonstrations; for debugging or fixing existing code. This tool provides complete project setup including folder structure creation, package.json and dependency management, configuration files (tsconfig, eslint, etc.), initial boilerplate code, development environment setup, and build and run instructions. Use other file creation tools for individual files within existing projects."
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# How to setup a project using context7 tools
|
| 7 |
+
|
| 8 |
+
Use context7 tools to find the latest libraries, APIs, and documentation to help the user create and customize their project. Only setup a project if the folder is empty or if you've just called the tool first calling the tool to create a workspace.
|
| 9 |
+
|
| 10 |
+
1. Call the `mcp_context7_resolve-library-id` tool with your project requirements.
|
| 11 |
+
2. Call the `mcp_context7_get-library-docs` tool to get scaffolding instructions.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/project-setup-info-local/SKILL.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: project-setup-info-local
|
| 3 |
+
description: 'Comprehensive setup steps to help the user create complete project structures in a VS Code workspace; this tool is designed for full project initialization and scaffolding, not for creating individual files. When to use this tool: user wants to create a new complete project from scratch; setting up entire project frameworks (TypeScript projects, React apps, Node.js servers, etc.); initializing Model Context Protocol (MCP) servers with full structure; creating VS Code extensions with proper scaffolding; setting up Next.js, Vite, or other framework-based projects; user asks for "new project", "create a workspace", "set up a [framework] project"; need to establish a complete development environment with dependencies, config files, and folder structure. When NOT to use this tool: creating single files or small code snippets; adding individual files to existing projects; making modifications to existing codebases; user asks to "create a file" or "add a component"; simple code examples or demonstrations; debugging or fixing existing code. This tool provides complete project setup including: folder structure creation; package.json and dependency management; configuration files (tsconfig, eslint, etc.); initial boilerplate code; development environment setup; build and run instructions. Use other file creation tools for individual files within existing projects.'
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# How to setup a project
|
| 7 |
+
|
| 8 |
+
Determine what kind of project the user wants to create, then based on that, choose which setup info below to follow. Only setup a project if the folder is empty or if you've just called the tool first calling the tool to create a workspace.
|
| 9 |
+
|
| 10 |
+
## vscode-extension
|
| 11 |
+
|
| 12 |
+
A template for creating a VS Code extension using Yeoman and Generator-Code.
|
| 13 |
+
|
| 14 |
+
Run this command:
|
| 15 |
+
|
| 16 |
+
```
|
| 17 |
+
npx --package yo --package generator-code -- yo code . --skipOpen
|
| 18 |
+
```
|
| 19 |
+
The command has the following arguments:
|
| 20 |
+
|
| 21 |
+
- `-t, --extensionType`: Specify extension type: ts, js, command-ts, command-js, colortheme, language, snippets, keymap, extensionpack, localization, commandweb, notebook. Defaults to `ts`
|
| 22 |
+
- `-n, --extensionDisplayName`: Set the display name of the extension.
|
| 23 |
+
- `--extensionId`: Set the unique ID of the extension. Do not select this option if the user has not requested a unique ID.
|
| 24 |
+
- `--extensionDescription`: Provide a description for the extension.
|
| 25 |
+
- `--pkgManager`: Specify package manager: npm, yarn, or pnpm. Defaults to `npm`.
|
| 26 |
+
- `--bundler`: Bundle the extension using webpack or esbuild.
|
| 27 |
+
- `--gitInit`: Initialize a Git repository for the extension.
|
| 28 |
+
- `--snippetFolder`: Specify the location of the snippet folder.
|
| 29 |
+
- `--snippetLanguage`: Set the language for snippets.
|
| 30 |
+
|
| 31 |
+
### Rules
|
| 32 |
+
|
| 33 |
+
1. Do not remove any arguments from the command. Only add arguments if the user requests them.
|
| 34 |
+
2. Call the tool `get_vscode_api` with the user's query to get the relevant references.
|
| 35 |
+
3. After the tool `get_vscode_api` has completed, only then begin to modify the project.
|
| 36 |
+
|
| 37 |
+
## next-js
|
| 38 |
+
|
| 39 |
+
A React based framework for building server-rendered web applications.
|
| 40 |
+
|
| 41 |
+
Run this command:
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
npx create-next-app@latest .
|
| 45 |
+
```
|
| 46 |
+
The command has the following arguments:
|
| 47 |
+
|
| 48 |
+
- `--ts, --typescript`: Initialize as a TypeScript project. This is the default.
|
| 49 |
+
- `--js, --javascript`: Initialize as a JavaScript project.
|
| 50 |
+
- `--tailwind`: Initialize with Tailwind CSS config. This is the default.
|
| 51 |
+
- `--eslint`: Initialize with ESLint config.
|
| 52 |
+
- `--app`: Initialize as an App Router project.
|
| 53 |
+
- `--src-dir`: Initialize inside a 'src/' directory.
|
| 54 |
+
- `--turbopack`: Enable Turbopack by default for development.
|
| 55 |
+
- `--import-alias <prefix/*>`: Specify import alias to use.(default is "@/*")
|
| 56 |
+
- `--api`: Initialize a headless API using the App Router.
|
| 57 |
+
- `--empty`: Initialize an empty project.
|
| 58 |
+
- `--use-npm`: Explicitly tell the CLI to bootstrap the application using npm.
|
| 59 |
+
- `--use-pnpm`: Explicitly tell the CLI to bootstrap the application using pnpm.
|
| 60 |
+
- `--use-yarn`: Explicitly tell the CLI to bootstrap the application using Yarn.
|
| 61 |
+
- `--use-bun`: Explicitly tell the CLI to bootstrap the application using Bun.
|
| 62 |
+
|
| 63 |
+
## vite
|
| 64 |
+
|
| 65 |
+
A front end build tool for web applications that focuses on speed and performance. Can be used with React, Vue, Preact, Lit, Svelte, Solid, and Qwik.
|
| 66 |
+
|
| 67 |
+
Run this command:
|
| 68 |
+
|
| 69 |
+
```
|
| 70 |
+
npx create-vite@latest .
|
| 71 |
+
```
|
| 72 |
+
The command has the following arguments:
|
| 73 |
+
|
| 74 |
+
- `-t, --template NAME`: Use a specific template. Available templates: vanilla-ts, vanilla, vue-ts, vue, react-ts, react, react-swc-ts, react-swc, preact-ts, preact, lit-ts, lit, svelte-ts, svelte, solid-ts, solid, qwik-ts, qwik
|
| 75 |
+
|
| 76 |
+
## mcp-server
|
| 77 |
+
|
| 78 |
+
A Model Context Protocol (MCP) server project. This project supports multiple programming languages including TypeScript, JavaScript, Python, C#, Java, and Kotlin.
|
| 79 |
+
|
| 80 |
+
### Rules
|
| 81 |
+
|
| 82 |
+
1. First, visit https://github.com/modelcontextprotocol to find the correct SDK and setup instructions for the requested language. Default to TypeScript if no language is specified.
|
| 83 |
+
2. Use the `fetch_webpage` tool to find the correct implementation instructions from https://modelcontextprotocol.io/llms-full.txt
|
| 84 |
+
3. Update the copilot-instructions.md file in the .github directory to include references to the SDK documentation
|
| 85 |
+
4. Create an `mcp.json` file in the `.vscode` folder in the project root with the following content: `{ "servers": { "mcp-server-name": { "type": "stdio", "command": "command-to-run", "args": [list-of-args] } } }`.
|
| 86 |
+
- mcp-server-name: The name of the MCP server. Create a unique name that reflects what this MCP server does.
|
| 87 |
+
- command-to-run: The command to run to start the MCP server. This is the command you would use to run the project you just created.
|
| 88 |
+
- list-of-args: The arguments to pass to the command. This is the list of arguments you would use to run the project you just created.
|
| 89 |
+
5. Install any required VS Code extensions based on the chosen language (e.g., Python extension for Python projects).
|
| 90 |
+
6. Inform the user that they can now debug this MCP server using VS Code.
|
| 91 |
+
|
| 92 |
+
## python-script
|
| 93 |
+
|
| 94 |
+
A simple Python script project which should be chosen when just a single script wants to be created.
|
| 95 |
+
|
| 96 |
+
Required extensions: `ms-python.python`, `ms-python.vscode-python-envs`
|
| 97 |
+
|
| 98 |
+
### Rules
|
| 99 |
+
|
| 100 |
+
1. Call the tool `copilot_runVscodeCommand` to correctly create a new Python script project in VS Code. Call the command with the following arguments.
|
| 101 |
+
Note that "python-script" and "true" are constants while "New Project Name" and "/path/to/new/project" are placeholders for the project name and path respectively.
|
| 102 |
+
```json
|
| 103 |
+
{
|
| 104 |
+
"name": "python-envs.createNewProjectFromTemplate",
|
| 105 |
+
"commandId": "python-envs.createNewProjectFromTemplate",
|
| 106 |
+
"args": ["python-script", "true", "New Project Name", "/path/to/new/project"]
|
| 107 |
+
}
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
## python-package
|
| 111 |
+
|
| 112 |
+
A Python package project which can be used to create a distributable package.
|
| 113 |
+
|
| 114 |
+
Required extensions: `ms-python.python`, `ms-python.vscode-python-envs`
|
| 115 |
+
|
| 116 |
+
### Rules
|
| 117 |
+
|
| 118 |
+
1. Call the tool `run_vscode_command` to correctly create a new Python package project in VS Code. Call the command with the following arguments.
|
| 119 |
+
Note that "python-package" and "true" are constants while "New Package Name" and "/path/to/new/project" are placeholders for the package name and path respectively.
|
| 120 |
+
```json
|
| 121 |
+
{
|
| 122 |
+
"name": "python-envs.createNewProjectFromTemplate",
|
| 123 |
+
"commandId": "python-envs.createNewProjectFromTemplate",
|
| 124 |
+
"args": ["python-package", "true", "New Package Name", "/path/to/new/project"]
|
| 125 |
+
}
|
| 126 |
+
```
|
| 127 |
+
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/assets/prompts/skills/troubleshoot/SKILL.md
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: troubleshoot
|
| 3 |
+
description: Investigate unexpected chat agent behavior by analyzing direct debug logs in JSONL files. Use when users ask why something happened, why a request was slow, why tools or subagents were used or skipped, or why instructions/skills/agents did not load.
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Troubleshoot
|
| 7 |
+
|
| 8 |
+
## Purpose
|
| 9 |
+
|
| 10 |
+
This skill investigates and explains unexpected chat agent behavior using direct log files.
|
| 11 |
+
|
| 12 |
+
Use this skill for questions like:
|
| 13 |
+
- Why did this request take so long?
|
| 14 |
+
- Why was a tool or subagent called?
|
| 15 |
+
- Why did instruction/skill/agent files not load?
|
| 16 |
+
- Why was a tool call blocked or failed?
|
| 17 |
+
- Why did the model not follow expectations?
|
| 18 |
+
|
| 19 |
+
Base conclusions on evidence from logs. Do not guess.
|
| 20 |
+
|
| 21 |
+
## Data Source
|
| 22 |
+
|
| 23 |
+
- Target session log directory/directories for analysis: `{{VSCODE_TARGET_SESSION_LOG}}`
|
| 24 |
+
|
| 25 |
+
Use direct debug log files written by Copilot Chat:
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
debug-logs/<sessionId>/
|
| 29 |
+
main.jsonl — always start here; primary conversation log
|
| 30 |
+
models.json — (optional) snapshot of available models at session start
|
| 31 |
+
system_prompt_0.json — (optional) full system prompt sent to the model (untruncated)
|
| 32 |
+
system_prompt_1.json — (optional) written when the model changes mid-session
|
| 33 |
+
tools_0.json — (optional) tool definitions sent to the model
|
| 34 |
+
tools_1.json — (optional) written when the model changes mid-session
|
| 35 |
+
runSubagent-<agentName>-<uuid>.jsonl — (optional) subagent's tool calls & LLM requests
|
| 36 |
+
searchSubagent-<uuid>.jsonl — (optional) search subagent work
|
| 37 |
+
title-<uuid>.jsonl — (optional, UI-only) title generation
|
| 38 |
+
categorization-<uuid>.jsonl — (optional, UI-only) prompt categorization
|
| 39 |
+
summarize-<uuid>.jsonl — (optional, UI-only) conversation summarization
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Always read `main.jsonl` first — it has the full conversation flow. Child files only appear when those operations occurred. `main.jsonl` contains `child_session_ref` entries that link to each child file by name. Title, categorization, and summarize files are UI housekeeping and rarely relevant to troubleshooting. When investigating model availability or selection issues, read `models.json` — it contains the full list of models (with capabilities, billing, and limits) that were available when the session started.
|
| 43 |
+
|
| 44 |
+
When investigating what the model was told (system prompt, instructions), read the `system_prompt_*.json` file referenced by a `system_prompt_ref` entry in `main.jsonl`. The file contains the full untruncated system prompt as `{ "content": "..." }`. When investigating which tools were available, read the `tools_*.json` file similarly. If the model changed mid-session, multiple numbered files exist — each `llm_request` entry has a `systemPromptFile` attr indicating which file was active for that request.
|
| 45 |
+
|
| 46 |
+
Each line is a JSON object. Common fields: `ts` (epoch ms), `dur` (duration ms), `sid` (session ID), `type`, `name`, `spanId`, `parentSpanId`, `status` (`ok`|`error`), `attrs` (type-specific details).
|
| 47 |
+
|
| 48 |
+
### Event Type Reference with Examples
|
| 49 |
+
|
| 50 |
+
#### discovery — customization file loading (instructions, skills, agents, hooks)
|
| 51 |
+
```jsonl
|
| 52 |
+
{"ts":1773200251309,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Instructions","spanId":"2cb1f2f4","status":"ok","attrs":{"details":"Resolved 0 instructions in 0.0ms | folders: [/c:/Users/user/.copilot/instructions, /workspace/.github/instructions]","category":"discovery","source":"core"}}
|
| 53 |
+
{"ts":1773200251415,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Agents","spanId":"38a897d8","status":"ok","attrs":{"details":"Resolved 3 agents in 0.0ms | loaded: [Plan, Ask, Explore] | folders: [/workspace/.github/agents]","category":"discovery","source":"core"}}
|
| 54 |
+
{"ts":1773200251431,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Skills","spanId":"472eb225","status":"ok","attrs":{"details":"Resolved 6 skills in 0.0ms | loaded: [agent-customization, troubleshoot, ...]","category":"discovery","source":"core"}}
|
| 55 |
+
```
|
| 56 |
+
Key attrs: `details` (human-readable summary with folder paths, loaded items, skip reasons), `category` (always `"discovery"`), `source` (`"core"`).
|
| 57 |
+
|
| 58 |
+
#### tool_call — tool invocation (success or failure)
|
| 59 |
+
```jsonl
|
| 60 |
+
{"ts":1773200222647,"dur":4,"sid":"62f52dec","type":"tool_call","name":"manage_todo_list","spanId":"000000000000000b","parentSpanId":"0000000000000003","status":"ok","attrs":{"args":"{\"operation\":\"read\"}","result":"No todo list found."}}
|
| 61 |
+
{"ts":1773200234047,"dur":8937,"sid":"62f52dec","type":"tool_call","name":"run_in_terminal","spanId":"000000000000000d","parentSpanId":"0000000000000003","status":"error","attrs":{"args":"{\"command\":\"echo rama\"}","result":"ERROR: conpty.node missing","error":"A native exception occurred during launch"}}
|
| 62 |
+
```
|
| 63 |
+
Key attrs: `args` (JSON string of tool input), `result` (tool output or error text), `error` (present when `status:"error"`).
|
| 64 |
+
|
| 65 |
+
#### llm_request — model round-trip
|
| 66 |
+
```jsonl
|
| 67 |
+
{"ts":1773200231010,"dur":3001,"sid":"62f52dec","type":"llm_request","name":"chat:gpt-4o","spanId":"000000000000000c","parentSpanId":"0000000000000003","status":"ok","attrs":{"model":"gpt-4o","inputTokens":15025,"outputTokens":126,"ttft":1987,"maxTokens":32000,"systemPromptFile":"system_prompt_0.json","userRequest":"echo hello","inputMessages":"[{...}]"}}
|
| 68 |
+
```
|
| 69 |
+
Key attrs: `model`, `inputTokens`, `outputTokens`, `ttft` (time to first token in ms), `maxTokens`, `temperature`, `topP`, `systemPromptFile` (references a system prompt file in the session directory), `toolsFile` (references a tools file in the session directory), `userRequest` (the full user message content, untruncated), `inputMessages` (full messages array as JSON, truncated to the configured `maxAttributeSizeChars` — unlimited by default), `error` (when failed).
|
| 70 |
+
|
| 71 |
+
#### agent_response — model output (text + tool calls)
|
| 72 |
+
```jsonl
|
| 73 |
+
{"ts":1773200234011,"dur":0,"sid":"62f52dec","type":"agent_response","name":"agent_response","spanId":"agent-msg-000000000000000c","parentSpanId":"0000000000000003","status":"ok","attrs":{"response":"[{\"role\":\"assistant\",...}]","reasoning":"The user wants me to run a command."}}
|
| 74 |
+
```
|
| 75 |
+
Key attrs: `response` (JSON-encoded array of message parts; may be truncated), `reasoning` (optional — the model's chain-of-thought/thinking text when thinking mode is active; may be truncated).
|
| 76 |
+
|
| 77 |
+
#### user_message — user input
|
| 78 |
+
```jsonl
|
| 79 |
+
{"ts":1773200251345,"dur":0,"sid":"62f52dec","type":"user_message","name":"user_message","spanId":"000000000000000f","status":"ok","attrs":{"content":"using subagent count .md"}}
|
| 80 |
+
```
|
| 81 |
+
Key attrs: `content` (the user's message text).
|
| 82 |
+
|
| 83 |
+
#### subagent — subagent invocation
|
| 84 |
+
```jsonl
|
| 85 |
+
{"ts":1773200254954,"dur":7921,"sid":"62f52dec","type":"subagent","name":"Explore","spanId":"0000000000000014","parentSpanId":"0000000000000013","status":"ok","attrs":{"agentName":"Explore"}}
|
| 86 |
+
```
|
| 87 |
+
Key attrs: `agentName`, `description` (optional), `error` (when failed).
|
| 88 |
+
|
| 89 |
+
#### generic — miscellaneous events
|
| 90 |
+
```jsonl
|
| 91 |
+
{"ts":1773200260000,"dur":0,"sid":"62f52dec","type":"generic","name":"some-event","spanId":"abc123","status":"ok","attrs":{"details":"Additional context","category":"some-category"}}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Special generic entries:
|
| 95 |
+
- `system_prompt_ref` — references a `system_prompt_*.json` file in the session directory. `attrs.file` is the filename, `attrs.model` is the model it was written for. Read this file to see the full system prompt.
|
| 96 |
+
- `tools_ref` — references a `tools_*.json` file. `attrs.file` is the filename, `attrs.model` is the model.
|
| 97 |
+
|
| 98 |
+
#### session_start — session metadata (appears once at session start)
|
| 99 |
+
```jsonl
|
| 100 |
+
{"ts":1773200251300,"dur":0,"sid":"62f52dec","type":"session_start","name":"session_start","spanId":"session-start-62f52dec","status":"ok","attrs":{"copilotVersion":"0.43.2026033104","vscodeVersion":"1.99.0"}}
|
| 101 |
+
```
|
| 102 |
+
Key attrs: `copilotVersion`, `vscodeVersion`. Useful for identifying which build produced the logs.
|
| 103 |
+
|
| 104 |
+
#### turn_start / turn_end — tool-calling loop iteration boundaries
|
| 105 |
+
```jsonl
|
| 106 |
+
{"ts":1773200251400,"dur":0,"sid":"62f52dec","type":"turn_start","name":"turn_start:0","spanId":"turn-start-X-0","status":"ok","attrs":{"turnId":"0"}}
|
| 107 |
+
{"ts":1773200255000,"dur":0,"sid":"62f52dec","type":"turn_end","name":"turn_end:0","spanId":"turn-end-X-0","status":"ok","attrs":{"turnId":"0"}}
|
| 108 |
+
```
|
| 109 |
+
Key attrs: `turnId` (iteration number within a single user request's tool-calling loop). Use these to identify which iteration events belong to and to count total loop iterations.
|
| 110 |
+
|
| 111 |
+
### Reading the event hierarchy
|
| 112 |
+
|
| 113 |
+
Events form a tree via `spanId`/`parentSpanId`. A typical chain:
|
| 114 |
+
1. `user_message` (spanId: `X`) — the user's turn
|
| 115 |
+
2. `llm_request` (parentSpanId: `X`) — model call for that turn
|
| 116 |
+
3. `agent_response` (parentSpanId: `X`) — what the model returned
|
| 117 |
+
4. `tool_call` (parentSpanId: `X`) — tool executed from the response
|
| 118 |
+
5. Another `llm_request` (parentSpanId: `X`) — next model call after tool result
|
| 119 |
+
|
| 120 |
+
Subagent calls create nested hierarchies: the `tool_call` for `runSubagent` (spanId: `Y`) becomes the parent for a child `subagent` span, which in turn parents its own `llm_request`/`tool_call` events.
|
| 121 |
+
|
| 122 |
+
## Tooling Strategy (important)
|
| 123 |
+
|
| 124 |
+
Debug log files live outside the workspace (in user storage), so workspace-scoped search tools like `grep_search` cannot access them. Use the terminal instead.
|
| 125 |
+
|
| 126 |
+
**Do not use `grep_search` for log files — it only works on workspace files.**
|
| 127 |
+
|
| 128 |
+
### macOS / Linux / WSL / Git Bash
|
| 129 |
+
|
| 130 |
+
Use `run_in_terminal` with `grep` or `jq`:
|
| 131 |
+
- Find errors: `grep '"status":"error"' <logPath>`
|
| 132 |
+
- Find discovery events: `grep '"type":"discovery"' <logPath>`
|
| 133 |
+
- Find slow events (duration > 5s): `jq -c 'select(.dur > 5000)' <logPath>`
|
| 134 |
+
- Find tool calls: `grep '"type":"tool_call"' <logPath>`
|
| 135 |
+
- Search for specific text: `grep 'search_term' <logPath>`
|
| 136 |
+
- Get last N lines: `tail -n 50 <logPath>`
|
| 137 |
+
- Count events by type: `jq -r '.type' <logPath> | sort | uniq -c | sort -rn`
|
| 138 |
+
- Extract specific fields: `jq -c '{type, name, status, dur}' <logPath>`
|
| 139 |
+
- Filter by type and show details: `jq -c 'select(.type == "discovery")' <logPath>`
|
| 140 |
+
- Find user messages: `jq -c 'select(.type == "user_message") | .attrs.content' <logPath>`
|
| 141 |
+
|
| 142 |
+
### Windows (PowerShell)
|
| 143 |
+
|
| 144 |
+
Use `run_in_terminal` with PowerShell commands:
|
| 145 |
+
- Find errors: `Select-String '"status":"error"' <logPath>`
|
| 146 |
+
- Find discovery events: `Select-String '"type":"discovery"' <logPath>`
|
| 147 |
+
- Find tool calls: `Select-String '"type":"tool_call"' <logPath>`
|
| 148 |
+
- Search for specific text: `Select-String 'search_term' <logPath>`
|
| 149 |
+
- Get last N lines: `Get-Content <logPath> -Tail 50`
|
| 150 |
+
- Parse and filter with Node.js (always available): `node -e "require('fs').readFileSync('<logPath>','utf8').split('\n').filter(Boolean).map(JSON.parse).filter(e => e.dur > 5000).forEach(e => console.log(JSON.stringify(e)))"`
|
| 151 |
+
- Count events by type: `node -e "const lines=require('fs').readFileSync('<logPath>','utf8').split('\n').filter(Boolean).map(JSON.parse);const c={};lines.forEach(e=>c[e.type]=(c[e.type]||0)+1);Object.entries(c).sort((a,b)=>b[1]-a[1]).forEach(([t,n])=>console.log(n,t))"`
|
| 152 |
+
|
| 153 |
+
### General rules
|
| 154 |
+
|
| 155 |
+
- **Log files can be very large** (tens of MB or more for long sessions). Always check file size first if unsure: `ls -lh <logPath>` (or `(Get-Item <logPath>).Length` on Windows). If the file is large, avoid commands that load the entire file into memory (e.g. `node -e` with `readFileSync`). Prefer streaming tools like `grep`, `jq`, `Select-String`, `tail`, or `head`.
|
| 156 |
+
- Use `read_file` only for small targeted ranges (a few lines) once you know the line numbers. Never read entire log files.
|
| 157 |
+
- Use `run_in_terminal` with `ls -lh` (or `dir` on Windows) to locate candidate `.jsonl` files and check their sizes.
|
| 158 |
+
- On Windows, if `grep`/`jq` are not available, fall back to `Select-String` or `node -e` one-liners (only for smaller files).
|
| 159 |
+
|
| 160 |
+
## Investigation Workflow
|
| 161 |
+
|
| 162 |
+
1. Identify the log file(s)
|
| 163 |
+
- **Focus on the session log directories provided in the Runtime Log Context section above.** Start by reading `main.jsonl` in each directory.
|
| 164 |
+
- If multiple session directories are listed, investigate all of them — the user wants to compare or find common patterns across sessions.
|
| 165 |
+
- Only search other session files in the debug-logs directory if the issue spans multiple sessions or the provided sessions don't contain relevant events.
|
| 166 |
+
|
| 167 |
+
2. Triage quickly via `run_in_terminal` (use `grep`/`jq` on macOS/Linux, `Select-String`/`node -e` on Windows)
|
| 168 |
+
- Errors: search for `"status":"error"`
|
| 169 |
+
- Latency: filter for high `dur` values (> 5000)
|
| 170 |
+
- Discovery issues: search for `"type":"discovery"`
|
| 171 |
+
- Tool behavior: search for `"type":"tool_call"`
|
| 172 |
+
- Model behavior: search for `"type":"llm_request"`
|
| 173 |
+
|
| 174 |
+
3. Read only relevant slices
|
| 175 |
+
- Pull exact lines around suspicious events.
|
| 176 |
+
- Correlate with `spanId` / `parentSpanId` when needed.
|
| 177 |
+
|
| 178 |
+
4. Determine root cause
|
| 179 |
+
- Pick the most likely cause from evidence.
|
| 180 |
+
- If multiple factors contribute, order by impact.
|
| 181 |
+
|
| 182 |
+
5. Provide remediation
|
| 183 |
+
- Offer concrete next steps when possible.
|
| 184 |
+
|
| 185 |
+
## Network Issue Investigation
|
| 186 |
+
|
| 187 |
+
If you suspect network connectivity or authentication problems (e.g., repeated request timeouts, 401/403 errors, or model endpoint failures in the logs), run the VS Code command `github.copilot.debug.collectDiagnostics` using the `run_vscode_command` tool. The command returns the full diagnostics report as a string, so you can read the result directly from the tool output. The report includes:
|
| 188 |
+
- Authentication and token status
|
| 189 |
+
- Network reachability checks
|
| 190 |
+
- Proxy and certificate configuration
|
| 191 |
+
- Extension and environment details
|
| 192 |
+
|
| 193 |
+
The command also opens the report in an editor for the user to see. Use the returned string to diagnose the network issue.
|
| 194 |
+
|
| 195 |
+
## Customization Documentation Reference
|
| 196 |
+
|
| 197 |
+
When investigating issues related to a specific type of customization file (instructions, prompt files, agents, etc.) and you need more details about the expected format or behavior, load the relevant documentation page:
|
| 198 |
+
|
| 199 |
+
- Custom instructions: `https://code.visualstudio.com/docs/copilot/customization/custom-instructions`
|
| 200 |
+
- Prompt files: `https://code.visualstudio.com/docs/copilot/customization/prompt-files`
|
| 201 |
+
- Custom agents: `https://code.visualstudio.com/docs/copilot/customization/custom-agents`
|
| 202 |
+
- Language models: `https://code.visualstudio.com/docs/copilot/customization/language-models`
|
| 203 |
+
- MCP servers: `https://code.visualstudio.com/docs/copilot/customization/mcp-servers`
|
| 204 |
+
- Hooks: `https://code.visualstudio.com/docs/copilot/customization/hooks`
|
| 205 |
+
- Agent plugins: `https://code.visualstudio.com/docs/copilot/customization/agent-plugins`
|
| 206 |
+
|
| 207 |
+
Use these when you need to verify file format expectations, confirm supported fields, or help the user fix a customization file.
|
| 208 |
+
|
| 209 |
+
## Last Resort — Copilot Issues Wiki
|
| 210 |
+
|
| 211 |
+
When your investigation yields no clear root cause or you have no specific remediation suggestions:
|
| 212 |
+
|
| 213 |
+
1. Load the Copilot Issues wiki page: `https://github.com/microsoft/vscode/wiki/Copilot-Issues`.
|
| 214 |
+
2. Search the returned wiki content for sections relevant to the user's problem.
|
| 215 |
+
3. Summarize the applicable troubleshooting steps from the wiki in your response.
|
| 216 |
+
4. If the wiki contains relevant guidance, present those steps as concrete suggestions the user can try.
|
| 217 |
+
5. If even the wiki has no relevant information, tell the user: "The diagnostics logs do not show a clear cause for this behavior, and the known issues wiki does not cover this scenario. Consider filing an issue at https://github.com/microsoft/vscode/issues."
|
| 218 |
+
|
| 219 |
+
## Response Guidelines
|
| 220 |
+
|
| 221 |
+
Your response should cover:
|
| 222 |
+
- What happened and why (the root cause or most likely explanation)
|
| 223 |
+
- Key evidence from logs (paraphrased, not raw dumps)
|
| 224 |
+
- How to fix it or what to try next
|
| 225 |
+
|
| 226 |
+
You do not need separate headers for each of these. For straightforward issues, a short combined explanation with a "How to fix" section is fine. Use more structure (headers, multiple sections) only when the issue is complex or involves multiple contributing factors.
|
| 227 |
+
|
| 228 |
+
### Formatting
|
| 229 |
+
- Use headers, bullet points, and bold text to make the response scannable.
|
| 230 |
+
- Keep paragraphs short. Prefer lists over walls of text.
|
| 231 |
+
- When citing log evidence, paraphrase or summarize rather than pasting raw log lines. If a specific detail is important (e.g., an error message), quote just that message — not entire log entries.
|
| 232 |
+
- Use tables when comparing multiple values or events (e.g., a name mismatch, latency breakdown across steps).
|
| 233 |
+
|
| 234 |
+
### Abstraction level
|
| 235 |
+
- Do not narrate your investigation process. Never say things like "I'm investigating the session debug log…", "I found the key clue in the log…", or "I'm now checking the skill file metadata…". Jump straight to the findings.
|
| 236 |
+
- Do not use internal terminology like "discovery summary", "frontmatter name", "the loader", "event hierarchy", or "span tree". Describe what happened in plain language the user can act on.
|
| 237 |
+
- Do not describe the internal log file structure, event types, or JSONL format to the user — they do not need to know these implementation details.
|
| 238 |
+
- Refer to log files abstractly (e.g., "the debug log" or "the session log") rather than by literal filenames like `main.jsonl` or `runSubagent-Explore-abc123.jsonl`.
|
| 239 |
+
- Focus on what happened and why, not how you found it.
|
| 240 |
+
|
| 241 |
+
### Example
|
| 242 |
+
|
| 243 |
+
**Bad** (narrates investigation, uses internal terms, pastes raw log):
|
| 244 |
+
> I'm investigating the session debug log to confirm whether a testing skill was discovered. In the skills discovery summary, the loader reports: `skipped: testing2 (name-mismatch)`. The frontmatter name in SKILL.md doesn't match the folder identity.
|
| 245 |
+
|
| 246 |
+
**Good** (concise, user-friendly, actionable):
|
| 247 |
+
> The "testing" skill was found but not loaded because there's a name mismatch between the folder and the skill file:
|
| 248 |
+
>
|
| 249 |
+
> | | Value |
|
| 250 |
+
> |---|---|
|
| 251 |
+
> | **Folder name** | `testing` |
|
| 252 |
+
> | **Name in SKILL.md** | `testing2` |
|
| 253 |
+
>
|
| 254 |
+
> These must match for the skill to load.
|
| 255 |
+
>
|
| 256 |
+
> **How to fix**
|
| 257 |
+
>
|
| 258 |
+
> Either:
|
| 259 |
+
> - Change `name: testing2` to `name: testing` in your SKILL.md, **or**
|
| 260 |
+
> - Rename the folder from `testing/` to `testing2/`
|
| 261 |
+
>
|
| 262 |
+
> Then start a new chat session so it gets picked up.
|
| 263 |
+
|
| 264 |
+
## Important Rules
|
| 265 |
+
|
| 266 |
+
- Never assume causality without evidence.
|
| 267 |
+
- Use `run_in_terminal` to search log files — never use `grep_search` (it cannot access files outside the workspace). Use `grep`/`jq` on macOS/Linux, `Select-String`/`node -e` on Windows.
|
| 268 |
+
- Never read entire log files with `read_file` — they can be very large. Search first, then `read_file` for small targeted ranges.
|
| 269 |
+
- Keep log access targeted and efficient.
|
| 270 |
+
- If you suspect network issues, run `github.copilot.debug.collectDiagnostics` via the `run_vscode_command` tool and use the returned diagnostics string before concluding.
|
| 271 |
+
- If no clear cause is found, consult the Copilot Issues wiki before giving up. If even the wiki has no relevant information, say so explicitly.
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/changelog.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotCLIShim.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";var Ae=Object.create;var ne=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,ve=Object.prototype.hasOwnProperty;var Le=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of be(t))!ve.call(e,r)&&r!==n&&ne(e,r,{get:()=>t[r],enumerable:!(i=xe(t,r))||i.enumerable});return e};var Pe=(e,t,n)=>(n=e!=null?Ae(we(e)):{},Le(t||!e||!e.__esModule?ne(n,"default",{value:e,enumerable:!0}):n,e));var E=require("child_process"),ge=Pe(require("readline"));function Y(){return globalThis._VSCODE_NLS_LANGUAGE}var rt=Y()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;var T="en",U=!1,j=!1,G=!1,Ie=!1,ye=!1,ie=!1,Se=!1,_e=!1,Ee=!1,Ne=!1,F,H=T,re=T,ke,P,$=globalThis,A;typeof $.vscode<"u"&&typeof $.vscode.process<"u"?A=$.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(A=process);var oe=typeof A?.versions?.electron=="string",Re=oe&&A?.type==="renderer";if(typeof A=="object"){U=A.platform==="win32",j=A.platform==="darwin",G=A.platform==="linux",Ie=G&&!!A.env.SNAP&&!!A.env.SNAP_REVISION,Se=oe,Ee=!!A.env.CI||!!A.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!A.env.GITHUB_WORKSPACE,F=T,H=T;let e=A.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);F=t.userLocale,re=t.osLocale,H=t.resolvedLanguage||T,ke=t.languagePack?.translationsConfigFile}catch{}ye=!0}else typeof navigator=="object"&&!Re?(P=navigator.userAgent,U=P.indexOf("Windows")>=0,j=P.indexOf("Macintosh")>=0,_e=(P.indexOf("Macintosh")>=0||P.indexOf("iPad")>=0||P.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,G=P.indexOf("Linux")>=0,Ne=P?.indexOf("Mobi")>=0,ie=!0,H=Y()||T,F=navigator.language.toLowerCase(),re=F):console.error("Unable to resolve platform.");var Z=0;j?Z=1:U?Z=3:G&&(Z=2);var se=U,le=j;var Oe=ie&&typeof $.importScripts=="function",it=Oe?$.origin:void 0;var L=P,_=H,We;(i=>{function e(){return _}i.value=e;function t(){return _.length===2?_==="en":_.length>=3?_[0]==="e"&&_[1]==="n"&&_[2]==="-":!1}i.isDefaultVariant=t;function n(){return _==="en"}i.isDefault=n})(We||={});var Te=typeof $.postMessage=="function"&&!$.importScripts,ot=(()=>{if(Te){let e=[];$.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let i=0,r=e.length;i<r;i++){let s=e[i];if(s.id===n.data.vscodeScheduleAsyncWork){e.splice(i,1),s.callback();return}}});let t=0;return n=>{let i=++t;e.push({id:i,callback:n}),$.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})();var De=!!(L&&L.indexOf("Chrome")>=0),st=!!(L&&L.indexOf("Firefox")>=0),lt=!!(!De&&L&&L.indexOf("Safari")>=0),at=!!(L&&L.indexOf("Edg/")>=0),ct=!!(L&&L.indexOf("Android")>=0);var k,J=globalThis.vscode;if(typeof J<"u"&&typeof J.process<"u"){let e=J.process;k={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?k={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:k={get platform(){return se?"win32":le?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var z=k.cwd,ae=k.env,ce=k.platform,gt=k.arch;var Me=65,Fe=97,Ge=90,He=122,R=46,C=47,x=92,I=58,Ue=63,V=class extends Error{constructor(t,n,i){let r;typeof n=="string"&&n.indexOf("not ")===0?(r="must not be",n=n.replace(/^not /,"")):r="must be";let s=t.indexOf(".")!==-1?"property":"argument",l=`The "${t}" ${s} ${r} of type ${n}`;l+=`. Received type ${typeof i}`,super(l),this.code="ERR_INVALID_ARG_TYPE"}};function je(e,t){if(e===null||typeof e!="object")throw new V(t,"Object",e)}function h(e,t){if(typeof e!="string")throw new V(t,"string",e)}var b=ce==="win32";function d(e){return e===C||e===x}function X(e){return e===C}function y(e){return e>=Me&&e<=Ge||e>=Fe&&e<=He}function B(e,t,n,i){let r="",s=0,l=-1,o=0,a=0;for(let c=0;c<=e.length;++c){if(c<e.length)a=e.charCodeAt(c);else{if(i(a))break;a=C}if(i(a)){if(!(l===c-1||o===1))if(o===2){if(r.length<2||s!==2||r.charCodeAt(r.length-1)!==R||r.charCodeAt(r.length-2)!==R){if(r.length>2){let g=r.lastIndexOf(n);g===-1?(r="",s=0):(r=r.slice(0,g),s=r.length-1-r.lastIndexOf(n)),l=c,o=0;continue}else if(r.length!==0){r="",s=0,l=c,o=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",s=2)}else r.length>0?r+=`${n}${e.slice(l+1,c)}`:r=e.slice(l+1,c),s=c-l-1;l=c,o=0}else a===R&&o!==-1?++o:o=-1}return r}function Ve(e){return e?`${e[0]==="."?"":"."}${e}`:""}function fe(e,t){je(t,"pathObject");let n=t.dir||t.root,i=t.base||`${t.name||""}${Ve(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}var m={resolve(...e){let t="",n="",i=!1;for(let r=e.length-1;r>=-1;r--){let s;if(r>=0){if(s=e[r],h(s,`paths[${r}]`),s.length===0)continue}else t.length===0?s=z():(s=ae[`=${t}`]||z(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===x)&&(s=`${t}\\`));let l=s.length,o=0,a="",c=!1,g=s.charCodeAt(0);if(l===1)d(g)&&(o=1,c=!0);else if(d(g))if(c=!0,d(s.charCodeAt(1))){let f=2,u=f;for(;f<l&&!d(s.charCodeAt(f));)f++;if(f<l&&f!==u){let W=s.slice(u,f);for(u=f;f<l&&d(s.charCodeAt(f));)f++;if(f<l&&f!==u){for(u=f;f<l&&!d(s.charCodeAt(f));)f++;(f===l||f!==u)&&(a=`\\\\${W}\\${s.slice(u,f)}`,o=f)}}}else o=1;else y(g)&&s.charCodeAt(1)===I&&(a=s.slice(0,2),o=2,l>2&&d(s.charCodeAt(2))&&(c=!0,o=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(i){if(t.length>0)break}else if(n=`${s.slice(o)}\\${n}`,i=c,c&&t.length>0)break}return n=B(n,!i,"\\",d),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){h(e,"path");let t=e.length;if(t===0)return".";let n=0,i,r=!1,s=e.charCodeAt(0);if(t===1)return X(s)?"\\":e;if(d(s))if(r=!0,d(e.charCodeAt(1))){let o=2,a=o;for(;o<t&&!d(e.charCodeAt(o));)o++;if(o<t&&o!==a){let c=e.slice(a,o);for(a=o;o<t&&d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&!d(e.charCodeAt(o));)o++;if(o===t)return`\\\\${c}\\${e.slice(a)}\\`;o!==a&&(i=`\\\\${c}\\${e.slice(a,o)}`,n=o)}}}else n=1;else y(s)&&e.charCodeAt(1)===I&&(i=e.slice(0,2),n=2,t>2&&d(e.charCodeAt(2))&&(r=!0,n=3));let l=n<t?B(e.slice(n),!r,"\\",d):"";if(l.length===0&&!r&&(l="."),l.length>0&&d(e.charCodeAt(t-1))&&(l+="\\"),!r&&i===void 0&&e.includes(":")){if(l.length>=2&&y(l.charCodeAt(0))&&l.charCodeAt(1)===I)return`.\\${l}`;let o=e.indexOf(":");do if(o===t-1||d(e.charCodeAt(o+1)))return`.\\${l}`;while((o=e.indexOf(":",o+1))!==-1)}return i===void 0?r?`\\${l}`:l:r?`${i}\\${l}`:`${i}${l}`},isAbsolute(e){h(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return d(n)||t>2&&y(n)&&e.charCodeAt(1)===I&&d(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s<e.length;++s){let l=e[s];h(l,"path"),l.length>0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let i=!0,r=0;if(typeof n=="string"&&d(n.charCodeAt(0))){++r;let s=n.length;s>1&&d(n.charCodeAt(1))&&(++r,s>2&&(d(n.charCodeAt(2))?++r:i=!1))}if(i){for(;r<t.length&&d(t.charCodeAt(r));)r++;r>=2&&(t=`\\${t.slice(r)}`)}return m.normalize(t)},relative(e,t){if(h(e,"from"),h(t,"to"),e===t)return"";let n=m.resolve(e),i=m.resolve(t);if(n===i||(e=n.toLowerCase(),t=i.toLowerCase(),e===t))return"";if(n.length!==e.length||i.length!==t.length){let S=n.split("\\"),N=i.split("\\");S[S.length-1]===""&&S.pop(),N[N.length-1]===""&&N.pop();let D=S.length,Q=N.length,M=D<Q?D:Q,w;for(w=0;w<M&&S[w].toLowerCase()===N[w].toLowerCase();w++);return w===0?i:w===M?Q>M?N.slice(w).join("\\"):D>M?"..\\".repeat(D-1-w)+"..":"":"..\\".repeat(D-w)+N.slice(w).join("\\")}let r=0;for(;r<e.length&&e.charCodeAt(r)===x;)r++;let s=e.length;for(;s-1>r&&e.charCodeAt(s-1)===x;)s--;let l=s-r,o=0;for(;o<t.length&&t.charCodeAt(o)===x;)o++;let a=t.length;for(;a-1>o&&t.charCodeAt(a-1)===x;)a--;let c=a-o,g=l<c?l:c,f=-1,u=0;for(;u<g;u++){let S=e.charCodeAt(r+u);if(S!==t.charCodeAt(o+u))break;S===x&&(f=u)}if(u!==g){if(f===-1)return i}else{if(c>g){if(t.charCodeAt(o+u)===x)return i.slice(o+u+1);if(u===2)return i.slice(o+u)}l>g&&(e.charCodeAt(r+u)===x?f=u:u===2&&(f=3)),f===-1&&(f=0)}let W="";for(u=r+f+1;u<=s;++u)(u===s||e.charCodeAt(u)===x)&&(W+=W.length===0?"..":"\\..");return o+=f,W.length>0?`${W}${i.slice(o,a)}`:(i.charCodeAt(o)===x&&++o,i.slice(o,a))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=m.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===x){if(t.charCodeAt(1)===x){let n=t.charCodeAt(2);if(n!==Ue&&n!==R)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===I&&t.charCodeAt(2)===x)return`\\\\?\\${t}`;return t},dirname(e){h(e,"path");let t=e.length;if(t===0)return".";let n=-1,i=0,r=e.charCodeAt(0);if(t===1)return d(r)?e:".";if(d(r)){if(n=i=1,d(e.charCodeAt(1))){let o=2,a=o;for(;o<t&&!d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&d(e.charCodeAt(o));)o++;if(o<t&&o!==a){for(a=o;o<t&&!d(e.charCodeAt(o));)o++;if(o===t)return e;o!==a&&(n=i=o+1)}}}}else y(r)&&e.charCodeAt(1)===I&&(n=t>2&&d(e.charCodeAt(2))?3:2,i=n);let s=-1,l=!0;for(let o=t-1;o>=i;--o)if(d(e.charCodeAt(o))){if(!l){s=o;break}}else l=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,r=!0,s;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===I&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,o=-1;for(s=e.length-1;s>=n;--s){let a=e.charCodeAt(s);if(d(a)){if(!r){n=s+1;break}}else o===-1&&(r=!1,o=s+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=s):(l=-1,i=o))}return n===i?i=o:i===-1&&(i=e.length),e.slice(n,i)}for(s=e.length-1;s>=n;--s)if(d(e.charCodeAt(s))){if(!r){n=s+1;break}}else i===-1&&(r=!1,i=s+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=0,n=-1,i=0,r=-1,s=!0,l=0;e.length>=2&&e.charCodeAt(1)===I&&y(e.charCodeAt(0))&&(t=i=2);for(let o=e.length-1;o>=t;--o){let a=e.charCodeAt(o);if(d(a)){if(!s){i=o+1;break}continue}r===-1&&(s=!1,r=o+1),a===R?n===-1?n=o:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===i+1?"":e.slice(n,r)},format:fe.bind(null,"\\"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,i=0,r=e.charCodeAt(0);if(n===1)return d(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(d(r)){if(i=1,d(e.charCodeAt(1))){let f=2,u=f;for(;f<n&&!d(e.charCodeAt(f));)f++;if(f<n&&f!==u){for(u=f;f<n&&d(e.charCodeAt(f));)f++;if(f<n&&f!==u){for(u=f;f<n&&!d(e.charCodeAt(f));)f++;f===n?i=f:f!==u&&(i=f+1)}}}}else if(y(r)&&e.charCodeAt(1)===I){if(n<=2)return t.root=t.dir=e,t;if(i=2,d(e.charCodeAt(2))){if(n===3)return t.root=t.dir=e,t;i=3}}i>0&&(t.root=e.slice(0,i));let s=-1,l=i,o=-1,a=!0,c=e.length-1,g=0;for(;c>=i;--c){if(r=e.charCodeAt(c),d(r)){if(!a){l=c+1;break}continue}o===-1&&(a=!1,o=c+1),r===R?s===-1?s=c:g!==1&&(g=1):s!==-1&&(g=-1)}return o!==-1&&(s===-1||g===0||g===1&&s===o-1&&s===l+1?t.base=t.name=e.slice(l,o):(t.name=e.slice(l,s),t.base=e.slice(l,o),t.ext=e.slice(s,o))),l>0&&l!==i?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Be=(()=>{if(b){let e=/\\/g;return()=>{let t=z().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>z()})(),p={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=0&&!n;i--){let r=e[i];h(r,`paths[${i}]`),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===C)}if(!n){let i=Be();t=`${i}/${t}`,n=i.charCodeAt(0)===C}return t=B(t,!n,"/",X),n?`/${t}`:t.length>0?t:"."},normalize(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===C,n=e.charCodeAt(e.length-1)===C;return e=B(e,!t,"/",X),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return h(e,"path"),e.length>0&&e.charCodeAt(0)===C},join(...e){if(e.length===0)return".";let t=[];for(let n=0;n<e.length;++n){let i=e[n];h(i,"path"),i.length>0&&t.push(i)}return t.length===0?".":p.normalize(t.join("/"))},relative(e,t){if(h(e,"from"),h(t,"to"),e===t||(e=p.resolve(e),t=p.resolve(t),e===t))return"";let n=1,i=e.length,r=i-n,s=1,l=t.length-s,o=r<l?r:l,a=-1,c=0;for(;c<o;c++){let f=e.charCodeAt(n+c);if(f!==t.charCodeAt(s+c))break;f===C&&(a=c)}if(c===o)if(l>o){if(t.charCodeAt(s+c)===C)return t.slice(s+c+1);if(c===0)return t.slice(s+c)}else r>o&&(e.charCodeAt(n+c)===C?a=c:c===0&&(a=0));let g="";for(c=n+a+1;c<=i;++c)(c===i||e.charCodeAt(c)===C)&&(g+=g.length===0?"..":"/..");return`${g}${t.slice(s+a)}`},toNamespacedPath(e){return e},dirname(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===C,n=-1,i=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===C){if(!i){n=r;break}}else i=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,r=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){let a=e.charCodeAt(s);if(a===C){if(!r){n=s+1;break}}else o===-1&&(r=!1,o=s+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=s):(l=-1,i=o))}return n===i?i=o:i===-1&&(i=e.length),e.slice(n,i)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===C){if(!r){n=s+1;break}}else i===-1&&(r=!1,i=s+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=-1,n=0,i=-1,r=!0,s=0;for(let l=e.length-1;l>=0;--l){let o=e[l];if(o==="/"){if(!r){n=l+1;break}continue}i===-1&&(r=!1,i=l+1),o==="."?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===n+1?"":e.slice(t,i)},format:fe.bind(null,"/"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===C,i;n?(t.root="/",i=1):i=0;let r=-1,s=0,l=-1,o=!0,a=e.length-1,c=0;for(;a>=i;--a){let g=e.charCodeAt(a);if(g===C){if(!o){s=a+1;break}continue}l===-1&&(o=!1,l=a+1),g===R?r===-1?r=a:c!==1&&(c=1):r!==-1&&(c=-1)}if(l!==-1){let g=s===0&&n?1:s;r===-1||c===0||c===1&&r===l-1&&r===s+1?t.base=t.name=e.slice(g,l):(t.name=e.slice(g,r),t.base=e.slice(g,l),t.ext=e.slice(r,l))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};p.win32=m.win32=m;p.posix=m.posix=p;var ht=b?m.normalize:p.normalize,mt=b?m.isAbsolute:p.isAbsolute,pt=b?m.join:p.join,Ct=b?m.resolve:p.resolve,At=b?m.relative:p.relative,xt=b?m.dirname:p.dirname,bt=b?m.basename:p.basename,wt=b?m.extname:p.extname,vt=b?m.format:p.format,Lt=b?m.parse:p.parse,Pt=b?m.toNamespacedPath:p.toNamespacedPath,$t=b?m.sep:p.sep,ee=b?m.delimiter:p.delimiter;var de="0.0.394",qe="@github/copilot",O={...process.env,PATH:(process.env.PATH||"").replaceAll(`${__dirname}${ee}`,"").replaceAll(`${ee}${__dirname}`,"")},he=ge.createInterface({input:process.stdin,output:process.stdout});function q(e){process.stdout.write(e+`
|
| 2 |
+
`)}function v(e){process.stderr.write(e+`
|
| 3 |
+
`)}function me(e){return new Promise(t=>{he.question(`${e} ['y/N'] `,n=>{t(n.toLowerCase()[0]==="y")})})}function ue(e){let t=e.replace(/^v/,"").split(".");return[0,1,2].map(n=>parseInt((t[n]||"0").replace(/[^0-9].*$/,""),10)||0)}function Qe(e,t){let n=ue(e),i=ue(t);for(let r=0;r<3;r++){if(n[r]>i[r])return!0;if(n[r]<i[r])return!1}return!0}function Ye(){let e=(0,E.spawnSync)("copilot --version",{env:O,shell:!0,encoding:"utf8"});if(e.error||e.status!==0)return;let t=e.stdout.match(/[0-9]+\.[0-9]+\.[0-9]+/);return t?{version:t[0],installed:!0}:{installed:!0}}function Ze(e,t){let n=(0,E.spawnSync)("npm",e,{stdio:"inherit",env:O});return n.error?(v(`${t} failed: ${n.error.message}`),!1):n.status!==0?(v(`${t} failed with exit code ${n.status}`),!1):!0}function Je(e){let t=(0,E.spawnSync)("brew",["install","copilot-cli"],{stdio:"inherit",env:O});return t.error?(v(`${e} via brew failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via brew failed with exit code ${t.status}`),!1):!0}function Xe(e){let t=(0,E.spawnSync)("bash",["-c","curl -fsSL https://gh.io/copilot-install | bash"],{stdio:"inherit",env:O});return t.error?(v(`${e} via curl failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via curl failed with exit code ${t.status}`),!1):!0}function et(e){let t=(0,E.spawnSync)("bash",["-c","wget -qO- https://gh.io/copilot-install | bash"],{stdio:"inherit",env:O});return t.error?(v(`${e} via wget failed: ${t.error.message}`),!1):t.status!==0?(v(`${e} via wget failed with exit code ${t.status}`),!1):!0}function K(e){let t=(0,E.spawnSync)("sh",["-c",`command -v ${e}`],{env:O,encoding:"utf8"});return!t.error&&t.status===0}function pe(e,t=!1){return!!(K("npm")&&Ze([t?"update":"install","-g",qe],e)||K("brew")&&(q(`npm is not available or ${t?"update":"installation"} failed. Trying brew...`),Je(e))||K("curl")&&(q("Trying install script via curl..."),Xe(e))||K("wget")&&(q("Trying install script via wget..."),et(e)))}async function Ce(){let e=Ye();if(!e)if(v("Cannot find GitHub Copilot CLI (https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)"),await me("Install GitHub Copilot CLI?")){if(pe("Installing"))return Ce();await te()}else process.exit(0);return e}async function tt(e){if(!Qe(e,de))if(v(`GitHub Copilot CLI version ${e} is not compatible.`),q(`Version ${de} or later is required.`),await me("Update GitHub Copilot CLI?")){if(pe("Update",!0))return!0;await te()}else process.exit(0)}async function te(e="Press Enter to exit..."){await new Promise(t=>{he.question(`${e}`,()=>{t()})}),process.exit(0)}(async function(){let t=await Ce();t?.version&&await tt(t.version),t||(v("Error: Could not locate Copilot CLI after update."),await te("Try manually reinstalling (https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli)"));let n=process.argv.slice(2);n[0]==="--clear"&&(console.clear(),n.shift()),(0,E.spawnSync)("copilot",n,{stdio:"inherit",env:O}),process.exit(0)})();
|
| 4 |
+
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotCLITodoWorker.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";var d=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var R=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!h.call(r,s)&&s!==t&&d(r,s,{get:()=>e[s],enumerable:!(n=y(e,s))||n.enumerable});return r};var f=r=>R(d({},"__esModule",{value:!0}),r);var g={};module.exports=f(g);var l=require("node:fs"),c=require("node:sqlite"),a=require("worker_threads");var i=class{constructor(){this.nextId=1;this.handlers=new Map}createHandler(){let e=this.nextId++,t,n,s=new Promise((p,o)=>{t=p,n=o});return this.handlers.set(e,{resolve:t,reject:n}),{id:e,result:s}}handleResponse(e){let t=this.handlers.get(e.id);t&&(this.handlers.delete(e.id),e.err?t.reject(e.err):t.resolve(e.res))}handleError(e){for(let t of this.handlers.values())t.reject(e);this.handlers.clear()}clear(){this.handlers.clear()}};var w=new i;a.parentPort.on("message",r=>{if("fn"in r)try{let e=x(r.fn,r.args);a.parentPort.postMessage({id:r.id,res:e})}catch(e){a.parentPort.postMessage({id:r.id,err:e})}else w.handleResponse(r)});function x(r,e){if(r==="queryTodos")return k(e[0]);throw new Error(`Unknown function: ${r}`)}function k(r){if(!(0,l.existsSync)(r))return[];let e;try{return e=new c.DatabaseSync(r,{open:!0}),e.exec("PRAGMA busy_timeout = 2000"),e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='todos'").all().length===0?[]:e.prepare("SELECT id, title, description, status FROM todos ORDER BY created_at ASC").all().map(o=>({id:String(o.id??""),title:String(o.title??""),description:String(o.description??""),status:String(o.status??"pending")}))}finally{e?.close()}}
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/copilotDebugCommand.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";var be=Object.create;var ee=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var ye=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Se=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of we(t))!Pe.call(e,o)&&o!==n&&ee(e,o,{get:()=>t[o],enumerable:!(i=ve(t,o))||i.enumerable});return e};var Le=(e,t,n)=>(n=e!=null?be(ye(e)):{},Se(t||!e||!e.__esModule?ee(n,"default",{value:e,enumerable:!0}):n,e));var me=require("crypto"),xe=require("node:net"),Ce=require("os"),K=Le(require("readline"));function Y(){return globalThis._VSCODE_NLS_LANGUAGE}var tt=Y()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;var k="en",U=!1,G=!1,z=!1,Ee=!1,_e=!1,ne=!1,$e=!1,Ne=!1,Re=!1,Oe=!1,T,j=k,te=k,ke,y,P=globalThis,C;typeof P.vscode<"u"&&typeof P.vscode.process<"u"?C=P.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(C=process);var re=typeof C?.versions?.electron=="string",Me=re&&C?.type==="renderer";if(typeof C=="object"){U=C.platform==="win32",G=C.platform==="darwin",z=C.platform==="linux",Ee=z&&!!C.env.SNAP&&!!C.env.SNAP_REVISION,$e=re,Re=!!C.env.CI||!!C.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!C.env.GITHUB_WORKSPACE,T=k,j=k;let e=C.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);T=t.userLocale,te=t.osLocale,j=t.resolvedLanguage||k,ke=t.languagePack?.translationsConfigFile}catch{}_e=!0}else typeof navigator=="object"&&!Me?(y=navigator.userAgent,U=y.indexOf("Windows")>=0,G=y.indexOf("Macintosh")>=0,Ne=(y.indexOf("Macintosh")>=0||y.indexOf("iPad")>=0||y.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,z=y.indexOf("Linux")>=0,Oe=y?.indexOf("Mobi")>=0,ne=!0,j=Y()||k,T=navigator.language.toLowerCase(),te=T):console.error("Unable to resolve platform.");var Q=0;G?Q=1:U?Q=3:z&&(Q=2);var se=U,ie=G;var De=ne&&typeof P.importScripts=="function",nt=De?P.origin:void 0;var w=y,_=j,We;(i=>{function e(){return _}i.value=e;function t(){return _.length===2?_==="en":_.length>=3?_[0]==="e"&&_[1]==="n"&&_[2]==="-":!1}i.isDefaultVariant=t;function n(){return _==="en"}i.isDefault=n})(We||={});var Fe=typeof P.postMessage=="function"&&!P.importScripts,rt=(()=>{if(Fe){let e=[];P.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let i=0,o=e.length;i<o;i++){let r=e[i];if(r.id===n.data.vscodeScheduleAsyncWork){e.splice(i,1),r.callback();return}}});let t=0;return n=>{let i=++t;e.push({id:i,callback:n}),P.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})();var Te=!!(w&&w.indexOf("Chrome")>=0),st=!!(w&&w.indexOf("Firefox")>=0),it=!!(!Te&&w&&w.indexOf("Safari")>=0),ot=!!(w&&w.indexOf("Edg/")>=0),lt=!!(w&&w.indexOf("Android")>=0);var N,Z=globalThis.vscode;if(typeof Z<"u"&&typeof Z.process<"u"){let e=Z.process;N={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?N={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:N={get platform(){return se?"win32":ie?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var D=N.cwd,oe=N.env,le=N.platform,dt=N.arch;var je=65,Ue=97,Ge=90,He=122,R=46,x=47,A=92,S=58,Ve=63,H=class extends Error{constructor(t,n,i){let o;typeof n=="string"&&n.indexOf("not ")===0?(o="must not be",n=n.replace(/^not /,"")):o="must be";let r=t.indexOf(".")!==-1?"property":"argument",l=`The "${t}" ${r} ${o} of type ${n}`;l+=`. Received type ${typeof i}`,super(l),this.code="ERR_INVALID_ARG_TYPE"}};function qe(e,t){if(e===null||typeof e!="object")throw new H(t,"Object",e)}function h(e,t){if(typeof e!="string")throw new H(t,"string",e)}var b=le==="win32";function d(e){return e===x||e===A}function X(e){return e===x}function L(e){return e>=je&&e<=Ge||e>=Ue&&e<=He}function V(e,t,n,i){let o="",r=0,l=-1,s=0,a=0;for(let c=0;c<=e.length;++c){if(c<e.length)a=e.charCodeAt(c);else{if(i(a))break;a=x}if(i(a)){if(!(l===c-1||s===1))if(s===2){if(o.length<2||r!==2||o.charCodeAt(o.length-1)!==R||o.charCodeAt(o.length-2)!==R){if(o.length>2){let u=o.lastIndexOf(n);u===-1?(o="",r=0):(o=o.slice(0,u),r=o.length-1-o.lastIndexOf(n)),l=c,s=0;continue}else if(o.length!==0){o="",r=0,l=c,s=0;continue}}t&&(o+=o.length>0?`${n}..`:"..",r=2)}else o.length>0?o+=`${n}${e.slice(l+1,c)}`:o=e.slice(l+1,c),r=c-l-1;l=c,s=0}else a===R&&s!==-1?++s:s=-1}return o}function Be(e){return e?`${e[0]==="."?"":"."}${e}`:""}function ae(e,t){qe(t,"pathObject");let n=t.dir||t.root,i=t.base||`${t.name||""}${Be(t.ext)}`;return n?n===t.root?`${n}${i}`:`${n}${e}${i}`:i}var p={resolve(...e){let t="",n="",i=!1;for(let o=e.length-1;o>=-1;o--){let r;if(o>=0){if(r=e[o],h(r,`paths[${o}]`),r.length===0)continue}else t.length===0?r=D():(r=oe[`=${t}`]||D(),(r===void 0||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===A)&&(r=`${t}\\`));let l=r.length,s=0,a="",c=!1,u=r.charCodeAt(0);if(l===1)d(u)&&(s=1,c=!0);else if(d(u))if(c=!0,d(r.charCodeAt(1))){let f=2,g=f;for(;f<l&&!d(r.charCodeAt(f));)f++;if(f<l&&f!==g){let O=r.slice(g,f);for(g=f;f<l&&d(r.charCodeAt(f));)f++;if(f<l&&f!==g){for(g=f;f<l&&!d(r.charCodeAt(f));)f++;(f===l||f!==g)&&(a=`\\\\${O}\\${r.slice(g,f)}`,s=f)}}}else s=1;else L(u)&&r.charCodeAt(1)===S&&(a=r.slice(0,2),s=2,l>2&&d(r.charCodeAt(2))&&(c=!0,s=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(i){if(t.length>0)break}else if(n=`${r.slice(s)}\\${n}`,i=c,c&&t.length>0)break}return n=V(n,!i,"\\",d),i?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){h(e,"path");let t=e.length;if(t===0)return".";let n=0,i,o=!1,r=e.charCodeAt(0);if(t===1)return X(r)?"\\":e;if(d(r))if(o=!0,d(e.charCodeAt(1))){let s=2,a=s;for(;s<t&&!d(e.charCodeAt(s));)s++;if(s<t&&s!==a){let c=e.slice(a,s);for(a=s;s<t&&d(e.charCodeAt(s));)s++;if(s<t&&s!==a){for(a=s;s<t&&!d(e.charCodeAt(s));)s++;if(s===t)return`\\\\${c}\\${e.slice(a)}\\`;s!==a&&(i=`\\\\${c}\\${e.slice(a,s)}`,n=s)}}}else n=1;else L(r)&&e.charCodeAt(1)===S&&(i=e.slice(0,2),n=2,t>2&&d(e.charCodeAt(2))&&(o=!0,n=3));let l=n<t?V(e.slice(n),!o,"\\",d):"";if(l.length===0&&!o&&(l="."),l.length>0&&d(e.charCodeAt(t-1))&&(l+="\\"),!o&&i===void 0&&e.includes(":")){if(l.length>=2&&L(l.charCodeAt(0))&&l.charCodeAt(1)===S)return`.\\${l}`;let s=e.indexOf(":");do if(s===t-1||d(e.charCodeAt(s+1)))return`.\\${l}`;while((s=e.indexOf(":",s+1))!==-1)}return i===void 0?o?`\\${l}`:l:o?`${i}\\${l}`:`${i}${l}`},isAbsolute(e){h(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return d(n)||t>2&&L(n)&&e.charCodeAt(1)===S&&d(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let r=0;r<e.length;++r){let l=e[r];h(l,"path"),l.length>0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let i=!0,o=0;if(typeof n=="string"&&d(n.charCodeAt(0))){++o;let r=n.length;r>1&&d(n.charCodeAt(1))&&(++o,r>2&&(d(n.charCodeAt(2))?++o:i=!1))}if(i){for(;o<t.length&&d(t.charCodeAt(o));)o++;o>=2&&(t=`\\${t.slice(o)}`)}return p.normalize(t)},relative(e,t){if(h(e,"from"),h(t,"to"),e===t)return"";let n=p.resolve(e),i=p.resolve(t);if(n===i||(e=n.toLowerCase(),t=i.toLowerCase(),e===t))return"";if(n.length!==e.length||i.length!==t.length){let E=n.split("\\"),$=i.split("\\");E[E.length-1]===""&&E.pop(),$[$.length-1]===""&&$.pop();let M=E.length,J=$.length,F=M<J?M:J,v;for(v=0;v<F&&E[v].toLowerCase()===$[v].toLowerCase();v++);return v===0?i:v===F?J>F?$.slice(v).join("\\"):M>F?"..\\".repeat(M-1-v)+"..":"":"..\\".repeat(M-v)+$.slice(v).join("\\")}let o=0;for(;o<e.length&&e.charCodeAt(o)===A;)o++;let r=e.length;for(;r-1>o&&e.charCodeAt(r-1)===A;)r--;let l=r-o,s=0;for(;s<t.length&&t.charCodeAt(s)===A;)s++;let a=t.length;for(;a-1>s&&t.charCodeAt(a-1)===A;)a--;let c=a-s,u=l<c?l:c,f=-1,g=0;for(;g<u;g++){let E=e.charCodeAt(o+g);if(E!==t.charCodeAt(s+g))break;E===A&&(f=g)}if(g!==u){if(f===-1)return i}else{if(c>u){if(t.charCodeAt(s+g)===A)return i.slice(s+g+1);if(g===2)return i.slice(s+g)}l>u&&(e.charCodeAt(o+g)===A?f=g:g===2&&(f=3)),f===-1&&(f=0)}let O="";for(g=o+f+1;g<=r;++g)(g===r||e.charCodeAt(g)===A)&&(O+=O.length===0?"..":"\\..");return s+=f,O.length>0?`${O}${i.slice(s,a)}`:(i.charCodeAt(s)===A&&++s,i.slice(s,a))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=p.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===A){if(t.charCodeAt(1)===A){let n=t.charCodeAt(2);if(n!==Ve&&n!==R)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(L(t.charCodeAt(0))&&t.charCodeAt(1)===S&&t.charCodeAt(2)===A)return`\\\\?\\${t}`;return t},dirname(e){h(e,"path");let t=e.length;if(t===0)return".";let n=-1,i=0,o=e.charCodeAt(0);if(t===1)return d(o)?e:".";if(d(o)){if(n=i=1,d(e.charCodeAt(1))){let s=2,a=s;for(;s<t&&!d(e.charCodeAt(s));)s++;if(s<t&&s!==a){for(a=s;s<t&&d(e.charCodeAt(s));)s++;if(s<t&&s!==a){for(a=s;s<t&&!d(e.charCodeAt(s));)s++;if(s===t)return e;s!==a&&(n=i=s+1)}}}}else L(o)&&e.charCodeAt(1)===S&&(n=t>2&&d(e.charCodeAt(2))?3:2,i=n);let r=-1,l=!0;for(let s=t-1;s>=i;--s)if(d(e.charCodeAt(s))){if(!l){r=s;break}}else l=!1;if(r===-1){if(n===-1)return".";r=n}return e.slice(0,r)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,o=!0,r;if(e.length>=2&&L(e.charCodeAt(0))&&e.charCodeAt(1)===S&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,s=-1;for(r=e.length-1;r>=n;--r){let a=e.charCodeAt(r);if(d(a)){if(!o){n=r+1;break}}else s===-1&&(o=!1,s=r+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=r):(l=-1,i=s))}return n===i?i=s:i===-1&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=n;--r)if(d(e.charCodeAt(r))){if(!o){n=r+1;break}}else i===-1&&(o=!1,i=r+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=0,n=-1,i=0,o=-1,r=!0,l=0;e.length>=2&&e.charCodeAt(1)===S&&L(e.charCodeAt(0))&&(t=i=2);for(let s=e.length-1;s>=t;--s){let a=e.charCodeAt(s);if(d(a)){if(!r){i=s+1;break}continue}o===-1&&(r=!1,o=s+1),a===R?n===-1?n=s:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||o===-1||l===0||l===1&&n===o-1&&n===i+1?"":e.slice(n,o)},format:ae.bind(null,"\\"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,i=0,o=e.charCodeAt(0);if(n===1)return d(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(d(o)){if(i=1,d(e.charCodeAt(1))){let f=2,g=f;for(;f<n&&!d(e.charCodeAt(f));)f++;if(f<n&&f!==g){for(g=f;f<n&&d(e.charCodeAt(f));)f++;if(f<n&&f!==g){for(g=f;f<n&&!d(e.charCodeAt(f));)f++;f===n?i=f:f!==g&&(i=f+1)}}}}else if(L(o)&&e.charCodeAt(1)===S){if(n<=2)return t.root=t.dir=e,t;if(i=2,d(e.charCodeAt(2))){if(n===3)return t.root=t.dir=e,t;i=3}}i>0&&(t.root=e.slice(0,i));let r=-1,l=i,s=-1,a=!0,c=e.length-1,u=0;for(;c>=i;--c){if(o=e.charCodeAt(c),d(o)){if(!a){l=c+1;break}continue}s===-1&&(a=!1,s=c+1),o===R?r===-1?r=c:u!==1&&(u=1):r!==-1&&(u=-1)}return s!==-1&&(r===-1||u===0||u===1&&r===s-1&&r===l+1?t.base=t.name=e.slice(l,s):(t.name=e.slice(l,r),t.base=e.slice(l,s),t.ext=e.slice(r,s))),l>0&&l!==i?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},Ke=(()=>{if(b){let e=/\\/g;return()=>{let t=D().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>D()})(),m={resolve(...e){let t="",n=!1;for(let i=e.length-1;i>=0&&!n;i--){let o=e[i];h(o,`paths[${i}]`),o.length!==0&&(t=`${o}/${t}`,n=o.charCodeAt(0)===x)}if(!n){let i=Ke();t=`${i}/${t}`,n=i.charCodeAt(0)===x}return t=V(t,!n,"/",X),n?`/${t}`:t.length>0?t:"."},normalize(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===x,n=e.charCodeAt(e.length-1)===x;return e=V(e,!t,"/",X),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return h(e,"path"),e.length>0&&e.charCodeAt(0)===x},join(...e){if(e.length===0)return".";let t=[];for(let n=0;n<e.length;++n){let i=e[n];h(i,"path"),i.length>0&&t.push(i)}return t.length===0?".":m.normalize(t.join("/"))},relative(e,t){if(h(e,"from"),h(t,"to"),e===t||(e=m.resolve(e),t=m.resolve(t),e===t))return"";let n=1,i=e.length,o=i-n,r=1,l=t.length-r,s=o<l?o:l,a=-1,c=0;for(;c<s;c++){let f=e.charCodeAt(n+c);if(f!==t.charCodeAt(r+c))break;f===x&&(a=c)}if(c===s)if(l>s){if(t.charCodeAt(r+c)===x)return t.slice(r+c+1);if(c===0)return t.slice(r+c)}else o>s&&(e.charCodeAt(n+c)===x?a=c:c===0&&(a=0));let u="";for(c=n+a+1;c<=i;++c)(c===i||e.charCodeAt(c)===x)&&(u+=u.length===0?"..":"/..");return`${u}${t.slice(r+a)}`},toNamespacedPath(e){return e},dirname(e){if(h(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===x,n=-1,i=!0;for(let o=e.length-1;o>=1;--o)if(e.charCodeAt(o)===x){if(!i){n=o;break}}else i=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&h(t,"suffix"),h(e,"path");let n=0,i=-1,o=!0,r;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,s=-1;for(r=e.length-1;r>=0;--r){let a=e.charCodeAt(r);if(a===x){if(!o){n=r+1;break}}else s===-1&&(o=!1,s=r+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(i=r):(l=-1,i=s))}return n===i?i=s:i===-1&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===x){if(!o){n=r+1;break}}else i===-1&&(o=!1,i=r+1);return i===-1?"":e.slice(n,i)},extname(e){h(e,"path");let t=-1,n=0,i=-1,o=!0,r=0;for(let l=e.length-1;l>=0;--l){let s=e[l];if(s==="/"){if(!o){n=l+1;break}continue}i===-1&&(o=!1,i=l+1),s==="."?t===-1?t=l:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||i===-1||r===0||r===1&&t===i-1&&t===n+1?"":e.slice(t,i)},format:ae.bind(null,"/"),parse(e){h(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===x,i;n?(t.root="/",i=1):i=0;let o=-1,r=0,l=-1,s=!0,a=e.length-1,c=0;for(;a>=i;--a){let u=e.charCodeAt(a);if(u===x){if(!s){r=a+1;break}continue}l===-1&&(s=!1,l=a+1),u===R?o===-1?o=a:c!==1&&(c=1):o!==-1&&(c=-1)}if(l!==-1){let u=r===0&&n?1:r;o===-1||c===0||c===1&&o===l-1&&o===r+1?t.base=t.name=e.slice(u,l):(t.name=e.slice(u,o),t.base=e.slice(u,l),t.ext=e.slice(o,l))}return r>0?t.dir=e.slice(0,r-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};m.win32=p.win32=p;m.posix=p.posix=m;var gt=b?p.normalize:m.normalize,ut=b?p.isAbsolute:m.isAbsolute,ce=b?p.join:m.join,ht=b?p.resolve:m.resolve,pt=b?p.relative:m.relative,mt=b?p.dirname:m.dirname,xt=b?p.basename:m.basename,Ct=b?p.extname:m.extname,At=b?p.format:m.format,bt=b?p.parse:m.parse,vt=b?p.toNamespacedPath:m.toNamespacedPath,wt=b?p.sep:m.sep,yt=b?p.delimiter:m.delimiter;var fe=require("child_process"),de=(e,t)=>{let n,i=!1,o=[t];if(e){let[r,...l]=e.split(" ");n=r,o=[...l,t]}else switch(process.platform){case"win32":n="cmd",i=!0,o=["/c","start",'""',`"${t}"`];break;case"darwin":n="open";break;default:n="xdg-open";break}return new Promise((r,l)=>{let s="",a=(0,fe.spawn)(n,o,{stdio:"pipe",shell:i,env:{...process.env,ELECTRON_RUN_AS_NODE:void 0}});a.stdout.setEncoding("utf8").on("data",c=>s+=c),a.stderr.setEncoding("utf8").on("data",c=>s+=c),a.on("error",l),a.on("exit",c=>{c!==0?l(new Error(`Failed to open: ${s}`)):r()})})};var ge=require("stream"),q=class extends ge.Transform{constructor(n){super();this.prefix=[];this.splitSuffix=Buffer.alloc(0);if(typeof n=="string"&&n.length===1)this.splitter=n.charCodeAt(0);else if(typeof n=="number")this.splitter=n;else throw new Error("not implemented here")}_transform(n,i,o){let r=0;for(;r<n.length;){let l=n.indexOf(this.splitter,r);if(l===-1)break;let s=n.subarray(r,l),a=this.prefix.length||this.splitSuffix.length?Buffer.concat([...this.prefix,s,this.splitSuffix]):s;this.push(a),this.prefix.length=0,r=l+1}r<n.length&&this.prefix.push(n.subarray(r)),o()}_flush(n){this.prefix.length&&this.push(Buffer.concat([...this.prefix,this.splitSuffix])),n()}};var ue=process.platform==="win32"?`\r
|
| 2 |
+
`:`
|
| 3 |
+
`,B=class{constructor(t){this.stream=t;this.methods=new Map;this.pendingRequests=new Map;this.idCounter=0,this.stream.pipe(new q(`
|
| 4 |
+
`)).on("data",n=>this.handleData(n)),this.ended=new Promise(n=>this.stream.on("end",()=>{this.didEnd=!0,n()}))}registerMethod(t,n){this.methods.set(t,n)}async callMethod(t,n){let i=this.idCounter++,o={id:i,method:t,params:n},r=new Promise((l,s)=>{this.pendingRequests.set(i,{resolve:l,reject:s})});return this.stream.write(JSON.stringify(o)+ue),Promise.race([r,this.ended])}dispose(){this.didEnd=!0,this.stream.end();for(let{reject:t}of this.pendingRequests.values())t(new Error("RPC connection closed"));this.pendingRequests.clear()}async handleData(t){let n=JSON.parse(t.toString());if("method"in n){let{id:i,method:o,params:r}=n,l={id:i};try{if(this.methods.has(o)){let s=await this.methods.get(o)(r);l.result=s}else throw new Error(`Method not found: ${o}`)}catch(s){l.error={code:-1,message:String(s.stack||s)}}this.didEnd||this.stream.write(JSON.stringify(l)+ue)}else{let{id:i,result:o,error:r}=n,l=this.pendingRequests.get(i);this.pendingRequests.delete(i),r!==void 0?l?.reject(new Error(r.message)):l?.resolve(o)}}};var[$t,Nt,Ye,Qe,...W]=process.argv;var I={"--print":!1,"--no-cache":!1,"--help":!1,"--save":!1,"--once":!1};for(;W.length&&I.hasOwnProperty(W[0]);)I[W.shift()]=!0;(!W.length||I["--help"])&&(console.log(`Usage: copilot-debug [${Object.keys(I).join("] [")}] <command> <args...>`),console.log(""),console.log("Options:"),console.log(" --print Print the generated configuration without running it"),console.log(" --no-cache Generate a new configuration without checking the cache."),console.log(" --save Save the configuration to your launch.json."),console.log(" --once Exit after the debug session ends."),console.log(" --help Print this help."),process.exit(I["--help"]?0:1));var he=K.createInterface({input:process.stdin,output:process.stdout});K.emitKeypressEvents(process.stdin);process.stdin.setRawMode(!0);var Ze=(0,xe.createServer)(e=>{clearInterval(Xe);let t=new B(e);t.registerMethod("output",({category:r,output:l})=>(r==="stderr"?process.stderr.write(l):r==="stdout"?process.stdout.write(l):r!=="telemetry"&&l&&console.log(l),Promise.resolve())),t.registerMethod("exit",async({code:r,error:l})=>{l&&!n&&console.error(l),await Promise.all([new Promise(s=>process.stdout.end(s)),new Promise(s=>process.stderr.end(s))]).then(()=>process.exit(r))});let n=!1;function i(){n?process.exit(1):(n=!0,e.end(()=>{process.exit(1)}))}process.on("SIGINT",i),process.stdin.on("keypress",(r,l)=>{(l.sequence===""||l.name==="c"&&(l.ctrl||l.meta))&&i()}),t.registerMethod("question",r=>new Promise(l=>{if(r.singleKey){console.log(r.message);let s=a=>{a&&(process.stdout.write("\b"),process.stdin.off("keypress",s),l(a===`
|
| 5 |
+
`||a==="\r"?"Enter":a?.toUpperCase()||""))};process.stdin.on("keypress",s)}else he.question(`${r.message} [${r.defaultValue}] `,l)})),t.registerMethod("confirm",r=>new Promise(l=>{he.question(`${r.message} [${r.defaultValue?"Y/n":"y/N"}] `,s=>{l(s===""?r.defaultValue:s.toLowerCase()[0]==="y")})}));let o={cwd:process.cwd(),args:W,forceNew:I["--no-cache"],printOnly:I["--print"],save:I["--save"],once:I["--once"],nonce:process.env.COPILOT_DEBUG_NONCE||""};t.callMethod("start",o)}),Xe=setInterval(()=>{console.log("> Waiting for VS Code to connect...")},2e3),Ae=`copilot-dbg.${process.pid}-${(0,me.randomBytes)(4).toString("hex")}.sock`,pe=ce(process.platform==="win32"?"\\\\.\\pipe\\":(0,Ce.tmpdir)(),Ae);Ze.listen(pe,()=>{de(Qe,Ye+(process.platform==="win32"?`/${Ae}`:pe)).then(()=>{},e=>{console.error("Failed to open the activation URI:",e),process.exit(1)})});
|
| 6 |
+
//!!! DO NOT modify, this file was COPIED from 'microsoft/vscode'
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/diffWorker.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
home/.vscode-server/cli/servers/Stable-1b6a188127eeaf9194f945eb6eb89a657e93c54c/server/extensions/copilot/dist/suggestionsPanelWebview.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";(()=>{var A=(function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}})();A.trustedTypes===void 0&&(A.trustedTypes={createPolicy:(r,t)=>t});var De={configurable:!1,enumerable:!1,writable:!1};A.FAST===void 0&&Reflect.defineProperty(A,"FAST",Object.assign({value:Object.create(null)},De));var j=A.FAST;if(j.getById===void 0){let r=Object.create(null);Reflect.defineProperty(j,"getById",Object.assign({value(t,e){let n=r[t];return n===void 0&&(n=e?r[t]=e():null),n}},De))}var B=Object.freeze([]);function bt(){let r=new WeakMap;return function(t){let e=r.get(t);if(e===void 0){let n=Reflect.getPrototypeOf(t);for(;e===void 0&&n!==null;)e=r.get(n),n=Reflect.getPrototypeOf(n);e=e===void 0?[]:e.slice(0),r.set(t,e)}return e}}var jt=A.FAST.getById(1,()=>{let r=[],t=[];function e(){if(t.length)throw t.shift()}function n(s){try{s.call()}catch(a){t.push(a),setTimeout(e,0)}}function o(){let a=0;for(;a<r.length;)if(n(r[a]),a++,a>1024){for(let l=0,c=r.length-a;l<c;l++)r[l]=r[l+a];r.length-=a,a=0}r.length=0}function i(s){r.length<1&&A.requestAnimationFrame(o),r.push(s)}return Object.freeze({enqueue:i,process:o})}),Ae=A.trustedTypes.createPolicy("fast-html",{createHTML:r=>r}),Vt=Ae,rt=`fast-${Math.random().toString(36).substring(2,8)}`,Ht=`${rt}{`,yt=`}${rt}`,h=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(r){if(Vt!==Ae)throw new Error("The HTML policy can only be set once.");Vt=r},createHTML(r){return Vt.createHTML(r)},isMarker(r){return r&&r.nodeType===8&&r.data.startsWith(rt)},extractDirectiveIndexFromMarker(r){return parseInt(r.data.replace(`${rt}:`,""))},createInterpolationPlaceholder(r){return`${Ht}${r}${yt}`},createCustomAttributePlaceholder(r,t){return`${r}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder(r){return`<!--${rt}:${r}-->`},queueUpdate:jt.enqueue,processUpdates:jt.process,nextUpdate(){return new Promise(jt.enqueue)},setAttribute(r,t,e){e==null?r.removeAttribute(t):r.setAttribute(t,e)},setBooleanAttribute(r,t,e){e?r.setAttribute(t,""):r.removeAttribute(t)},removeChildNodes(r){for(let t=r.firstChild;t!==null;t=r.firstChild)r.removeChild(t)},createTemplateWalker(r){return document.createTreeWalker(r,133,null,!1)}});var J=class{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){let e=this.spillover;if(e===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else e.indexOf(t)===-1&&e.push(t)}unsubscribe(t){let e=this.spillover;if(e===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}}notify(t){let e=this.spillover,n=this.source;if(e===void 0){let o=this.sub1,i=this.sub2;o!==void 0&&o.handleChange(n,t),i!==void 0&&i.handleChange(n,t)}else for(let o=0,i=e.length;o<i;++o)e[o].handleChange(n,t)}},X=class{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){var e;let n=this.subscribers[t];n!==void 0&&n.notify(t),(e=this.sourceSubscribers)===null||e===void 0||e.notify(t)}subscribe(t,e){var n;if(e){let o=this.subscribers[e];o===void 0&&(this.subscribers[e]=o=new J(this.source)),o.subscribe(t)}else this.sourceSubscribers=(n=this.sourceSubscribers)!==null&&n!==void 0?n:new J(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){var n;if(e){let o=this.subscribers[e];o!==void 0&&o.unsubscribe(t)}else(n=this.sourceSubscribers)===null||n===void 0||n.unsubscribe(t)}};var b=j.getById(2,()=>{let r=/(:|&&|\|\||if)/,t=new WeakMap,e=h.queueUpdate,n,o=c=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function i(c){let d=c.$fastController||t.get(c);return d===void 0&&(Array.isArray(c)?d=o(c):t.set(c,d=new X(c))),d}let s=bt();class a{constructor(d){this.name=d,this.field=`_${d}`,this.callback=`${d}Changed`}getValue(d){return n!==void 0&&n.watch(d,this.name),d[this.field]}setValue(d,m){let x=this.field,R=d[x];if(R!==m){d[x]=m;let w=d[this.callback];typeof w=="function"&&w.call(d,R,m),i(d).notify(this.name)}}}class l extends J{constructor(d,m,x=!1){super(d,m),this.binding=d,this.isVolatileBinding=x,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(d,m){this.needsRefresh&&this.last!==null&&this.disconnect();let x=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let R=this.binding(d,m);return n=x,R}disconnect(){if(this.last!==null){let d=this.first;for(;d!==void 0;)d.notifier.unsubscribe(this,d.propertyName),d=d.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(d,m){let x=this.last,R=i(d),w=x===null?this.first:{};if(w.propertySource=d,w.propertyName=m,w.notifier=R,R.subscribe(this,m),x!==null){if(!this.needsRefresh){let P;n=void 0,P=x.propertySource[x.propertyName],n=this,d===P&&(this.needsRefresh=!0)}x.next=w}this.last=w}handleChange(){this.needsQueue&&(this.needsQueue=!1,e(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let d=this.first;return{next:()=>{let m=d;return m===void 0?{value:void 0,done:!0}:(d=d.next,{value:m,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(c){o=c},getNotifier:i,track(c,d){n!==void 0&&n.watch(c,d)},trackVolatile(){n!==void 0&&(n.needsRefresh=!0)},notify(c,d){i(c).notify(d)},defineProperty(c,d){typeof d=="string"&&(d=new a(d)),s(c).push(d),Reflect.defineProperty(c,d.name,{enumerable:!0,get:function(){return d.getValue(this)},set:function(m){d.setValue(this,m)}})},getAccessors:s,binding(c,d,m=this.isVolatileBinding(c)){return new l(c,d,m)},isVolatileBinding(c){return r.test(c.toString())}})});function T(r,t){b.defineProperty(r,t)}var _e=j.getById(3,()=>{let r=null;return{get(){return r},set(t){r=t}}}),F=class{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return _e.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){_e.set(t)}};b.defineProperty(F.prototype,"index");b.defineProperty(F.prototype,"length");var M=Object.seal(new F);var Y=class{constructor(){this.targetIndex=0}},Z=class extends Y{constructor(){super(...arguments),this.createPlaceholder=h.createInterpolationPlaceholder}},K=class extends Y{constructor(t,e,n){super(),this.name=t,this.behavior=e,this.options=n}createPlaceholder(t){return h.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}};function qr(r,t){this.source=r,this.context=t,this.bindingObserver===null&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(r,t))}function Wr(r,t){this.source=r,this.context=t,this.target.addEventListener(this.targetName,this)}function Gr(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function Qr(){this.bindingObserver.disconnect(),this.source=null,this.context=null;let r=this.target.$fastView;r!==void 0&&r.isComposed&&(r.unbind(),r.needsBindOnly=!0)}function Jr(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Xr(r){h.setAttribute(this.target,this.targetName,r)}function Yr(r){h.setBooleanAttribute(this.target,this.targetName,r)}function Zr(r){if(r==null&&(r=""),r.create){this.target.textContent="";let t=this.target.$fastView;t===void 0?t=r.create():this.target.$fastTemplate!==r&&(t.isComposed&&(t.remove(),t.unbind()),t=r.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=r)}else{let t=this.target.$fastView;t!==void 0&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=r}}function Kr(r){this.target[this.targetName]=r}function tn(r){let t=this.classVersions||Object.create(null),e=this.target,n=this.version||0;if(r!=null&&r.length){let o=r.split(/\s+/);for(let i=0,s=o.length;i<s;++i){let a=o[i];a!==""&&(t[a]=n,e.classList.add(a))}}if(this.classVersions=t,this.version=n+1,n!==0){n-=1;for(let o in t)t[o]===n&&e.classList.remove(o)}}var V=class extends Z{constructor(t){super(),this.binding=t,this.bind=qr,this.unbind=Gr,this.updateTarget=Xr,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,t!==void 0)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=Kr,this.cleanedTargetName==="innerHTML"){let e=this.binding;this.binding=(n,o)=>h.createHTML(e(n,o))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=Yr;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=Wr,this.unbind=Jr;break;default:this.cleanedTargetName=t,t==="class"&&(this.updateTarget=tn);break}}targetAtContent(){this.updateTarget=Zr,this.unbind=Qr}createBehavior(t){return new zt(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}},zt=class{constructor(t,e,n,o,i,s,a){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=n,this.bind=o,this.unbind=i,this.updateTarget=s,this.targetName=a}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){F.setEvent(t);let e=this.binding(this.source,this.context);F.setEvent(null),e!==!0&&t.preventDefault()}};var Ut=null,qt=class r{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Ut=this}static borrow(t){let e=Ut||new r;return e.directives=t,e.reset(),Ut=null,e}};function en(r){if(r.length===1)return r[0];let t,e=r.length,n=r.map(s=>typeof s=="string"?()=>s:(t=s.targetName||t,s.binding)),o=(s,a)=>{let l="";for(let c=0;c<e;++c)l+=n[c](s,a);return l},i=new V(o);return i.targetName=t,i}var rn=yt.length;function Fe(r,t){let e=t.split(Ht);if(e.length===1)return null;let n=[];for(let o=0,i=e.length;o<i;++o){let s=e[o],a=s.indexOf(yt),l;if(a===-1)l=s;else{let c=parseInt(s.substring(0,a));n.push(r.directives[c]),l=s.substring(a+rn)}l!==""&&n.push(l)}return n}function Be(r,t,e=!1){let n=t.attributes;for(let o=0,i=n.length;o<i;++o){let s=n[o],a=s.value,l=Fe(r,a),c=null;l===null?e&&(c=new V(()=>a),c.targetName=s.name):c=en(l),c!==null&&(t.removeAttributeNode(s),o--,i--,r.addFactory(c))}}function nn(r,t,e){let n=Fe(r,t.textContent);if(n!==null){let o=t;for(let i=0,s=n.length;i<s;++i){let a=n[i],l=i===0?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);typeof a=="string"?l.textContent=a:(l.textContent=" ",r.captureContentBinding(a)),o=l,r.targetIndex++,l!==t&&e.nextNode()}r.targetIndex--}}function Me(r,t){let e=r.content;document.adoptNode(e);let n=qt.borrow(t);Be(n,r,!0);let o=n.behaviorFactories;n.reset();let i=h.createTemplateWalker(e),s;for(;s=i.nextNode();)switch(n.targetIndex++,s.nodeType){case 1:Be(n,s);break;case 3:nn(n,s,i);break;case 8:h.isMarker(s)&&n.addFactory(t[h.extractDirectiveIndexFromMarker(s)])}let a=0;(h.isMarker(e.firstChild)||e.childNodes.length===1&&t.length)&&(e.insertBefore(document.createComment(""),e.firstChild),a=-1);let l=n.behaviorFactories;return n.release(),{fragment:e,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}var Wt=document.createRange(),vt=class{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{let e=this.lastChild;if(t.previousSibling===e)return;let n=t.parentNode,o=this.firstChild,i;for(;o!==e;)i=o.nextSibling,n.insertBefore(o,t),o=i;n.insertBefore(e,t)}}remove(){let t=this.fragment,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.appendChild(n),n=o;t.appendChild(e)}dispose(){let t=this.firstChild.parentNode,e=this.lastChild,n=this.firstChild,o;for(;n!==e;)o=n.nextSibling,t.removeChild(n),n=o;t.removeChild(e);let i=this.behaviors,s=this.source;for(let a=0,l=i.length;a<l;++a)i[a].unbind(s)}bind(t,e){let n=this.behaviors;if(this.source!==t)if(this.source!==null){let o=this.source;this.source=t,this.context=e;for(let i=0,s=n.length;i<s;++i){let a=n[i];a.unbind(o),a.bind(t,e)}}else{this.source=t,this.context=e;for(let o=0,i=n.length;o<i;++o)n[o].bind(t,e)}}unbind(){if(this.source===null)return;let t=this.behaviors,e=this.source;for(let n=0,o=t.length;n<o;++n)t[n].unbind(e);this.source=null}static disposeContiguousBatch(t){if(t.length!==0){Wt.setStartBefore(t[0].firstChild),Wt.setEndAfter(t[t.length-1].lastChild),Wt.deleteContents();for(let e=0,n=t.length;e<n;++e){let o=t[e],i=o.behaviors,s=o.source;for(let a=0,l=i.length;a<l;++a)i[a].unbind(s)}}}};var xt=class{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(this.fragment===null){let c,d=this.html;if(typeof d=="string"){c=document.createElement("template"),c.innerHTML=h.createHTML(d);let x=c.content.firstElementChild;x!==null&&x.tagName==="TEMPLATE"&&(c=x)}else c=d;let m=Me(c,this.directives);this.fragment=m.fragment,this.viewBehaviorFactories=m.viewBehaviorFactories,this.hostBehaviorFactories=m.hostBehaviorFactories,this.targetOffset=m.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}let e=this.fragment.cloneNode(!0),n=this.viewBehaviorFactories,o=new Array(this.behaviorCount),i=h.createTemplateWalker(e),s=0,a=this.targetOffset,l=i.nextNode();for(let c=n.length;s<c;++s){let d=n[s],m=d.targetIndex;for(;l!==null;)if(a===m){o[s]=d.createBehavior(l);break}else l=i.nextNode(),a++}if(this.hasHostBehaviors){let c=this.hostBehaviorFactories;for(let d=0,m=c.length;d<m;++d,++s)o[s]=c[d].createBehavior(t)}return new vt(e,o)}render(t,e,n){typeof e=="string"&&(e=document.getElementById(e)),n===void 0&&(n=e);let o=this.create(n);return o.bind(t,M),o.appendTo(e),o}},on=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function H(r,...t){let e=[],n="";for(let o=0,i=r.length-1;o<i;++o){let s=r[o],a=t[o];if(n+=s,a instanceof xt){let l=a;a=()=>l}if(typeof a=="function"&&(a=new V(a)),a instanceof Z){let l=on.exec(s);l!==null&&(a.targetName=l[2])}a instanceof Y?(n+=a.createPlaceholder(e.length),e.push(a)):n+=a}return n+=r[r.length-1],new xt(n,e)}var v=class{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}};v.create=(()=>{if(h.supportsAdoptedStyleSheets){let r=new Map;return t=>new Gt(t,r)}return r=>new Qt(r)})();function Jt(r){return r.map(t=>t instanceof v?Jt(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}function Ie(r){return r.map(t=>t instanceof v?t.behaviors:null).reduce((t,e)=>e===null?t:(t===null&&(t=[]),t.concat(e)),null)}var wt=Symbol("prependToAdoptedStyleSheets");function Le(r){let t=[],e=[];return r.forEach(n=>(n[wt]?t:e).push(n)),{prepend:t,append:e}}var Ne=(r,t)=>{let{prepend:e,append:n}=Le(t);r.adoptedStyleSheets=[...e,...r.adoptedStyleSheets,...n]},je=(r,t)=>{r.adoptedStyleSheets=r.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(h.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Ne=(r,t)=>{let{prepend:e,append:n}=Le(t);r.adoptedStyleSheets.splice(0,0,...e),r.adoptedStyleSheets.push(...n)},je=(r,t)=>{for(let e of t){let n=r.adoptedStyleSheets.indexOf(e);n!==-1&&r.adoptedStyleSheets.splice(n,1)}}}catch{}var Gt=class extends v{constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=Ie(t)}get styleSheets(){if(this._styleSheets===void 0){let t=this.styles,e=this.styleSheetCache;this._styleSheets=Jt(t).map(n=>{if(n instanceof CSSStyleSheet)return n;let o=e.get(n);return o===void 0&&(o=new CSSStyleSheet,o.replaceSync(n),e.set(n,o)),o})}return this._styleSheets}addStylesTo(t){Ne(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){je(t,this.styleSheets),super.removeStylesFrom(t)}},sn=0;function an(){return`fast-style-class-${++sn}`}var Qt=class extends v{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=Ie(t),this.styleSheets=Jt(t),this.styleClass=an()}addStylesTo(t){let e=this.styleSheets,n=this.styleClass;t=this.normalizeTarget(t);for(let o=0;o<e.length;o++){let i=document.createElement("style");i.innerHTML=e[o],i.className=n,t.append(i)}super.addStylesTo(t)}removeStylesFrom(t){t=this.normalizeTarget(t);let e=t.querySelectorAll(`.${this.styleClass}`);for(let n=0,o=e.length;n<o;++n)t.removeChild(e[n]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}};var nt=Object.freeze({locate:bt()}),Ve={toView(r){return r?"true":"false"},fromView(r){return!(r==null||r==="false"||r===!1||r===0)}};var St=class r{constructor(t,e,n=e.toLowerCase(),o="reflect",i){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=n,this.mode=o,this.converter=i,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,o==="boolean"&&i===void 0&&(this.converter=Ve)}setValue(t,e){let n=t[this.fieldName],o=this.converter;o!==void 0&&(e=o.fromView(e)),n!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](n,e),t.$fastController.notify(this.name))}getValue(t){return b.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){let e=this.mode,n=this.guards;n.has(t)||e==="fromView"||h.queueUpdate(()=>{n.add(t);let o=t[this.fieldName];switch(e){case"reflect":let i=this.converter;h.setAttribute(t,this.attribute,i!==void 0?i.toView(o):o);break;case"boolean":h.setBooleanAttribute(t,this.attribute,o);break}n.delete(t)})}static collect(t,...e){let n=[];e.push(nt.locate(t));for(let o=0,i=e.length;o<i;++o){let s=e[o];if(s!==void 0)for(let a=0,l=s.length;a<l;++a){let c=s[a];typeof c=="string"?n.push(new r(t,c)):n.push(new r(t,c.property,c.attribute,c.mode,c.converter))}}return n}};function f(r,t){let e;function n(o,i){arguments.length>1&&(e.property=i),nt.locate(o.constructor).push(e)}if(arguments.length>1){e={},n(r,t);return}return e=r===void 0?{}:r,n}var He={mode:"open"},ze={},Xt=j.getById(4,()=>{let r=new Map;return Object.freeze({register(t){return r.has(t.type)?!1:(r.set(t.type,t),!0)},getByType(t){return r.get(t)}})}),$=class{constructor(t,e=t.definition){typeof e=="string"&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;let n=St.collect(t,e.attributes),o=new Array(n.length),i={},s={};for(let a=0,l=n.length;a<l;++a){let c=n[a];o[a]=c.attribute,i[c.name]=c,s[c.attribute]=c}this.attributes=n,this.observedAttributes=o,this.propertyLookup=i,this.attributeLookup=s,this.shadowOptions=e.shadowOptions===void 0?He:e.shadowOptions===null?void 0:Object.assign(Object.assign({},He),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?ze:Object.assign(Object.assign({},ze),e.elementOptions),this.styles=e.styles===void 0?void 0:Array.isArray(e.styles)?v.create(e.styles):e.styles instanceof v?e.styles:v.create([e.styles])}get isDefined(){return!!Xt.getByType(this.type)}define(t=customElements){let e=this.type;if(Xt.register(this)){let n=this.attributes,o=e.prototype;for(let i=0,s=n.length;i<s;++i)b.defineProperty(o,n[i]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}};$.forType=Xt.getByType;var Ue=new WeakMap,cn={bubbles:!0,composed:!0,cancelable:!0};function Yt(r){return r.shadowRoot||Ue.get(r)||null}var Ct=class r extends X{constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;let n=e.shadowOptions;if(n!==void 0){let i=t.attachShadow(n);n.mode==="closed"&&Ue.set(t,i)}let o=b.getAccessors(t);if(o.length>0){let i=this.boundObservables=Object.create(null);for(let s=0,a=o.length;s<a;++s){let l=o[s].name,c=t[l];c!==void 0&&(delete t[l],i[l]=c)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,b.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=t,!this.needsInitialization&&t!==null&&this.addStyles(t))}addStyles(t){let e=Yt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){let n=t.behaviors;t.addStylesTo(e),n!==null&&this.addBehaviors(n)}}removeStyles(t){let e=Yt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){let n=t.behaviors;t.removeStylesFrom(e),n!==null&&this.removeBehaviors(n)}}addBehaviors(t){let e=this.behaviors||(this.behaviors=new Map),n=t.length,o=[];for(let i=0;i<n;++i){let s=t[i];e.has(s)?e.set(s,e.get(s)+1):(e.set(s,1),o.push(s))}if(this._isConnected){let i=this.element;for(let s=0;s<o.length;++s)o[s].bind(i,M)}}removeBehaviors(t,e=!1){let n=this.behaviors;if(n===null)return;let o=t.length,i=[];for(let s=0;s<o;++s){let a=t[s];if(n.has(a)){let l=n.get(a)-1;l===0||e?n.delete(a)&&i.push(a):n.set(a,l)}}if(this._isConnected){let s=this.element;for(let a=0;a<i.length;++a)i[a].unbind(s)}}onConnectedCallback(){if(this._isConnected)return;let t=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(t,M);let e=this.behaviors;if(e!==null)for(let[n]of e)n.bind(t,M);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);let t=this.view;t!==null&&t.unbind();let e=this.behaviors;if(e!==null){let n=this.element;for(let[o]of e)o.unbind(n)}}onAttributeChangedCallback(t,e,n){let o=this.definition.attributeLookup[t];o!==void 0&&o.onAttributeChangedCallback(this.element,n)}emit(t,e,n){return this._isConnected?this.element.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},cn),n))):!1}finishInitialization(){let t=this.element,e=this.boundObservables;if(e!==null){let o=Object.keys(e);for(let i=0,s=o.length;i<s;++i){let a=o[i];t[a]=e[a]}this.boundObservables=null}let n=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():n.template&&(this._template=n.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():n.styles&&(this._styles=n.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){let e=this.element,n=Yt(e)||e;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||h.removeChildNodes(n),t&&(this.view=t.render(e,n,e))}static forCustomElement(t){let e=t.$fastController;if(e!==void 0)return e;let n=$.forType(t.constructor);if(n===void 0)throw new Error("Missing FASTElement definition.");return t.$fastController=new r(t,n)}};function qe(r){return class extends r{constructor(){super(),Ct.forCustomElement(this)}$emit(t,e,n){return this.$fastController.emit(t,e,n)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,n){this.$fastController.onAttributeChangedCallback(t,e,n)}}}var I=Object.assign(qe(HTMLElement),{from(r){return qe(r)},define(r,t){return new $(r,t).define().type}});var z=class{createCSS(){return""}createBehavior(){}};function ln(r,t){let e=[],n="",o=[];for(let i=0,s=r.length-1;i<s;++i){n+=r[i];let a=t[i];if(a instanceof z){let l=a.createBehavior();a=a.createCSS(),l&&o.push(l)}a instanceof v||a instanceof CSSStyleSheet?(n.trim()!==""&&(e.push(n),n=""),e.push(a)):n+=a}return n+=r[r.length-1],n.trim()!==""&&e.push(n),{styles:e,behaviors:o}}function U(r,...t){let{styles:e,behaviors:n}=ln(r,t),o=v.create(e);return n.length&&o.withBehaviors(...n),o}var Zt=class{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}};function E(r){return new K("fast-ref",Zt,r)}var kt=class{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){let e=this.options.property;this.shouldUpdate=b.getAccessors(t).some(n=>n.name===e),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(B),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return this.options.filter!==void 0&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}};var Kt=class extends kt{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}};function We(r){return typeof r=="string"&&(r={property:r}),new K("fast-slotted",Kt,r)}var Pt=class{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}},Ge=(r,t)=>H`
|
| 2 |
+
<span
|
| 3 |
+
part="end"
|
| 4 |
+
${E("endContainer")}
|
| 5 |
+
class=${e=>t.end?"end":void 0}
|
| 6 |
+
>
|
| 7 |
+
<slot name="end" ${E("end")} @slotchange="${e=>e.handleEndContentChange()}">
|
| 8 |
+
${t.end||""}
|
| 9 |
+
</slot>
|
| 10 |
+
</span>
|
| 11 |
+
`,Qe=(r,t)=>H`
|
| 12 |
+
<span
|
| 13 |
+
part="start"
|
| 14 |
+
${E("startContainer")}
|
| 15 |
+
class="${e=>t.start?"start":void 0}"
|
| 16 |
+
>
|
| 17 |
+
<slot
|
| 18 |
+
name="start"
|
| 19 |
+
${E("start")}
|
| 20 |
+
@slotchange="${e=>e.handleStartContentChange()}"
|
| 21 |
+
>
|
| 22 |
+
${t.start||""}
|
| 23 |
+
</slot>
|
| 24 |
+
</span>
|
| 25 |
+
`,yi=H`
|
| 26 |
+
<span part="end" ${E("endContainer")}>
|
| 27 |
+
<slot
|
| 28 |
+
name="end"
|
| 29 |
+
${E("end")}
|
| 30 |
+
@slotchange="${r=>r.handleEndContentChange()}"
|
| 31 |
+
></slot>
|
| 32 |
+
</span>
|
| 33 |
+
`,vi=H`
|
| 34 |
+
<span part="start" ${E("startContainer")}>
|
| 35 |
+
<slot
|
| 36 |
+
name="start"
|
| 37 |
+
${E("start")}
|
| 38 |
+
@slotchange="${r=>r.handleStartContentChange()}"
|
| 39 |
+
></slot>
|
| 40 |
+
</span>
|
| 41 |
+
`;function p(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var te=new Map;"metadata"in Reflect||(Reflect.metadata=function(r,t){return function(e){Reflect.defineMetadata(r,t,e)}},Reflect.defineMetadata=function(r,t,e){let n=te.get(e);n===void 0&&te.set(e,n=new Map),n.set(r,t)},Reflect.getOwnMetadata=function(r,t){let e=te.get(t);if(e!==void 0)return e.get(r)});var oe=class{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,ir(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){let{container:n,key:o}=this;return this.container=this.key=void 0,n.registerResolver(o,new S(o,t,e))}};function ot(r){let t=r.slice(),e=Object.keys(r),n=e.length,o;for(let i=0;i<n;++i)o=e[i],sr(o)||(t[o]=r[o]);return t}var un=Object.freeze({none(r){throw Error(`${r.toString()} not registered, did you forget to add @singleton()?`)},singleton(r){return new S(r,1,r)},transient(r){return new S(r,2,r)}}),ee=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:un.singleton})}),Je=new Map;function Xe(r){return t=>Reflect.getOwnMetadata(r,t)}var Ye=null,g=Object.freeze({createContainer(r){return new it(null,Object.assign({},ee.default,r))},findResponsibleContainer(r){let t=r.$$container$$;return t&&t.responsibleForOwnerRequests?t:g.findParentContainer(r)},findParentContainer(r){let t=new CustomEvent(or,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return r.dispatchEvent(t),t.detail.container||g.getOrCreateDOMContainer()},getOrCreateDOMContainer(r,t){return r?r.$$container$$||new it(r,Object.assign({},ee.default,t,{parentLocator:g.findParentContainer})):Ye||(Ye=new it(null,Object.assign({},ee.default,t,{parentLocator:()=>null})))},getDesignParamtypes:Xe("design:paramtypes"),getAnnotationParamtypes:Xe("di:paramtypes"),getOrCreateAnnotationParamTypes(r){let t=this.getAnnotationParamtypes(r);return t===void 0&&Reflect.defineMetadata("di:paramtypes",t=[],r),t},getDependencies(r){let t=Je.get(r);if(t===void 0){let e=r.inject;if(e===void 0){let n=g.getDesignParamtypes(r),o=g.getAnnotationParamtypes(r);if(n===void 0)if(o===void 0){let i=Object.getPrototypeOf(r);typeof i=="function"&&i!==Function.prototype?t=ot(g.getDependencies(i)):t=[]}else t=ot(o);else if(o===void 0)t=ot(n);else{t=ot(n);let i=o.length,s;for(let c=0;c<i;++c)s=o[c],s!==void 0&&(t[c]=s);let a=Object.keys(o);i=a.length;let l;for(let c=0;c<i;++c)l=a[c],sr(l)||(t[l]=o[l])}}else t=ot(e);Je.set(r,t)}return t},defineProperty(r,t,e,n=!1){let o=`$di_${t}`;Reflect.defineProperty(r,t,{get:function(){let i=this[o];if(i===void 0&&(i=(this instanceof HTMLElement?g.findResponsibleContainer(this):g.getOrCreateDOMContainer()).get(e),this[o]=i,n&&this instanceof I)){let a=this.$fastController,l=()=>{let d=g.findResponsibleContainer(this).get(e),m=this[o];d!==m&&(this[o]=i,a.notify(t))};a.subscribe({handleChange:l},"isConnected")}return i}})},createInterface(r,t){let e=typeof r=="function"?r:t,n=typeof r=="string"?r:r&&"friendlyName"in r&&r.friendlyName||er,o=typeof r=="string"?!1:r&&"respectConnection"in r&&r.respectConnection||!1,i=function(s,a,l){if(s==null||new.target!==void 0)throw new Error(`No registration for interface: '${i.friendlyName}'`);if(a)g.defineProperty(s,a,i,o);else{let c=g.getOrCreateAnnotationParamTypes(s);c[l]=i}};return i.$isInterface=!0,i.friendlyName=n??"(anonymous)",e!=null&&(i.register=function(s,a){return e(new oe(s,a??i))}),i.toString=function(){return`InterfaceSymbol<${i.friendlyName}>`},i},inject(...r){return function(t,e,n){if(typeof n=="number"){let o=g.getOrCreateAnnotationParamTypes(t),i=r[0];i!==void 0&&(o[n]=i)}else if(e)g.defineProperty(t,e,r[0]);else{let o=n?g.getOrCreateAnnotationParamTypes(n.value):g.getOrCreateAnnotationParamTypes(t),i;for(let s=0;s<r.length;++s)i=r[s],i!==void 0&&(o[s]=i)}}},transient(r){return r.register=function(e){return q.transient(r,r).register(e)},r.registerInRequestor=!1,r},singleton(r,t=hn){return r.register=function(n){return q.singleton(r,r).register(n)},r.registerInRequestor=t.scoped,r}}),dn=g.createInterface("Container");function Rt(r){return function(t){let e=function(n,o,i){g.inject(e)(n,o,i)};return e.$isResolver=!0,e.resolve=function(n,o){return r(t,n,o)},e}}var Ci=g.inject;var hn={scoped:!1};function fn(r){return function(t,e){e=!!e;let n=function(o,i,s){g.inject(n)(o,i,s)};return n.$isResolver=!0,n.resolve=function(o,i){return r(t,o,i,e)},n}}var ki=fn((r,t,e,n)=>e.getAll(r,n)),Pi=Rt((r,t,e)=>()=>e.get(r)),Ti=Rt((r,t,e)=>{if(e.has(r,!0))return e.get(r)});function se(r,t,e){g.inject(se)(r,t,e)}se.$isResolver=!0;se.resolve=()=>{};var Ei=Rt((r,t,e)=>{let n=nr(r,t),o=new S(r,0,n);return e.registerResolver(r,o),n}),Oi=Rt((r,t,e)=>nr(r,t));function nr(r,t){return t.getFactory(r).construct(t)}var S=class{constructor(t,e,n){this.key=t,this.strategy=e,this.state=n,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:{if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state}case 2:{let n=t.getFactory(this.state);if(n===null)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return n.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){var e,n,o;switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return(o=(n=(e=t.getResolver(this.state))===null||e===void 0?void 0:e.getFactory)===null||n===void 0?void 0:n.call(e,t))!==null&&o!==void 0?o:null;default:return null}}};function Ze(r){return this.get(r)}function pn(r,t){return t(r)}var ie=class{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let n;return e===void 0?n=new this.Type(...this.dependencies.map(Ze,t)):n=new this.Type(...this.dependencies.map(Ze,t),...e),this.transformers==null?n:this.transformers.reduce(pn,n)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}},mn={$isResolver:!0,resolve(r,t){return t}};function Ot(r){return typeof r.register=="function"}function gn(r){return Ot(r)&&typeof r.registerInRequestor=="boolean"}function Ke(r){return gn(r)&&r.registerInRequestor}function bn(r){return r.prototype!==void 0}var yn=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),or="__DI_LOCATE_PARENT__",re=new Map,it=class r{constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,t!==null&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(dn,mn),t instanceof Node&&t.addEventListener(or,n=>{n.composedPath()[0]!==this.owner&&(n.detail.container=this,n.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let e,n,o,i,s,a=this.context;for(let l=0,c=t.length;l<c;++l)if(e=t[l],!!rr(e))if(Ot(e))e.register(this,a);else if(bn(e))q.singleton(e,e).register(this);else for(n=Object.keys(e),i=0,s=n.length;i<s;++i)o=e[n[i]],rr(o)&&(Ot(o)?o.register(this,a):this.register(o));return--this.registerDepth,this}registerResolver(t,e){Tt(t);let n=this.resolvers,o=n.get(t);return o==null?n.set(t,e):o instanceof S&&o.strategy===4?o.state.push(e):n.set(t,new S(t,4,[o,e])),e}registerTransformer(t,e){let n=this.getResolver(t);if(n==null)return!1;if(n.getFactory){let o=n.getFactory(this);return o==null?!1:(o.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(Tt(t),t.resolve!==void 0)return t;let n=this,o;for(;n!=null;)if(o=n.resolvers.get(t),o==null){if(n.parent==null){let i=Ke(t)?this:n;return e?this.jitRegister(t,i):null}n=n.parent}else return o;return null}has(t,e=!1){return this.resolvers.has(t)?!0:e&&this.parent!=null?this.parent.has(t,!0):!1}get(t){if(Tt(t),t.$isResolver)return t.resolve(this,this);let e=this,n;for(;e!=null;)if(n=e.resolvers.get(t),n==null){if(e.parent==null){let o=Ke(t)?this:e;return n=this.jitRegister(t,o),n.resolve(e,this)}e=e.parent}else return n.resolve(e,this);throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){Tt(t);let n=this,o=n,i;if(e){let s=B;for(;o!=null;)i=o.resolvers.get(t),i!=null&&(s=s.concat(tr(i,o,n))),o=o.parent;return s}else for(;o!=null;)if(i=o.resolvers.get(t),i==null){if(o=o.parent,o==null)return B}else return tr(i,o,n);return B}getFactory(t){let e=re.get(t);if(e===void 0){if(vn(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);re.set(t,e=new ie(t,g.getDependencies(t)))}return e}registerFactory(t,e){re.set(t,e)}createChild(t){return new r(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if(typeof t!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(yn.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(Ot(t)){let n=t.register(e);if(!(n instanceof Object)||n.resolve==null){let o=e.resolvers.get(t);if(o!=null)return o;throw new Error("A valid resolver was not returned from the static register method")}return n}else{if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{let n=this.config.defaultResolver(t,e);return e.resolvers.set(t,n),n}}}},ne=new WeakMap;function ir(r){return function(t,e,n){if(ne.has(n))return ne.get(n);let o=r(t,e,n);return ne.set(n,o),o}}var q=Object.freeze({instance(r,t){return new S(r,0,t)},singleton(r,t){return new S(r,1,t)},transient(r,t){return new S(r,2,t)},callback(r,t){return new S(r,3,t)},cachedCallback(r,t){return new S(r,3,ir(t))},aliasTo(r,t){return new S(t,5,r)}});function Tt(r){if(r==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function tr(r,t,e){if(r instanceof S&&r.strategy===4){let n=r.state,o=n.length,i=new Array(o);for(;o--;)i[o]=n[o].resolve(t,e);return i}return[r.resolve(t,e)]}var er="(anonymous)";function rr(r){return typeof r=="object"&&r!==null||typeof r=="function"}var vn=(function(){let r=new WeakMap,t=!1,e="",n=0;return function(o){return t=r.get(o),t===void 0&&(e=o.toString(),n=e.length,t=n>=29&&n<=100&&e.charCodeAt(n-1)===125&&e.charCodeAt(n-2)<=32&&e.charCodeAt(n-3)===93&&e.charCodeAt(n-4)===101&&e.charCodeAt(n-5)===100&&e.charCodeAt(n-6)===111&&e.charCodeAt(n-7)===99&&e.charCodeAt(n-8)===32&&e.charCodeAt(n-9)===101&&e.charCodeAt(n-10)===118&&e.charCodeAt(n-11)===105&&e.charCodeAt(n-12)===116&&e.charCodeAt(n-13)===97&&e.charCodeAt(n-14)===110&&e.charCodeAt(n-15)===88,r.set(o,t)),t}})(),Et={};function sr(r){switch(typeof r){case"number":return r>=0&&(r|0)===r;case"string":{let t=Et[r];if(t!==void 0)return t;let e=r.length;if(e===0)return Et[r]=!1;let n=0;for(let o=0;o<e;++o)if(n=r.charCodeAt(o),o===0&&n===48&&e>1||n<48||n>57)return Et[r]=!1;return Et[r]=!0}default:return!1}}function ar(r){return`${r.toLowerCase()}:presentation`}var $t=new Map,At=Object.freeze({define(r,t,e){let n=ar(r);$t.get(n)===void 0?$t.set(n,t):$t.set(n,!1),e.register(q.instance(n,t))},forTag(r,t){let e=ar(r),n=$t.get(e);return n===!1?g.findResponsibleContainer(t).get(e):n||null}}),Dt=class{constructor(t,e){this.template=t||null,this.styles=e===void 0?null:Array.isArray(e)?v.create(e):e instanceof v?e:v.create([e])}applyTo(t){let e=t.$fastController;e.template===null&&(e.template=this.template),e.styles===null&&(e.styles=this.styles)}};var L=class r extends I{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=At.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new ae(this===r?class extends r{}:this,t,e)}};p([T],L.prototype,"template",void 0);p([T],L.prototype,"styles",void 0);function st(r,t,e){return typeof r=="function"?r(t,e):r}var ae=class{constructor(t,e,n){this.type=t,this.elementDefinition=e,this.overrideDefinition=n,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(t,e){let n=this.definition,o=this.overrideDefinition,s=`${n.prefix||e.elementPrefix}-${n.baseName}`;e.tryDefineElement({name:s,type:this.type,baseClass:this.elementDefinition.baseClass,callback:a=>{let l=new Dt(st(n.template,a,n),st(n.styles,a,n));a.definePresentation(l);let c=st(n.shadowOptions,a,n);a.shadowRootMode&&(c?o.shadowOptions||(c.mode=a.shadowRootMode):c!==null&&(c={mode:a.shadowRootMode})),a.defineElement({elementOptions:st(n.elementOptions,a,n),shadowOptions:c,attributes:st(n.attributes,a,n)})}})}};function ce(r,...t){let e=nt.locate(r);t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i))}),nt.locate(n).forEach(i=>e.push(i))})}function cr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xn(){let r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}var W;function lr(){if(typeof W=="boolean")return W;if(!cr())return W=!1,W;let r=document.createElement("style"),t=xn();t!==null&&r.setAttribute("nonce",t),document.head.appendChild(r);try{r.sheet.insertRule("foo:focus-visible {color:inherit}",0),W=!0}catch{W=!1}finally{document.head.removeChild(r)}return W}var ur;(function(r){r[r.alt=18]="alt",r[r.arrowDown=40]="arrowDown",r[r.arrowLeft=37]="arrowLeft",r[r.arrowRight=39]="arrowRight",r[r.arrowUp=38]="arrowUp",r[r.back=8]="back",r[r.backSlash=220]="backSlash",r[r.break=19]="break",r[r.capsLock=20]="capsLock",r[r.closeBracket=221]="closeBracket",r[r.colon=186]="colon",r[r.colon2=59]="colon2",r[r.comma=188]="comma",r[r.ctrl=17]="ctrl",r[r.delete=46]="delete",r[r.end=35]="end",r[r.enter=13]="enter",r[r.equals=187]="equals",r[r.equals2=61]="equals2",r[r.equals3=107]="equals3",r[r.escape=27]="escape",r[r.forwardSlash=191]="forwardSlash",r[r.function1=112]="function1",r[r.function10=121]="function10",r[r.function11=122]="function11",r[r.function12=123]="function12",r[r.function2=113]="function2",r[r.function3=114]="function3",r[r.function4=115]="function4",r[r.function5=116]="function5",r[r.function6=117]="function6",r[r.function7=118]="function7",r[r.function8=119]="function8",r[r.function9=120]="function9",r[r.home=36]="home",r[r.insert=45]="insert",r[r.menu=93]="menu",r[r.minus=189]="minus",r[r.minus2=109]="minus2",r[r.numLock=144]="numLock",r[r.numPad0=96]="numPad0",r[r.numPad1=97]="numPad1",r[r.numPad2=98]="numPad2",r[r.numPad3=99]="numPad3",r[r.numPad4=100]="numPad4",r[r.numPad5=101]="numPad5",r[r.numPad6=102]="numPad6",r[r.numPad7=103]="numPad7",r[r.numPad8=104]="numPad8",r[r.numPad9=105]="numPad9",r[r.numPadDivide=111]="numPadDivide",r[r.numPadDot=110]="numPadDot",r[r.numPadMinus=109]="numPadMinus",r[r.numPadMultiply=106]="numPadMultiply",r[r.numPadPlus=107]="numPadPlus",r[r.openBracket=219]="openBracket",r[r.pageDown=34]="pageDown",r[r.pageUp=33]="pageUp",r[r.period=190]="period",r[r.print=44]="print",r[r.quote=222]="quote",r[r.scrollLock=145]="scrollLock",r[r.shift=16]="shift",r[r.space=32]="space",r[r.tab=9]="tab",r[r.tilde=192]="tilde",r[r.windowsLeft=91]="windowsLeft",r[r.windowsOpera=219]="windowsOpera",r[r.windowsRight=92]="windowsRight"})(ur||(ur={}));var dr="Enter";var y=class{};p([f({attribute:"aria-atomic"})],y.prototype,"ariaAtomic",void 0);p([f({attribute:"aria-busy"})],y.prototype,"ariaBusy",void 0);p([f({attribute:"aria-controls"})],y.prototype,"ariaControls",void 0);p([f({attribute:"aria-current"})],y.prototype,"ariaCurrent",void 0);p([f({attribute:"aria-describedby"})],y.prototype,"ariaDescribedby",void 0);p([f({attribute:"aria-details"})],y.prototype,"ariaDetails",void 0);p([f({attribute:"aria-disabled"})],y.prototype,"ariaDisabled",void 0);p([f({attribute:"aria-errormessage"})],y.prototype,"ariaErrormessage",void 0);p([f({attribute:"aria-flowto"})],y.prototype,"ariaFlowto",void 0);p([f({attribute:"aria-haspopup"})],y.prototype,"ariaHaspopup",void 0);p([f({attribute:"aria-hidden"})],y.prototype,"ariaHidden",void 0);p([f({attribute:"aria-invalid"})],y.prototype,"ariaInvalid",void 0);p([f({attribute:"aria-keyshortcuts"})],y.prototype,"ariaKeyshortcuts",void 0);p([f({attribute:"aria-label"})],y.prototype,"ariaLabel",void 0);p([f({attribute:"aria-labelledby"})],y.prototype,"ariaLabelledby",void 0);p([f({attribute:"aria-live"})],y.prototype,"ariaLive",void 0);p([f({attribute:"aria-owns"})],y.prototype,"ariaOwns",void 0);p([f({attribute:"aria-relevant"})],y.prototype,"ariaRelevant",void 0);p([f({attribute:"aria-roledescription"})],y.prototype,"ariaRoledescription",void 0);var hr=(r,t)=>H`
|
| 42 |
+
<button
|
| 43 |
+
class="control"
|
| 44 |
+
part="control"
|
| 45 |
+
?autofocus="${e=>e.autofocus}"
|
| 46 |
+
?disabled="${e=>e.disabled}"
|
| 47 |
+
form="${e=>e.formId}"
|
| 48 |
+
formaction="${e=>e.formaction}"
|
| 49 |
+
formenctype="${e=>e.formenctype}"
|
| 50 |
+
formmethod="${e=>e.formmethod}"
|
| 51 |
+
formnovalidate="${e=>e.formnovalidate}"
|
| 52 |
+
formtarget="${e=>e.formtarget}"
|
| 53 |
+
name="${e=>e.name}"
|
| 54 |
+
type="${e=>e.type}"
|
| 55 |
+
value="${e=>e.value}"
|
| 56 |
+
aria-atomic="${e=>e.ariaAtomic}"
|
| 57 |
+
aria-busy="${e=>e.ariaBusy}"
|
| 58 |
+
aria-controls="${e=>e.ariaControls}"
|
| 59 |
+
aria-current="${e=>e.ariaCurrent}"
|
| 60 |
+
aria-describedby="${e=>e.ariaDescribedby}"
|
| 61 |
+
aria-details="${e=>e.ariaDetails}"
|
| 62 |
+
aria-disabled="${e=>e.ariaDisabled}"
|
| 63 |
+
aria-errormessage="${e=>e.ariaErrormessage}"
|
| 64 |
+
aria-expanded="${e=>e.ariaExpanded}"
|
| 65 |
+
aria-flowto="${e=>e.ariaFlowto}"
|
| 66 |
+
aria-haspopup="${e=>e.ariaHaspopup}"
|
| 67 |
+
aria-hidden="${e=>e.ariaHidden}"
|
| 68 |
+
aria-invalid="${e=>e.ariaInvalid}"
|
| 69 |
+
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
| 70 |
+
aria-label="${e=>e.ariaLabel}"
|
| 71 |
+
aria-labelledby="${e=>e.ariaLabelledby}"
|
| 72 |
+
aria-live="${e=>e.ariaLive}"
|
| 73 |
+
aria-owns="${e=>e.ariaOwns}"
|
| 74 |
+
aria-pressed="${e=>e.ariaPressed}"
|
| 75 |
+
aria-relevant="${e=>e.ariaRelevant}"
|
| 76 |
+
aria-roledescription="${e=>e.ariaRoledescription}"
|
| 77 |
+
${E("control")}
|
| 78 |
+
>
|
| 79 |
+
${Qe(r,t)}
|
| 80 |
+
<span class="content" part="content">
|
| 81 |
+
<slot ${We("defaultSlottedContent")}></slot>
|
| 82 |
+
</span>
|
| 83 |
+
${Ge(r,t)}
|
| 84 |
+
</button>
|
| 85 |
+
`;var fr="form-associated-proxy",pr="ElementInternals",mr=pr in window&&"setFormValue"in window[pr].prototype,gr=new WeakMap;function br(r){let t=class extends r{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return mr}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){let e=this.proxy.labels,n=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),o=e?n.concat(Array.from(e)):n;return Object.freeze(o)}else return B}valueChanged(e,n){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,n){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),h.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,n){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),h.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!mr)return null;let e=gr.get(this);return e||(e=this.attachInternals(),gr.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(e=>this.proxy.removeEventListener(e,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,n,o){this.elementInternals?this.elementInternals.setValidity(e,n,o):typeof n=="string"&&this.proxy.setCustomValidity(n)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(n=>this.proxy.addEventListener(n,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",fr),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",fr)),(e=this.shadowRoot)===null||e===void 0||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),(e=this.shadowRoot)===null||e===void 0||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,n){this.elementInternals&&this.elementInternals.setFormValue(e,n||e)}_keypressHandler(e){switch(e.key){case dr:if(this.form instanceof HTMLFormElement){let n=this.form.querySelector("[type=submit]");n?.click()}break}}stopPropagation(e){e.stopPropagation()}};return f({mode:"boolean"})(t.prototype,"disabled"),f({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),f({attribute:"current-value"})(t.prototype,"currentValue"),f(t.prototype,"name"),f({mode:"boolean"})(t.prototype,"required"),T(t.prototype,"value"),t}var le=class extends L{},_t=class extends br(le){constructor(){super(...arguments),this.proxy=document.createElement("input")}};var k=class extends _t{constructor(){super(...arguments),this.handleClick=t=>{var e;this.disabled&&((e=this.defaultSlottedContent)===null||e===void 0?void 0:e.length)<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;let t=this.proxy.isConnected;t||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{var t;(t=this.form)===null||t===void 0||t.reset()},this.handleUnsupportedDelegatesFocus=()=>{var t;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((t=this.$fastController.definition.shadowOptions)===null||t===void 0)&&t.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),e==="submit"&&this.addEventListener("click",this.handleSubmission),t==="submit"&&this.removeEventListener("click",this.handleSubmission),e==="reset"&&this.addEventListener("click",this.handleFormReset),t==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var t;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.addEventListener("click",this.handleClick)})}disconnectedCallback(){var t;super.disconnectedCallback();let e=Array.from((t=this.control)===null||t===void 0?void 0:t.children);e&&e.forEach(n=>{n.removeEventListener("click",this.handleClick)})}};p([f({mode:"boolean"})],k.prototype,"autofocus",void 0);p([f({attribute:"form"})],k.prototype,"formId",void 0);p([f],k.prototype,"formaction",void 0);p([f],k.prototype,"formenctype",void 0);p([f],k.prototype,"formmethod",void 0);p([f({mode:"boolean"})],k.prototype,"formnovalidate",void 0);p([f],k.prototype,"formtarget",void 0);p([f],k.prototype,"type",void 0);p([T],k.prototype,"defaultSlottedContent",void 0);var tt=class{};p([f({attribute:"aria-expanded"})],tt.prototype,"ariaExpanded",void 0);p([f({attribute:"aria-pressed"})],tt.prototype,"ariaPressed",void 0);ce(tt,y);ce(k,Pt,tt);function at(r){let t=r.parentElement;if(t)return t;{let e=r.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function yr(r,t){let e=t;for(;e!==null;){if(e===r)return!0;e=at(e)}return!1}var D=document.createElement("div");function wn(r){return r instanceof I}var ct=class{setProperty(t,e){h.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){h.queueUpdate(()=>this.target.removeProperty(t))}},de=class extends ct{constructor(t){super();let e=new CSSStyleSheet;e[wt]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(v.create([e]))}},he=class extends ct{constructor(){super();let t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}},fe=class extends ct{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);let{sheet:t}=this.style;if(t){let e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}},Bt=class{constructor(t){this.store=new Map,this.target=null;let e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),b.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}targetChanged(){if(this.target!==null)for(let[t,e]of this.store.entries())this.target.setProperty(t,e)}setProperty(t,e){this.store.set(t,e),h.queueUpdate(()=>{this.target!==null&&this.target.setProperty(t,e)})}removeProperty(t){this.store.delete(t),h.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(t)})}handleChange(t,e){let{sheet:n}=this.style;if(n){let o=n.insertRule(":host{}",n.cssRules.length);this.target=n.cssRules[o].style}else this.target=null}};p([T],Bt.prototype,"target",void 0);var pe=class{constructor(t){this.target=t.style}setProperty(t,e){h.queueUpdate(()=>this.target.setProperty(t,e))}removeProperty(t){h.queueUpdate(()=>this.target.removeProperty(t))}},N=class r{setProperty(t,e){r.properties[t]=e;for(let n of r.roots.values())G.getOrCreate(r.normalizeRoot(n)).setProperty(t,e)}removeProperty(t){delete r.properties[t];for(let e of r.roots.values())G.getOrCreate(r.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){let{roots:e}=r;if(!e.has(t)){e.add(t);let n=G.getOrCreate(this.normalizeRoot(t));for(let o in r.properties)n.setProperty(o,r.properties[o])}}static unregisterRoot(t){let{roots:e}=r;if(e.has(t)){e.delete(t);let n=G.getOrCreate(r.normalizeRoot(t));for(let o in r.properties)n.removeProperty(o)}}static normalizeRoot(t){return t===D?document:t}};N.roots=new Set;N.properties={};var ue=new WeakMap,Sn=h.supportsAdoptedStyleSheets?de:Bt,G=Object.freeze({getOrCreate(r){if(ue.has(r))return ue.get(r);let t;return r===D?t=new N:r instanceof Document?t=h.supportsAdoptedStyleSheets?new he:new fe:wn(r)?t=new Sn(r):t=new pe(r),ue.set(r,t),t}});var O=class r extends z{constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,t.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=r.uniqueId(),r.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(t){return new r({name:typeof t=="string"?t:t.name,cssCustomPropertyName:typeof t=="string"?t:t.cssCustomPropertyName===void 0?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return typeof t.cssCustomProperty=="string"}static isDerivedDesignTokenValue(t){return typeof t=="function"}static getTokenById(t){return r.tokensById.get(t)}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}createCSS(){return this.cssVar||""}getValueFor(t){let e=C.getOrCreate(t).get(this);if(e!==void 0)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof r&&(e=this.alias(e)),C.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),C.existsFor(t)&&C.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(D,t),this}subscribe(t,e){let n=this.getOrCreateSubscriberSet(e);e&&!C.existsFor(e)&&C.getOrCreate(e),n.has(t)||n.add(t)}unsubscribe(t,e){let n=this.subscribers.get(e||this);n&&n.has(t)&&n.delete(t)}notify(t){let e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach(n=>n.handleChange(e)),this.subscribers.has(t)&&this.subscribers.get(t).forEach(n=>n.handleChange(e))}alias(t){return(e=>t.getValueFor(e))}};O.uniqueId=(()=>{let r=0;return()=>(r++,r.toString(16))})();O.tokensById=new Map;var me=class{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){let{token:e,target:n}=t;this.add(e,n)}add(t,e){G.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(C.getOrCreate(e).get(t)))}remove(t,e){G.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&typeof t.createCSS=="function"?t.createCSS():t}},ge=class{constructor(t,e,n){this.source=t,this.token=e,this.node=n,this.dependencies=new Set,this.observer=b.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,M))}catch(t){console.error(t)}}},be=class{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),b.getNotifier(this).notify(t.id))}get(t){return b.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),b.getNotifier(this).notify(t.id)}all(){return this.values.entries()}},lt=new WeakMap,ut=new WeakMap,C=class r{constructor(t){this.target=t,this.store=new be,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,n)=>{let o=O.getTokenById(n);o&&(o.notify(this.target),this.updateCSSTokenReflection(e,o))}},lt.set(t,this),b.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof I?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}static getOrCreate(t){return lt.get(t)||new r(t)}static existsFor(t){return lt.has(t)}static findParent(t){if(D!==t.target){let e=at(t.target);for(;e!==null;){if(lt.has(e))return lt.get(e);e=at(e)}return r.getOrCreate(D)}return null}static findClosestAssignedNode(t,e){let n=e;do{if(n.has(t))return n;n=n.parent?n.parent:n.target!==D?r.getOrCreate(D):null}while(n!==null);return null}get parent(){return ut.get(this)||null}updateCSSTokenReflection(t,e){if(O.isCSSDesignToken(e)){let n=this.parent,o=this.isReflecting(e);if(n){let i=n.get(e),s=t.get(e);i!==s&&!o?this.reflectToCSS(e):i===s&&o&&this.stopReflectToCSS(e)}else o||this.reflectToCSS(e)}}has(t){return this.assignedValues.has(t)}get(t){let e=this.store.get(t);if(e!==void 0)return e;let n=this.getRaw(t);if(n!==void 0)return this.hydrate(t,n),this.get(t)}getRaw(t){var e;return this.assignedValues.has(t)?this.assignedValues.get(t):(e=r.findClosestAssignedNode(t,this))===null||e===void 0?void 0:e.getRaw(t)}set(t,e){O.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),O.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);let e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){let t=r.findParent(this);t&&t.appendChild(this);for(let e of this.assignedValues.keys())e.notify(this.target)}unbind(){this.parent&&ut.get(this).removeChild(this);for(let t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&ut.get(t).removeChild(t);let e=this.children.filter(n=>t.contains(n));ut.set(t,this),this.children.push(t),e.forEach(n=>t.appendChild(n)),b.getNotifier(this.store).subscribe(t);for(let[n,o]of this.store.all())t.hydrate(n,this.bindingObservers.has(n)?this.getRaw(n):o),t.updateCSSTokenReflection(t.store,n)}removeChild(t){let e=this.children.indexOf(t);if(e!==-1&&this.children.splice(e,1),b.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;let n=ut.delete(t);for(let[o]of this.store.all())t.hydrate(o,t.getRaw(o)),t.updateCSSTokenReflection(t.store,o);return n}contains(t){return yr(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),r.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),r.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){let n=O.getTokenById(e);n&&(this.hydrate(n,this.getRaw(n)),this.updateCSSTokenReflection(this.store,n))}hydrate(t,e){if(!this.has(t)){let n=this.bindingObservers.get(t);O.isDerivedDesignTokenValue(e)?n?n.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(n&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){let n=new ge(e,t,this);return this.bindingObservers.set(t,n),n}tearDownBindingObserver(t){return this.bindingObservers.has(t)?(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0):!1}};C.cssCustomPropertyReflector=new me;p([T],C.prototype,"children",void 0);function Cn(r){return O.from(r)}var dt=Object.freeze({create:Cn,notifyConnection(r){return!r.isConnected||!C.existsFor(r)?!1:(C.getOrCreate(r).bind(),!0)},notifyDisconnection(r){return r.isConnected||!C.existsFor(r)?!1:(C.getOrCreate(r).unbind(),!0)},registerRoot(r=D){N.registerRoot(r)},unregisterRoot(r=D){N.unregisterRoot(r)}});var ye=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),ve=new Map,Ft=new Map,et=null,ht=g.createInterface(r=>r.cachedCallback(t=>(et===null&&(et=new Mt(null,t)),et))),we=Object.freeze({tagFor(r){return Ft.get(r)},responsibleFor(r){let t=r.$$designSystem$$;return t||g.findResponsibleContainer(r).get(ht)},getOrCreate(r){if(!r)return et===null&&(et=g.getOrCreateDOMContainer().get(ht)),et;let t=r.$$designSystem$$;if(t)return t;let e=g.getOrCreateDOMContainer(r);if(e.has(ht,!1))return e.get(ht);{let n=new Mt(r,e);return e.register(q.instance(ht,n)),n}}});function kn(r,t,e){return typeof r=="string"?{name:r,type:t,callback:e}:r}var Mt=class{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>ye.definitionCallbackOnly,t!==null&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){let e=this.container,n=[],o=this.disambiguate,i=this.shadowRootMode,s={elementPrefix:this.prefix,tryDefineElement(a,l,c){let d=kn(a,l,c),{name:m,callback:x,baseClass:R}=d,{type:w}=d,P=m,gt=ve.get(P),Nt=!0;for(;gt;){let $e=o(P,w,gt);switch($e){case ye.ignoreDuplicate:return;case ye.definitionCallbackOnly:Nt=!1,gt=void 0;break;default:P=$e,gt=ve.get(P);break}}Nt&&((Ft.has(w)||w===L)&&(w=class extends w{}),ve.set(P,w),Ft.set(w,P),R&&Ft.set(R,P)),n.push(new xe(e,P,w,i,x,Nt))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&dt.registerRoot(this.designTokenRoot)),e.registerWithContext(s,...t);for(let a of n)a.callback(a),a.willDefine&&a.definition!==null&&a.definition.define();return this}},xe=class{constructor(t,e,n,o,i,s){this.container=t,this.name=e,this.type=n,this.shadowRootMode=o,this.callback=i,this.willDefine=s,this.definition=null}definePresentation(t){At.define(this.name,t,this.container)}defineElement(t){this.definition=new $(this.type,Object.assign(Object.assign({},t),{name:this.name}))}tagFor(t){return we.tagFor(t)}};var vr="not-allowed";var Pn=":host([hidden]){display:none}";function xr(r){return`${Pn}:host{display:${r}}`}var ft=lr()?"focus-visible":"focus";function wr(r){return we.getOrCreate(r).withPrefix("vscode")}function Cr(r){window.addEventListener("load",()=>{new MutationObserver(()=>{Sr(r)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),Sr(r)})}function Sr(r){let t=getComputedStyle(document.body),e=document.querySelector("body");if(e){let n=e.getAttribute("data-vscode-theme-kind");for(let[o,i]of r){let s=t.getPropertyValue(o).toString();if(n==="vscode-high-contrast")s.length===0&&i.name.includes("background")&&(s="transparent"),i.name==="button-icon-hover-background"&&(s="transparent");else if(n==="vscode-high-contrast-light"){if(s.length===0&&i.name.includes("background"))switch(i.name){case"button-primary-hover-background":s="#0F4A85";break;case"button-secondary-hover-background":s="transparent";break;case"button-icon-hover-background":s="transparent";break}}else i.name==="contrast-active-border"&&(s="transparent");i.setValueFor(e,s)}}}var kr=new Map,Pr=!1;function u(r,t){let e=dt.create(r);if(t){if(t.includes("--fake-vscode-token")){let n="id"+Math.random().toString(16).slice(2);t=`${t}-${n}`}kr.set(t,e)}return Pr||(Cr(kr),Pr=!0),e}var La=u("background","--vscode-editor-background").withDefault("#1e1e1e"),_=u("border-width").withDefault(1),Tr=u("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518"),Na=u("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df"),ja=u("corner-radius").withDefault(0),Er=u("corner-radius-round").withDefault(2),Se=u("design-unit").withDefault(4),Or=u("disabled-opacity").withDefault(.4),pt=u("focus-border","--vscode-focusBorder").withDefault("#007fd4"),Rr=u("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"),Va=u("font-weight","--vscode-font-weight").withDefault("400"),$r=u("foreground","--vscode-foreground").withDefault("#cccccc"),Ha=u("input-height").withDefault("26"),za=u("input-min-width").withDefault("100px"),Dr=u("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),Ar=u("type-ramp-base-line-height").withDefault("normal"),Ua=u("type-ramp-minus1-font-size").withDefault("11px"),qa=u("type-ramp-minus1-line-height").withDefault("16px"),Wa=u("type-ramp-minus2-font-size").withDefault("9px"),Ga=u("type-ramp-minus2-line-height").withDefault("16px"),Qa=u("type-ramp-plus1-font-size").withDefault("16px"),Ja=u("type-ramp-plus1-line-height").withDefault("24px"),Xa=u("scrollbarWidth").withDefault("10px"),Ya=u("scrollbarHeight").withDefault("10px"),Za=u("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),Ka=u("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),tc=u("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),ec=u("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),rc=u("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),_r=u("button-border","--vscode-button-border").withDefault("transparent"),Ce=u("button-icon-background").withDefault("transparent"),Br=u("button-icon-corner-radius").withDefault("5px"),Fr=u("button-icon-outline-offset").withDefault(0),ke=u("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),Mr=u("button-icon-padding").withDefault("3px"),Q=u("button-primary-background","--vscode-button-background").withDefault("#0e639c"),Pe=u("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),Te=u("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),It=u("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),Ir=u("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),Lr=u("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),Nr=u("button-padding-horizontal").withDefault("11px"),jr=u("button-padding-vertical").withDefault("4px"),nc=u("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),oc=u("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),ic=u("checkbox-corner-radius").withDefault(3),sc=u("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0"),ac=u("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),cc=u("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),lc=u("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),uc=u("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),dc=u("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),hc=u("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c"),fc=u("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0"),pc=u("dropdown-list-max-height").withDefault("200px"),mc=u("input-background","--vscode-input-background").withDefault("#3c3c3c"),gc=u("input-foreground","--vscode-input-foreground").withDefault("#cccccc"),bc=u("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc"),yc=u("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),vc=u("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),xc=u("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),wc=u("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),Sc=u("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),Cc=u("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799"),kc=u("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),Pc=u("panel-view-border","--vscode-panel-border").withDefault("#80808059"),Tc=u("tag-corner-radius").withDefault("2px");function Vr(r,t,e,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,e):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,e,n);else for(var a=r.length-1;a>=0;a--)(s=r[a])&&(i=(o<3?s(i):o>3?s(t,e,i):s(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i}var Tn=U`
|
| 86 |
+
${xr("inline-flex")} :host {
|
| 87 |
+
outline: none;
|
| 88 |
+
font-family: ${Rr};
|
| 89 |
+
font-size: ${Dr};
|
| 90 |
+
line-height: ${Ar};
|
| 91 |
+
color: ${Pe};
|
| 92 |
+
background: ${Q};
|
| 93 |
+
border-radius: calc(${Er} * 1px);
|
| 94 |
+
fill: currentColor;
|
| 95 |
+
cursor: pointer;
|
| 96 |
+
}
|
| 97 |
+
.control {
|
| 98 |
+
background: transparent;
|
| 99 |
+
height: inherit;
|
| 100 |
+
flex-grow: 1;
|
| 101 |
+
box-sizing: border-box;
|
| 102 |
+
display: inline-flex;
|
| 103 |
+
justify-content: center;
|
| 104 |
+
align-items: center;
|
| 105 |
+
padding: ${jr} ${Nr};
|
| 106 |
+
white-space: wrap;
|
| 107 |
+
outline: none;
|
| 108 |
+
text-decoration: none;
|
| 109 |
+
border: calc(${_} * 1px) solid ${_r};
|
| 110 |
+
color: inherit;
|
| 111 |
+
border-radius: inherit;
|
| 112 |
+
fill: inherit;
|
| 113 |
+
cursor: inherit;
|
| 114 |
+
font-family: inherit;
|
| 115 |
+
}
|
| 116 |
+
:host(:hover) {
|
| 117 |
+
background: ${Te};
|
| 118 |
+
}
|
| 119 |
+
:host(:active) {
|
| 120 |
+
background: ${Q};
|
| 121 |
+
}
|
| 122 |
+
.control:${ft} {
|
| 123 |
+
outline: calc(${_} * 1px) solid ${pt};
|
| 124 |
+
outline-offset: calc(${_} * 2px);
|
| 125 |
+
}
|
| 126 |
+
.control::-moz-focus-inner {
|
| 127 |
+
border: 0;
|
| 128 |
+
}
|
| 129 |
+
:host([disabled]) {
|
| 130 |
+
opacity: ${Or};
|
| 131 |
+
background: ${Q};
|
| 132 |
+
cursor: ${vr};
|
| 133 |
+
}
|
| 134 |
+
.content {
|
| 135 |
+
display: flex;
|
| 136 |
+
}
|
| 137 |
+
.start {
|
| 138 |
+
display: flex;
|
| 139 |
+
}
|
| 140 |
+
::slotted(svg),
|
| 141 |
+
::slotted(span) {
|
| 142 |
+
width: calc(${Se} * 4px);
|
| 143 |
+
height: calc(${Se} * 4px);
|
| 144 |
+
}
|
| 145 |
+
.start {
|
| 146 |
+
margin-inline-end: 8px;
|
| 147 |
+
}
|
| 148 |
+
`,En=U`
|
| 149 |
+
:host([appearance='primary']) {
|
| 150 |
+
background: ${Q};
|
| 151 |
+
color: ${Pe};
|
| 152 |
+
}
|
| 153 |
+
:host([appearance='primary']:hover) {
|
| 154 |
+
background: ${Te};
|
| 155 |
+
}
|
| 156 |
+
:host([appearance='primary']:active) .control:active {
|
| 157 |
+
background: ${Q};
|
| 158 |
+
}
|
| 159 |
+
:host([appearance='primary']) .control:${ft} {
|
| 160 |
+
outline: calc(${_} * 1px) solid ${pt};
|
| 161 |
+
outline-offset: calc(${_} * 2px);
|
| 162 |
+
}
|
| 163 |
+
:host([appearance='primary'][disabled]) {
|
| 164 |
+
background: ${Q};
|
| 165 |
+
}
|
| 166 |
+
`,On=U`
|
| 167 |
+
:host([appearance='secondary']) {
|
| 168 |
+
background: ${It};
|
| 169 |
+
color: ${Ir};
|
| 170 |
+
}
|
| 171 |
+
:host([appearance='secondary']:hover) {
|
| 172 |
+
background: ${Lr};
|
| 173 |
+
}
|
| 174 |
+
:host([appearance='secondary']:active) .control:active {
|
| 175 |
+
background: ${It};
|
| 176 |
+
}
|
| 177 |
+
:host([appearance='secondary']) .control:${ft} {
|
| 178 |
+
outline: calc(${_} * 1px) solid ${pt};
|
| 179 |
+
outline-offset: calc(${_} * 2px);
|
| 180 |
+
}
|
| 181 |
+
:host([appearance='secondary'][disabled]) {
|
| 182 |
+
background: ${It};
|
| 183 |
+
}
|
| 184 |
+
`,Rn=U`
|
| 185 |
+
:host([appearance='icon']) {
|
| 186 |
+
background: ${Ce};
|
| 187 |
+
border-radius: ${Br};
|
| 188 |
+
color: ${$r};
|
| 189 |
+
}
|
| 190 |
+
:host([appearance='icon']:hover) {
|
| 191 |
+
background: ${ke};
|
| 192 |
+
outline: 1px dotted ${Tr};
|
| 193 |
+
outline-offset: -1px;
|
| 194 |
+
}
|
| 195 |
+
:host([appearance='icon']) .control {
|
| 196 |
+
padding: ${Mr};
|
| 197 |
+
border: none;
|
| 198 |
+
}
|
| 199 |
+
:host([appearance='icon']:active) .control:active {
|
| 200 |
+
background: ${ke};
|
| 201 |
+
}
|
| 202 |
+
:host([appearance='icon']) .control:${ft} {
|
| 203 |
+
outline: calc(${_} * 1px) solid ${pt};
|
| 204 |
+
outline-offset: ${Fr};
|
| 205 |
+
}
|
| 206 |
+
:host([appearance='icon'][disabled]) {
|
| 207 |
+
background: ${Ce};
|
| 208 |
+
}
|
| 209 |
+
`,Hr=(r,t)=>U`
|
| 210 |
+
${Tn}
|
| 211 |
+
${En}
|
| 212 |
+
${On}
|
| 213 |
+
${Rn}
|
| 214 |
+
`;var Lt=class extends k{connectedCallback(){if(super.connectedCallback(),!this.appearance){let t=this.getAttribute("appearance");this.appearance=t}}attributeChangedCallback(t,e,n){t==="appearance"&&n==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),t==="aria-label"&&(this.ariaLabel=n),t==="disabled"&&(this.disabled=n!==null)}};Vr([f],Lt.prototype,"appearance",void 0);var Ee=Lt.compose({baseName:"button",template:hr,styles:Hr,shadowOptions:{delegatesFocus:!0}});var mt=document.getElementById("solutionsContainer"),Oe=acquireVsCodeApi(),Re=0,zr=!1,$n=[{name:"pre",attributes:["class","style","tabindex"]},{name:"code"},{name:"span",attributes:["class","style"]}];wr().register(Ee());window.addEventListener("DOMContentLoaded",()=>{Oe.postMessage({command:"webviewReady"}),Vn()});window.addEventListener("message",r=>{let t=r.data;switch(t.command){case"solutionsUpdated":Dn(t);break;case"navigatePreviousSolution":Ln();break;case"navigateNextSolution":Nn();break}});function Dn(r){jn(r),mt&&mt.replaceChildren(...r.solutions.flatMap((t,e)=>An(t,e)))}function An(r,t){let e=t+1,n=document.createElement("h3");n.className="solutionHeading",n.id=`solution-${e}-heading`,n.textContent=`Suggestion ${e}`;let o=document.createElement("div");o.className="snippetContainer",o.setAttribute("aria-labelledby",n.id),o.setAttribute("role","group"),o.dataset.solutionIndex=String(t),_n(o,r.htmlSnippet);let i=document.createElement("vscode-button");i.setAttribute("role","button"),i.className="acceptButton",i.id=`acceptButton${t}`,i.setAttribute("appearance","secondary"),i.dataset.solutionIndex=String(t),i.textContent=`Accept suggestion ${e}`;let s=[n,o],a=r.citation?Mn(r.citation):void 0;return a&&s.push(a),s.push(i),s}function _n(r,t){r.setHTML(t,{sanitizer:Fn()})}var Bn;function Fn(){return Bn??=new Sanitizer({elements:$n})}function Mn(r){let t=document.createElement("p"),e=document.createElement("span");e.style.verticalAlign="text-bottom",e.setAttribute("aria-hidden","true"),e.textContent="Warning",t.append(e," ",r.message," ");let n=In(r.url);if(n){let o=document.createElement("a");o.href=n,o.target="_blank",o.rel="noreferrer noopener",o.textContent="Inspect source code",t.append(o)}return t}function In(r){try{let t=new URL(r);return t.protocol==="https:"?t.href:void 0}catch{return}}function Ln(){let r=document.querySelectorAll(".snippetContainer pre"),t=Re-1;r[t]?.focus()}function Nn(){let r=document.querySelectorAll(".snippetContainer pre"),t=(Re??-1)+1;r[t]?r[t].focus():r[0]&&r[0].focus()}function jn(r){let t=document.getElementById("progress-bar"),e=document.getElementById("loadingContainer");if(!(!t||!e))if(r.percentage>=100)e.innerHTML=`${r.solutions.length} Suggestions`;else{let n=e.querySelector("label");n.textContent!=="Loading suggestions:\xA0"&&(n.textContent="Loading suggestions:\xA0"),t.value=r.percentage}}function Vn(){zr||mt===null||(mt.addEventListener("focusin",r=>{let t=r.target,e=Ur(t);e!==void 0&&Hn(e)}),mt.addEventListener("click",r=>{let e=r.target?.closest("vscode-button[data-solution-index]");if(!(e instanceof HTMLElement))return;let n=Ur(e);n!==void 0&&zn(n)}),zr=!0)}function Ur(r){let t=r?.closest("[data-solution-index]");if(!(t instanceof HTMLElement))return;let e=t.getAttribute("data-solution-index");if(e===null)return;let n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}function Hn(r){Re=r,Oe.postMessage({command:"focusSolution",solutionIndex:r})}function zn(r){Oe.postMessage({command:"acceptSolution",solutionIndex:r})}})();
|
| 215 |
+
/*! Bundled license information:
|
| 216 |
+
|
| 217 |
+
tslib/tslib.es6.js:
|
| 218 |
+
(*! *****************************************************************************
|
| 219 |
+
Copyright (c) Microsoft Corporation.
|
| 220 |
+
|
| 221 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
| 222 |
+
purpose with or without fee is hereby granted.
|
| 223 |
+
|
| 224 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 225 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 226 |
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 227 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
| 228 |
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
| 229 |
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
| 230 |
+
PERFORMANCE OF THIS SOFTWARE.
|
| 231 |
+
***************************************************************************** *)
|
| 232 |
+
*/
|