Run this model with HF Jobs

Run spartan8806/atles on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/spartan8806/atles. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/spartan8806/atles on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
atles / docs /guides /README_Code_Studio.md
spartan8806's picture
ATLES codebase - Source code only
99b8067
|
Raw History Blame Contribute Delete
18.5 kB
# ๐Ÿ’ป ATLES Code Studio - VS Code-like Development Environment
**A professional, AI-powered development environment built with PyQt6**
## ๐ŸŒŸ **Overview**
ATLES Code Studio transforms your ATLES AI assistant into a full-featured development environment, combining the power of VS Code's interface with intelligent AI assistance for coding, debugging, and project management.
## โœจ **Key Features**
### **๐ŸŽจ VS Code-like Interface**
- **Professional dark theme** with VS Code styling
- **Multi-panel layout**: File explorer, editor area, AI assistant
- **Familiar shortcuts** and menu structure
- **Responsive design** with resizable panels
### **๐Ÿ“ File Explorer & Project Management**
- **Tree view file explorer** with folder navigation
- **Project workspace** support
- **File type icons** and syntax detection
- **Quick file operations** (open, create, delete)
- **Real-time file watching** for external changes
### **๐Ÿ“ Advanced Code Editor**
- **Multi-tab editing** with unlimited tabs
- **Syntax highlighting** for 20+ programming languages
- **Code folding** and line numbers
- **Auto-indentation** and smart brackets
- **Find & replace** with regex support
- **Undo/redo** with full history
### **๐Ÿ–ฅ๏ธ Integrated Terminal**
- **Built-in terminal** with full shell access
- **Command execution** and output capture
- **Working directory** sync with current project
- **Resizable terminal panel**
- **Cross-platform** support (Windows/Linux/macOS)
### **๐Ÿค– AI Code Assistant (Self-Aware & Advanced)**
- **๐Ÿง  Self-aware AI** - Reads its own source code for better context
- **Real-time code help** and explanations
- **โšก Direct code insertion** - AI can write code directly to your editor
- **๐Ÿ”’ Safety controls** - Manual mode by default, direct insertion on request
- **Code optimization** suggestions with architectural understanding
- **Debugging assistance** and error analysis
- **Code generation** from natural language
- **Context-aware responses** based on current code AND AI's own implementation
- **Multiple AI models** (qwen2.5-coder, llama3.2, etc.)
- **Self-analysis capabilities** - AI can explain its own workings
### **โšก Developer Productivity**
- **Quick actions**: Explain, optimize, debug code
- **Keyboard shortcuts** for all major functions
- **Auto-save** and session restoration
- **Project templates** and scaffolding
- **Git integration** (planned)
- **Extension system** (planned)
## ๐Ÿš€ **Getting Started**
### **Quick Launch**
```powershell
# Option 1: Use main launcher
.\run_desktop.bat
# Choose option 2 for Code Studio
# Option 2: Direct launch
.\run_code_studio.bat
# Option 3: Manual launch
python atles_code_studio.py
```
### **First Time Setup**
1. **Launch the application** using any method above
2. **Open a project folder**: File โ†’ Open Folder (Ctrl+Shift+O)
3. **Start coding**: Create new files or open existing ones
4. **Enable AI assistant**: Ask questions in the right panel
5. **Use the terminal**: Toggle with Ctrl+` for command line access
## ๐Ÿ“‹ **System Requirements**
### **Core Requirements**
```bash
# Essential dependencies
PyQt6>=6.4.0 # GUI framework
psutil>=5.9.0 # System monitoring
pywin32>=306 # Windows integration (Windows only)
```
### **Enhanced Features**
```bash
# Syntax highlighting
pygments>=2.14.0 # Code syntax highlighting
# Code formatting
black>=23.0.0 # Python code formatter
flake8>=6.0.0 # Code linting
autopep8>=2.0.0 # Auto code formatting
# Git integration
GitPython>=3.1.0 # Git operations
# File monitoring
watchdog>=3.0.0 # Auto-reload on file changes
```
### **Installation**
```bash
# Install all dependencies
pip install -r code_studio_requirements.txt
# Or install manually
pip install PyQt6 psutil pywin32 pygments black flake8
```
## ๐ŸŽฎ **User Interface Guide**
### **Layout Overview**
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ File Edit View AI [- โ–ก ร—] โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿ“ Explorer โ”‚ Editor Tabs โ”‚ ๐Ÿค– AI Assistant โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
โ”‚ ๐Ÿ“‚ Project โ”‚ โ”‚file1โ”‚file2โ”‚file3โ”‚ + โ”‚ โ”‚ Ask AI about โ”‚
โ”‚ โ””๐Ÿ“„ file1.py โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ your code... โ”‚
โ”‚ โ””๐Ÿ“„ file2.js โ”‚ โ”‚ โ”‚
โ”‚ โ””๐Ÿ“„ README.md โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ [Explain Code] โ”‚
โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ [Optimize] โ”‚
โ”‚ ๐Ÿ” Search โ”‚ โ”‚ Code Editor Area โ”‚ โ”‚ [Debug Help] โ”‚
โ”‚ ๐Ÿ”ง Extensions โ”‚ โ”‚ โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ 1 def hello_world(): โ”‚ โ”‚ Recent: โ”‚
โ”‚ โ”‚ โ”‚ 2 print("Hello!") โ”‚ โ”‚ โ€ข Explained โ”‚
โ”‚ โ”‚ โ”‚ 3 โ”‚ โ”‚ function โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ€ข Fixed bug โ”‚
โ”‚ โ”‚ โ”‚ in line 42 โ”‚
โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚
โ”‚ โ”‚ ๐Ÿ–ฅ๏ธ Terminal โ”‚ โ”‚
โ”‚ โ”‚ $ python file1.py โ”‚ โ”‚
โ”‚ โ”‚ Hello! โ”‚ โ”‚
โ”‚ โ”‚ $ _ โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Ln 2, Col 8 โ”‚ Python โ”‚ UTF-8 โ”‚ โœ“ Saved โ”‚ ๐Ÿ”— Git: main โ”‚ ๐ŸŸข Ready โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```
### **File Explorer Panel**
- **๐Ÿ“ Folder icons** for directories
- **๐Ÿ“„ File icons** based on file type (๐Ÿ .py, ๐Ÿ“œ .js, ๐ŸŒ .html, etc.)
- **Double-click** to open files
- **Right-click** for context menu (planned)
- **Drag & drop** support (planned)
### **Editor Area**
- **Tabbed interface** for multiple files
- **Syntax highlighting** with language detection
- **Line numbers** and code folding
- **Modified indicator** (โ— for unsaved changes)
- **Close buttons** on each tab
### **AI Assistant Panel**
- **Chat interface** for code questions
- **Quick action buttons** for common tasks
- **Context awareness** of current code
- **Model selection** for different AI capabilities
- **History** of previous interactions
### **Terminal Panel**
- **Full shell access** with command execution
- **Resizable** and collapsible
- **Working directory** synced with project
- **Output capture** and scrollback history
## โŒจ๏ธ **Keyboard Shortcuts**
### **File Operations**
| Shortcut | Action |
|----------|--------|
| `Ctrl+N` | New File |
| `Ctrl+O` | Open File |
| `Ctrl+Shift+O` | Open Folder |
| `Ctrl+S` | Save File |
| `Ctrl+Shift+S` | Save As |
| `Ctrl+W` | Close Tab |
### **Editor Navigation**
| Shortcut | Action |
|----------|--------|
| `Ctrl+PageUp` | Previous Tab |
| `Ctrl+PageDown` | Next Tab |
| `Ctrl+Z` | Undo |
| `Ctrl+Y` | Redo |
| `Ctrl+F` | Find |
| `Ctrl+H` | Replace |
### **View & Panels**
| Shortcut | Action |
|----------|--------|
| `Ctrl+`` | Toggle Terminal |
| `Ctrl+Shift+E` | Focus Explorer |
| `F11` | Toggle Fullscreen |
### **AI Assistant**
| Shortcut | Action |
|----------|--------|
| `Ctrl+Shift+E` | Explain Code |
| `Ctrl+Shift+O` | Optimize Code |
| `Ctrl+Shift+D` | Debug Help |
## ๐Ÿ—ฃ๏ธ **AI Command Reference**
### **๐Ÿง  Self-Awareness Commands**
| Command | Result |
|---------|--------|
| `"analyze yourself"` | AI explains its own architecture and components |
| `"read your code"` | AI shows how it's implemented internally |
| `"how do you work?"` | AI explains its internal workings and design |
| `"explain yourself"` | AI gives a comprehensive tour of its codebase |
| `"show your code structure"` | AI describes its file organization and patterns |
### **โšก Direct Code Insertion Commands**
| Command Pattern | Mode | Result |
|----------------|------|--------|
| `"make a [thing]"` | ๐Ÿ”’ Safe | Generates code with copy/paste instructions |
| `"create a [thing]"` | ๐Ÿ”’ Safe | Generates code with manual insertion |
| `"insert a [thing]"` | ๐Ÿš€ Direct | Automatically inserts code into editor |
| `"add to editor: [description]"` | ๐Ÿš€ Direct | Writes code directly to current file |
| `"put in file: [description]"` | ๐Ÿš€ Direct | Places code in active editor tab |
| `"write to file: [description]"` | ๐Ÿš€ Direct | Generates and inserts code automatically |
### **๐Ÿ“ Code Analysis Commands**
| Command | Purpose |
|---------|---------|
| `"explain this code"` | Detailed explanation of selected/current code |
| `"optimize this function"` | Performance and efficiency suggestions |
| `"debug this code"` | Error detection and debugging help |
| `"review this code"` | Code quality and best practices analysis |
| `"document this function"` | Generate documentation for code |
| `"test this function"` | Create unit tests for the code |
### **๐ŸŽฏ Smart Context Commands**
| Command | AI Behavior |
|---------|-------------|
| `"what can you do?"` | Lists capabilities based on self-knowledge |
| `"help me with [language]"` | Language-specific assistance |
| `"show me examples"` | Provides examples using its own implementation |
| `"best practices for [topic]"` | Recommendations based on AI's architecture |
## ๐Ÿค– **AI Integration Features**
### **๐Ÿง  Self-Aware AI Capabilities**
- **Self-analysis**: Ask "analyze yourself" to see AI's architecture
- **Code introspection**: AI reads its own source for better context
- **Implementation explanations**: "How do you work?" reveals internal workings
- **Architecture understanding**: AI knows its own components and design patterns
- **Smart suggestions**: Uses self-knowledge for better recommendations
### **โšก Direct Code Insertion Modes**
#### **๐Ÿ”’ Safe Mode (Default)**
- **Manual control**: AI generates code with copy/paste instructions
- **Review before insertion**: You decide what gets added
- **Zero risk**: No accidental file modifications
- **Example**: `"Make a hello world program"` โ†’ Copy/paste instructions
#### **๐Ÿš€ Direct Insertion Mode**
- **Automatic insertion**: AI writes code directly to your editor
- **Triggered by keywords**: "insert", "add to editor", "put in file", "write to file"
- **Smart placement**: Replaces welcome text or inserts at cursor
- **Example**: `"Insert a hello world program"` โ†’ Code appears in editor instantly
### **Code Explanation**
- **Select code** and ask "Explain this function"
- **Get detailed explanations** of algorithms and logic
- **Understand complex code** written by others
- **Learn new programming concepts**
- **AI references its own implementation** for better examples
### **Code Optimization**
- **Performance improvements** suggestions
- **Memory usage** optimization
- **Algorithm efficiency** recommendations
- **Best practices** enforcement
- **Architectural insights** from AI's self-knowledge
### **Debugging Assistance**
- **Error analysis** and solutions
- **Bug detection** in code logic
- **Testing strategies** recommendations
- **Code review** and quality checks
- **AI debugging techniques** from its own codebase
### **Code Generation**
- **Natural language to code** conversion
- **Function scaffolding** from descriptions
- **Documentation generation**
- **Unit test creation**
- **Design pattern implementation** based on AI's architecture
## ๐Ÿ”ง **Advanced Configuration**
### **Themes & Appearance**
```python
# Custom theme configuration (planned)
{
"theme": "dark",
"font_family": "Consolas",
"font_size": 11,
"line_numbers": true,
"word_wrap": false
}
```
### **AI Model Selection**
```python
# Available AI models
models = [
"qwen2.5-coder:latest", # Best for coding
"llama3.2:latest", # General purpose
"qwen2.5:latest", # Balanced performance
"llava:latest" # Vision capabilities
]
```
### **Language Support**
- **Python** ๐Ÿ - Full support with linting
- **JavaScript/TypeScript** ๐Ÿ“œ - Syntax highlighting
- **HTML/CSS** ๐ŸŒ - Web development
- **C/C++** โš™๏ธ - Systems programming
- **Java** โ˜• - Enterprise development
- **Go** ๐Ÿน - Modern systems language
- **Rust** ๐Ÿฆ€ - Memory-safe systems
- **PHP** ๐Ÿ˜ - Web backend
- **Ruby** ๐Ÿ’Ž - Dynamic scripting
- **Shell/Bash** ๐Ÿš - System administration
- **SQL** ๐Ÿ—ƒ๏ธ - Database queries
- **JSON/YAML** ๐Ÿ“‹ - Configuration files
- **Markdown** ๐Ÿ“ - Documentation
## ๐Ÿš€ **Performance & Optimization**
### **System Resources**
- **Memory Usage**: 200-400MB (depending on project size)
- **CPU Usage**: <5% during normal editing
- **Startup Time**: 2-4 seconds
- **File Loading**: Instant for files <10MB
### **Scalability**
- **Large Projects**: Handles 1000+ files efficiently
- **Multiple Tabs**: No limit on open files
- **Real-time Monitoring**: Minimal performance impact
- **AI Responses**: 1-3 seconds average
## ๐Ÿ”ฎ **Planned Features**
### **Version Control**
- **Git integration** with visual diff
- **Branch management** and merging
- **Commit history** and blame view
- **Pull request** integration
### **Extensions & Plugins**
- **Plugin system** for custom functionality
- **Language servers** for advanced IntelliSense
- **Custom themes** and color schemes
- **Third-party integrations**
### **Collaboration**
- **Real-time collaboration** (like VS Code Live Share)
- **Code sharing** and snippets
- **Team workspaces**
- **Integrated chat**
### **Advanced AI Features**
- **Code completion** with AI suggestions
- **Refactoring assistance**
- **Architecture recommendations**
- **Security vulnerability** detection
## ๐Ÿ†š **Comparison with Other IDEs**
### **ATLES Code Studio vs VS Code**
| Feature | ATLES Code Studio | VS Code |
|---------|------------------|---------|
| **๐Ÿง  Self-Aware AI** | โœ… AI reads its own code | โŒ No self-awareness |
| **โšก Direct Code Insertion** | โœ… AI writes code directly | โŒ Manual copy/paste only |
| **AI Integration** | โœ… Built-in, context-aware | โŒ Extension required |
| **Offline Operation** | โœ… Fully offline | โš ๏ธ Some features need internet |
| **Setup Complexity** | โœ… One-click install | โš ๏ธ Extensions needed |
| **Performance** | โœ… Native Python/Qt | โš ๏ธ Electron overhead |
| **Customization** | โš ๏ธ Limited (growing) | โœ… Extensive |
| **Extension Ecosystem** | โŒ Not yet | โœ… Massive |
### **ATLES Code Studio vs PyCharm**
| Feature | ATLES Code Studio | PyCharm |
|---------|------------------|---------|
| **๐Ÿง  Self-Aware AI** | โœ… AI understands itself | โŒ No self-awareness |
| **โšก Direct Code Insertion** | โœ… AI writes code directly | โŒ Manual insertion only |
| **AI Assistant** | โœ… Integrated & context-aware | โš ๏ธ Separate service |
| **Resource Usage** | โœ… Lightweight | โŒ Heavy |
| **Startup Time** | โœ… Fast (2-4s) | โŒ Slow (10-30s) |
| **Multi-language** | โœ… 20+ languages | โš ๏ธ Python-focused |
| **Price** | โœ… Free | โŒ Paid (Professional) |
| **Advanced Features** | โš ๏ธ Growing | โœ… Comprehensive |
## ๐Ÿ› ๏ธ **Troubleshooting**
### **Common Issues**
#### **Application Won't Start**
```bash
# Check Python version
python --version # Should be 3.8+
# Check PyQt installation
python -c "import PyQt6; print('PyQt6 OK')"
# Install missing dependencies
pip install -r code_studio_requirements.txt
```
#### **Syntax Highlighting Not Working**
```bash
# Install pygments
pip install pygments
# Restart the application
```
#### **AI Assistant Not Responding**
```bash
# Check ATLES installation
python -c "from atles.ollama_client_enhanced import OllamaFunctionCaller; print('ATLES OK')"
# Check Ollama service
ollama list
# Restart Ollama
ollama serve
```
#### **Terminal Not Working**
- **Windows**: Ensure `cmd.exe` is available in PATH
- **Linux/macOS**: Ensure `/bin/bash` exists
- **Permissions**: Check terminal execution permissions
### **Performance Issues**
- **Large files**: Files >50MB may be slow to load
- **Many tabs**: Consider closing unused tabs
- **Memory usage**: Restart application if memory >1GB
- **AI responses**: Check Ollama service status
## ๐Ÿ“ž **Support & Community**
### **Getting Help**
1. **Check documentation** - This README and inline help
2. **Use AI assistant** - Ask questions directly in the app
3. **Check console output** - Look for error messages
4. **Restart application** - Often fixes temporary issues
### **Feature Requests**
- Use the AI assistant to suggest improvements
- Document your workflow needs
- Contribute to the codebase
### **Contributing**
- **Code contributions** welcome
- **Theme development**
- **Language support** additions
- **Documentation** improvements
---
## ๐ŸŽ‰ **Conclusion**
ATLES Code Studio brings together the best of modern IDE design with powerful AI assistance, creating a development environment that's both familiar and innovative. Whether you're a beginner learning to code or an experienced developer working on complex projects, the AI-powered features help you write better code faster.
**Start coding smarter with ATLES Code Studio!** ๐Ÿš€
---
*Last Updated: December 2024*
*Version: 1.1.0 - Self-Aware AI Edition*
*Status: โœ… READY FOR USE - Now with Self-Aware AI & Direct Code Insertion!*