🧠 VS Code Custom AI SE Assistant
A VS Code extension that brings GPT-powered code evaluation and improvement directly into your editor. Built with @ttgca/custom-ai-code-analyzer
.
✨ Features
- ✅ One-command AI code analysis or improvement
- ✅ Powered by OpenAI or Azure OpenAI (configurable)
- ✅ Custom rule definitions via natural language (
rules.json
)
- ✅ Live AI output preview rendered in Markdown
- ✅ Toggle between evaluation and improvement modes
- ✅ VS Code theme-aware Webview results
- ✅ Fast keyboard shortcut access (default:
Ctrl+Alt+A
)
- ✅ Easy configuration through Settings UI or
settings.json
🚀 How It Works
This extension wraps @ttgca/custom-ai-code-analyzer
and provides:
- 🔍 Evaluate: Static analysis using natural language rules
- 💡 Improve: AI-enhanced code refactoring suggestions
Webview output is syntax-highlighted and matches your VS Code theme.
⚙️ Installation & Setup
From Marketplace
Search for "VS Code Custom AI SE Assistant" in the Extensions sidebar and click Install.
Manual Setup (Dev Mode)
git clone https://github.com/thetonggroup/vs-code-custom-ai-se-assistant.git
cd vs-code-custom-ai-se-assistant
npm install
npm run compile
code .
Press F5
to launch Extension Development Host.
⚙️ Configuration
Open your VS Code settings.json
or search "AI Code Assistant" in the UI.
Example for OpenAI:
{
"aiCodeAssistant.provider": "openai",
"aiCodeAssistant.apiKey": "sk-...",
"aiCodeAssistant.model": "gpt-4",
"aiCodeAssistant.rulesPath": "config/rules.json",
"aiCodeAssistant.mode": "evaluate"
}
Example for Azure OpenAI:
{
"aiCodeAssistant.provider": "azure",
"aiCodeAssistant.apiKey": "xxx",
"aiCodeAssistant.endpoint": "https://your-endpoint.openai.azure.com",
"aiCodeAssistant.deployment": "deployment-id",
"aiCodeAssistant.apiVersion": "api-version",
"aiCodeAssistant.rulesPath": "config/rules.json",
"aiCodeAssistant.mode": "improve"
}
🧩 Usage
- Open any
.ts
or .js
file.
- Run the command:
- Press
Ctrl+Alt+A
(default)
- Or
Cmd+Shift+P → Analyze Current File
- View AI-generated results in a markdown-rendered panel beside your code.
Create rules.json
in your project (or workspace folder):
[
{
"name": "No Console Logs",
"prompt": "Detect and warn on use of console.log and console.error."
},
{
"name": "JSDoc Coverage",
"prompt": "Ensure every exported function has a JSDoc comment."
}
]
Each rule will be evaluated or used for code improvement.
📦 Extension Command
Command ID |
Description |
vs-code-custom-ai-se-assistant.analyzeCurrentFile |
Analyze or improve current file |
📸 Screenshots
Coming soon! Expect clean, syntax-highlighted markdown output with emojis, severity icons, and structured AI responses.
🛠️ Built With
💡 Developer Mode
To develop or contribute:
npm install
npm run compile
# Then press F5 in VS Code
📝 License
© The Tong Group — For internal or personal evaluation use only. Commercial usage prohibited without prior written permission.
👨💻 Author
Made with ❤️ by [Noah Yejia Tong / THE TONG GROUP]