AI Context Optimizer Documentation – Complete User Guide
Everything you need to know to get started with AI Context Optimizer, optimize your Cline AI workflow, and maximize your token savings.
🚀 Installation Guide
System Requirements
- VS Code: Version 1.85.0 or higher
- Cline Extension: Version 3.17.0 or higher
- Operating System: Windows 10+, macOS 10.15+, or Linux
- Memory: 4GB RAM recommended
- Storage: 50MB free space
Step-by-Step Installation
- Download the Extension: Get the latest .vsix file from our download page
- Open VS Code: Launch Visual Studio Code
- Open Command Palette: Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS) - Install from VSIX: Type „Extensions: Install from VSIX“ and select it
- Select File: Browse and select the downloaded .vsix file
- Reload Window: Click „Reload Window“ when prompted
Verification
After installation, you should see:
- AI Context Optimizer icon in the VS Code sidebar
- Token counter in the status bar (when Cline is active)
- Extension listed in Extensions panel
🎯 Getting Started
First Launch
When you first activate AI Context Optimizer:
- The extension automatically detects your Cline installation
- It performs an initial scan of your workspace
- Token monitoring begins immediately
- You’ll see the optimization dashboard in the sidebar
Quick Setup
1. Configure Basic Settings
- Open Settings:
File → Preferences → Settings - Search for „AI Context Optimizer“
- Adjust token thresholds and notification preferences
2. Set Your Budget
- Click the AI Context Optimizer sidebar icon
- Navigate to „Budget Settings“
- Set daily/monthly spending limits
- Configure alert thresholds
3. Optimize Token Limits (Recommended)
- Run the auto-fix for token limits:
Ctrl+Shift+P→ „AI Context Optimizer: Fix Token Limits“ - Select affected models (usually all Anthropic models)
- Click „Apply Auto-Fix“
- Restart VS Code when prompted
⚙️ Features Guide
Token Monitoring Dashboard
The main dashboard provides real-time insights:
- Current Session: Tokens used in the current coding session
- Daily Usage: Total tokens consumed today
- Monthly Usage: Total tokens for the current month
- Cost Breakdown: Spending analysis by AI provider
- Optimization Score: Efficiency rating based on context selection
Smart Context Selection
AI Context Optimizer intelligently selects relevant files:
- Dependency Analysis: Includes files based on import/export relationships
- Relevance Scoring: AI algorithm determines file importance
- Exclusion Rules: Automatically excludes test files, node_modules, etc.
- Custom Rules: Add your own inclusion/exclusion patterns
Token Limit Auto-Fix
Revolutionary feature that fixes Cline’s artificial limitations:
- Detection: Automatically identifies incorrect token limits
- Backup: Creates safety backups before making changes
- Fix: Updates token limits to correct values (e.g., 8192 → 64000)
- Verification: Confirms successful application
Cost Analytics
Comprehensive cost tracking and analysis:
- Real-time Costs: Live cost calculation per request
- Provider Comparison: Compare costs across different AI providers
- Historical Trends: Track spending patterns over time
- Budget Alerts: Notifications when approaching limits
📈 Optimization Tips
Best Practices for Maximum Savings
1. Use Smart Context Selection
- Enable automatic context optimization in settings
- Review and refine custom exclusion rules
- Use project-specific configurations for different codebases
2. Optimize Your Queries
- Be specific in your requests to Cline
- Break large tasks into smaller, focused requests
- Use the „Start New Task“ feature for unrelated work
3. Monitor Usage Patterns
- Check daily reports to identify high-usage periods
- Adjust working patterns based on cost analysis
- Use budget alerts to stay within limits
4. Configure Provider Settings
- Compare costs between different AI providers
- Use appropriate models for different task types
- Configure fallback providers for cost optimization
🔧 Troubleshooting
Common Issues and Solutions
Extension Not Activating
Solution:
- Ensure Cline extension is installed and active
- Check VS Code version compatibility
- Restart VS Code and try again
- Check Output panel → „AI Context Optimizer“ for error messages
Token Counts Seem Incorrect
Solution:
- Different AI models use different tokenizers
- Verify you’ve selected the correct model in settings
- Check if token limit auto-fix has been applied
- Compare with provider’s official token count tools
Auto-Fix Not Working
Solution:
- Run VS Code as administrator (Windows) or with sudo (Linux/macOS)
- Ensure write permissions to extensions folder
- Check that Cline extension is up to date
- Manually verify the fix was applied by checking extension files
High Memory Usage
Solution:
- Reduce the number of files in context selection
- Increase exclusion patterns for large directories
- Restart VS Code to clear memory cache
- Check for other memory-intensive extensions
Getting Help
If you need additional support:
- Community Support: GitHub Discussions
- Bug Reports: GitHub Issues
- Email Support: support@aicontextoptimizer.com
- Documentation: This guide and inline help
🔌 API Reference
Available Commands
Core Commands
aiContextOptimizer.optimizeContext– Manually trigger context optimizationaiContextOptimizer.showDashboard– Open the main dashboardaiContextOptimizer.fixTokenLimits– Run token limit auto-fixaiContextOptimizer.generateReport– Create usage report
Configuration Commands
aiContextOptimizer.openSettings– Open extension settingsaiContextOptimizer.resetConfiguration– Reset to default settingsaiContextOptimizer.exportSettings– Export current configurationaiContextOptimizer.importSettings– Import configuration
Configuration Options
Key settings that can be customized:
Token Management
aiContextOptimizer.maxContextSize– Maximum tokens to send (default: 50000)aiContextOptimizer.warningThreshold– Alert when usage exceeds % (default: 80)aiContextOptimizer.autoOptimize– Enable automatic optimization (default: true)
File Selection
aiContextOptimizer.includePatterns– File patterns to always includeaiContextOptimizer.excludePatterns– File patterns to always excludeaiContextOptimizer.smartDetection– Use AI for file relevance (default: true)
Cost Tracking
aiContextOptimizer.dailyBudget– Daily spending limit in USDaiContextOptimizer.monthlyBudget– Monthly spending limit in USDaiContextOptimizer.costAlerts– Enable budget notifications (default: true)