Code Editor
The Code Editor is a powerful Monaco-based code editing environment with AI-powered analysis, GitHub integration, and real-time collaboration features.
Overview
Access the Code Editor from the ReformCode page by selecting the Code Editor tab. It provides:
- Monaco Editor: VS Code's editor engine with full IntelliSense
- AI Analysis: Multi-model code review and suggestions
- GitHub Integration: Load files directly from any public repository
- Auto-Save: Your work is automatically saved to the database
- Session Recovery: Resume exactly where you left off
Getting Started
Paste Code Mode
- Navigate to ReformCode
- Ensure the Code Editor tab is selected
- Paste or type your code in the editor
- Select the correct programming language
- Click Analyze to get AI insights
Repository Mode
- Click Sync GitHub in the toolbar
- Enter a repository URL or
owner/repoformat - Browse the file tree in the left sidebar
- Click any file to load it in the editor
- Analyze with your preferred AI model
Editor Features
Syntax Highlighting
Full syntax highlighting for 20+ languages:
Frontend: JavaScript, TypeScript, HTML, CSS, React/JSX Backend: Python, Go, Rust, Java, C#, Ruby, PHP Systems: C, C++, Swift, Kotlin Data: SQL, JSON, YAML, XML, GraphQL Scripts: Bash, PowerShell, Markdown
Smart Editing
- IntelliSense: Context-aware autocomplete
- Error Detection: Real-time syntax error highlighting
- Code Folding: Collapse functions and blocks
- Multi-Cursor: Edit multiple locations simultaneously
- Search & Replace: Regex-powered find and replace
Code Formatting
Press Shift + Alt + F or click the Format button to auto-format:
- JavaScript/TypeScript: Prettier formatting
- Python: Black-style formatting
- JSON: Prettified with proper indentation
- HTML/CSS: Organized and readable output
AI Analysis
Selecting AI Models
Choose from 5 AI models based on your needs:
| Model | Credits | Best For |
|---|---|---|
| Gemini 2.5 Flash | 1 | Quick checks, simple code |
| Gemini 2.5 Pro | 3 | Balanced analysis |
| Claude 3.5 Haiku | 2 | Focused, fast feedback |
| Claude 3.5 Sonnet | 4 | Comprehensive review |
| Claude 3 Opus | 6 | Deep analysis, complex code |
What AI Analyzes
Every analysis covers:
-
Correctness & Bugs
- Logic errors and edge cases
- Potential runtime exceptions
- Type safety issues
-
Best Practices
- Code style and conventions
- Design pattern suggestions
- Naming improvements
-
Performance
- Algorithm efficiency
- Memory usage concerns
- Bottleneck identification
-
Security
- Injection vulnerabilities
- Data exposure risks
- Authentication issues
-
Refactored Code
- Improved implementation
- Explanation of changes
Reading Results
AI responses are formatted in clear sections:
- Strengths: What's done well
- Issues: Problems to address (with severity)
- Suggestions: Improvement ideas
- Refactored Code: Better implementation with explanations
Auto-Save & Session Recovery
How Auto-Save Works
Your work is automatically saved:
- Every 30 seconds when changes are detected
- Before navigating away from the page
- When switching tabs in ReformCode
Session Recovery
If you close the browser or navigate away:
- Return to ReformCode
- Your last session is automatically restored
- Code, language, and filename are preserved
Manual Save
Click the Save button or press Cmd/Ctrl + S to save immediately.
GitHub Integration
Quick Repository Access
Popular repositories for one-click access:
- facebook/react
- vercel/next.js
- microsoft/typescript
- nodejs/node
Custom Repository
Enter any public repository:
https://github.com/owner/repo
owner/repo
File Explorer
- Folders: Click to expand/collapse
- Files: Click to load in editor
- Search: Filter files by name
- File Info: See sizes and types
Working with Repository Files
- Load a file from the tree
- Edit in the Monaco editor
- Run AI analysis
- Download modified version
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd/Ctrl + S | Save file |
Cmd/Ctrl + Enter | Run AI analysis |
Shift + Alt + F | Format code |
Cmd/Ctrl + F | Find in file |
Cmd/Ctrl + H | Find and replace |
Cmd/Ctrl + / | Toggle comment |
Cmd/Ctrl + D | Select next occurrence |
Alt + Up/Down | Move line up/down |
Cmd/Ctrl + Shift + K | Delete line |
Integration with Other Tools
Send to Transformer
- Load code in the editor
- Click Send to Transformer
- Code transfers to Transformer tab
- Select target language/framework
Send to Builder
- Describe what you want to build in the editor
- Click Send to Builder
- AI generates a complete application
Save as Snippet
- Select useful code
- Click Save to Snippets
- Add name and tags
- Access from Snippets tab anytime
Tips for Effective Code Review
Choose the Right Model
- Quick syntax check: Use Gemini Flash (1 credit)
- Standard review: Use Gemini Pro or Claude Haiku (2-3 credits)
- Critical code: Use Claude Sonnet or Opus (4-6 credits)
Maximize AI Value
- Provide context: Include relevant imports and types
- Isolate concerns: Analyze focused code sections
- Review iteratively: Fix issues, then re-analyze
- Learn patterns: Note recurring suggestions
Best Practices
- Select accurate language for proper highlighting
- Review the full AI output, don't skip sections
- Test suggested changes before committing
- Use version control as a safety net
Troubleshooting
"Repository not found"
- Verify the URL is correct
- Ensure the repository is public
- Try
owner/repoformat instead of full URL
"Failed to load file"
- Files over 1MB may fail to load
- Try a different branch
- Check your internet connection
Editor not responding
- Refresh the page
- Clear browser cache
- Try a different browser
AI analysis stuck
- Check your credit balance
- Try a different model
- Refresh and retry
Credit Usage
| Action | Flash | Pro | Haiku | Sonnet | Opus |
|---|---|---|---|---|---|
| Snippet Analysis | 1 | 3 | 2 | 4 | 6 |
| Repository File | 2 | 5 | 4 | 7 | 10 |
Next Steps:
- Code Transformer - Convert between languages
- AI Builder - Generate complete apps
- Credits System - Manage your usage