Not third-party code. Third-party code is either cloned at the time of build
or kept in a different directory to distinguish it from your own contribution.
Go to extensions.ts under src and start debugging (F5 key or Run > Start Debugging)
A new window with the extension should run.
CTRL-P (or CTRL-shift-P depends on your settings) and search for commands.
Current commands:
Hello World: displays a hello world message
VSGacha: Sign in to LeetCode: opens the leetcode sign in page and prompts you to paste in your LC session cookie. Follow the instruction in the popup to find the cookie.
VSGacha: Sign out from LeetCode: clears your cookie from VSCode.
VSGacha: Test: Show LeetCode user submissions: shows the 3 most recent submissions and their details. If not signed in, it will ask you to sign in first.
This showcases how user info can be fetched. See the LeetCode instance in leetcode/connector.ts and the documentation for all things you can fetch. It also supports adding listeners which may be helpful for detecting daily mission completions.
VSGacha: Display Activities Tracked in This Session: shows the number of minutes spent in the current IDE window, number of new lines written, number of chars written.
See tracker/activityTracker.ts to modify the tracker.
How to add more commands
You can define a new command under commands in package.json
Add that command to extension.ts similar to how the Hello World command was added
Dependencies
Node.js v22.17.0
@leetnotion/leetcode-api: npm i @leetnotion/leetcode-api