Intelli-Themer & Function Analyzer VS Code Extension
This is a Visual Studio Code extension that provides powerful tools to customize your editor's appearance and analyze your code with AI.
Features
Advanced Theme Customizer: A full UI in the sidebar to customize every color of your editor theme, from layout to syntax highlighting. Changes are saved to your settings.json in real-time.
Vibrancy & Transparency Control: Enable a "frosted glass" effect for your editor window. Control the blur and transparency levels directly from the UI. (Requires the popular "Vibrancy Continued" extension to be installed).
Function Folding: Use the Ctrl+Shift+H shortcut to quickly collapse or expand all functions in the active file.
AI-Powered Function Analysis: Right-click any function and select "Analyze Function" to get a detailed, AI-powered breakdown of its purpose, patterns, and operations, powered by the Gemini API.
Interactive Code Element Analysis: Within the analysis window, click on specific variables or keywords to get a focused explanation of that element's role.
Setup & Installation
Clone or Download: Get the project folder onto your local machine.
Install Dependencies: Open the project folder in your terminal and run:
npm install
Install Peer Extension (Required for Vibrancy): For the vibrancy/blur effect to work, you must have the Vibrancy Continued extension installed in your VS Code.
API Key: For the AI analysis to work, you must create a .env file in the root of the project folder and add your Gemini API key:
API_KEY=your_gemini_api_key_here
The extension is configured to automatically load this key.
Running the Extension in Development Mode
Open in VS Code: Open the project folder in VS Code.
Compile the Code: Run the watch command in your terminal to compile the TypeScript and React code and watch for changes.
npm run watch
Start Debugging: Press F5 on your keyboard. This will open a new "Extension Development Host" window. This special VS Code window has your extension installed and running.
Use the Extension:
Click the new paint brush icon in the Activity Bar to open the Theme Customizer.
Open a JavaScript or TypeScript file.
Press Ctrl+Shift+H to see the functions collapse and expand.
Right-click inside a function and choose "Analyze Function".
How to Package the Extension for Sharing
To create a shareable .vsix file that others can install:
Install vsce: If you don't have it, install the official packaging tool globally.
npm install -g @vscode/vsce
Package: Run the package command from your project's root directory.
vsce package
This will create an updated-extension-ai-0.0.1.vsix file. Others can install this file directly in VS Code via Extensions > ... > Install from VSIX....
How to Publish to the Marketplace
Publishing requires an Azure DevOps organization and a Personal Access Token.
Create a Publisher: Follow the official guide to create your publisher identity.
Update package.json: Crucially, change the publisher field in package.json from "your-publisher-name" to your actual publisher name.