Gemini Code Assist: Google AI Coding VS Code/JetBrains 1M Token Context
Gemini Code Assist ใช้ Gemini 2.5 รองรับ Java/Python/JS/C++/Go SQL Code completion + Chat + GitHub PR review Context 1M tokens Enterprise customization ฟรี/Standard/Enterprise
Gemini Code Assist vs Copilot
| Feature | Gemini Code Assist | GitHub Copilot |
|---|---|---|
| Context Window | 1M tokens | 128K |
| IDE Support | VS Code/JetBrains/Android | VS Code primary |
| GitHub | Native PR review | Chat only |
| Enterprise | Private repo training | Limited |
| Pricing | Free tier | $10/mo |
ฟีเจอร์หลัก
✅ Real-time code completion
✅ Chat ใน IDE (ไฟล์ context)
✅ GitHub PR auto-review (/gemini)
✅ Generate unit tests
✅ Full file/project generation
✅ Custom rules/commands
IDE Integration
⭐ VS Code: Extension marketplace
⭐ JetBrains: IntelliJ/PyCharm
⭐ Android Studio: Native
⭐ GitHub: /gemini comments
⭐ Web: cloud.google.com
Code Examples
VS Code Chat:
// @gemini explain this function
function calculateTax(amount, rate) {
return amount * (1 + rate);
}
Gemini: "คำนวณภาษีโดยคูณจำนวนเงินด้วยอัตราภาษี
ปัญหา: ไม่มี validation และ rounding"
GitHub PR Review:
/gemini review this PR
/gemini generate tests
/gemini upgrade to TypeScript
Enterprise Features
🔐 Private repo indexing
📚 Custom code training
⚙️ Style guide enforcement
👥 Team collaboration
🌐 Google Cloud integration
Context Window 1M Power
✅ เข้าใจ repo ทั้งโปรเจกต์
✅ Cross-file dependencies
✅ Architecture suggestions
✅ Legacy code migration
✅ Multi-language projects
Setup Guide (5 mins)
1. VS Code → Extensions → "Gemini Code Assist"
2. Google Account login
3. Settings → API Key (free tier)
4. Cmd+I = Inline completion
5. Cmd+Shift+P → "Gemini Chat"
Pricing Tiers
| Tier | ราคา | Features |
|---|---|---|
| Individual | ฟรี | 100 req/day |
| Standard | $19/mo | 1K req/day + Enterprise |
| Enterprise | Custom | Unlimited + Private repos |
Production Workflows
🚀 New project: "Generate REST API + Tests"
🔧 Bug fix: "Find null pointer in auth module"
📚 Docs: "Generate JSDoc for all files"
♻️ Refactor: "Convert callback to async/await"
🧪 Testing: "Create 80% coverage tests"
Custom Commands
// .gemini-rules.json
{
"always_test": true,
"style": "prettier",
"framework": "react + typescript",
"naming": "camelCase"
}
