What's New in Torrify โ
Latest Update: Streaming AI + Knowledge Base + Image Import โ
Date: January 25, 2026
Highlights โ
- Streaming AI responses with a stop button and live cursor
- Knowledge Base context for OpenSCAD/build123d API assistance
- Image import in chat with previews and project persistence
Previous Update: Menu Bar & Error Diagnosis โ
Date: January 24, 2026
๐ Native Menu Bar โ
LLM and Help functionality has been moved from the toolbar to the native menu bar for a cleaner interface.
Menu Structure โ
| Menu | Items |
|---|---|
| File | New, Open, Save, Save As, Export Source, Export STL, Quit |
| Edit | Undo, Redo, Cut, Copy, Paste, Select All |
| View | Render, Reload, DevTools, Zoom controls, Fullscreen |
| LLM | Toggle AI, Switch to BYOK, Switch to PRO, LLM Settings |
| Help | Help Bot, Show Demo, Settings |
Why This Change? โ
- Cleaner toolbar with less clutter
- Native keyboard accelerators
- Follows desktop application conventions
- LLM controls still easily accessible
๐ง One-Click Error Diagnosis โ
When you encounter a render error, you can now ask the AI to diagnose it with one click!
How It Works โ
- Code fails to render (syntax error, CAD error, etc.)
- Error message is displayed in the preview panel
- Click the purple "Ask AI to Diagnose" button
- AI receives your code + the error message
- AI analyzes and suggests fixes
Example โ
Error: STL export error: extrude doesn't accept BuildSketch...Click "Ask AI to Diagnose" and the AI will explain:
- What the error means
- Why it happened
- How to fix it with corrected code
Previous Update: Multi-Backend CAD Support โ
Torrify now supports multiple CAD backends! Choose between OpenSCAD and build123d (Python).
See CAD_BACKENDS.md for full documentation.
Previous Update: AI Integration โ
๐ค Real AI is Here! โ
The mock chat bot has been replaced with real Google Gemini AI!
What This Means โ
Before:
User: "How do I create a sphere?"
Bot: "Mock response to: 'How do I create a sphere?'"Now:
User: "How do I create a sphere?"
AI: "To create a sphere in OpenSCAD, use the sphere() function:
sphere(r=10, $fn=100);
Where:
- r is the radius
- $fn controls the number of facets (higher = smoother)
The $fn parameter is optional but recommended for smooth spheres."Try It Now! โ
- Launch the app:
npm run electron:dev - Type in chat: "Explain the cube function"
- Watch AI respond with helpful OpenSCAD information
- Your current code is automatically included as context!
๐ฏ New Features โ
1. Real AI Chat โ
- Powered by Google Gemini 2.0 Flash
- Understands OpenSCAD deeply
- Sees your current code automatically
- Maintains conversation history
- Fast responses (1-3 seconds)
2. Multi-Provider Support โ
The architecture now supports multiple AI providers:
- โ Google Gemini (Active)
- ๐ง OpenAI (Coming soon)
- ๐ง Anthropic Claude (Coming soon)
- ๐ง Local Models (Coming soon - Ollama, LM Studio)
3. Enhanced Settings โ
New "AI Configuration" tab in settings (โ๏ธ):
- Choose your AI provider
- Enter API key
- Select model
- Enable/disable AI
- Adjust temperature (creativity)
- Set max tokens (response length)
4. Better UI โ
- Header bar with app title
- Settings gear icon always visible
- Status indicator shows current AI model
- Error messages are more helpful
- Loading states during AI thinking
๐ How to Configure โ
Step 1: Open Settings โ
Click the โ๏ธ icon in the top-right corner
Step 2: Go to AI Configuration Tab โ
Switch from "General" to "AI Configuration"
Step 3: Configure (BYOK) โ
Torrify uses a bring-your-own-key model. Enter your API key and enable the assistant.
Step 4: Save โ
Click "Save" button (already configured, but you can adjust)
๐ก Usage Examples โ
Get Help โ
You: "What does $fn do?"
AI: "$fn controls the number of fragments used to render curved surfaces..."Generate Code โ
You: "Create a cylinder 30mm tall and 10mm radius"
AI: "cylinder(h=30, r=10, $fn=50);"Debug Issues โ
You: "Why isn't this rendering?"
AI: [Analyzes your code] "The issue is... try changing..."Learn Concepts โ
You: "Explain difference() function"
AI: [Detailed explanation with examples]๐ง Technical Details โ
What's Under the Hood โ
New Architecture:
ChatPanel โ LLM Service Factory โ Gemini Service โ Google API
โ
(OpenAI, Anthropic, Custom coming soon)Code Context: Every AI request automatically includes:
- Your current code from the editor
- Conversation history
- OpenSCAD-specific instructions
Smart Prompting:
System: "You are an expert OpenSCAD assistant..."
System: "Current code: cube([10, 10, 10]);"
User: "Make it bigger"
AI: [Understands context and suggests cube([20, 20, 20])]Files Added โ
src/services/llm/
โโโ types.ts - Shared interfaces
โโโ index.ts - Factory pattern
โโโ GeminiService.ts - Google Gemini impl.Settings Updated โ
{
"llm": {
"provider": "gemini",
"model": "gemini-3-flash",
"apiKey": "YOUR_KEY",
"enabled": true,
"temperature": 0.7,
"maxTokens": 2048
}
}๐จ UI Changes โ
New Header Bar โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Torrify OpenSCAD IDE [โ๏ธ] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโUpdated Chat Panel โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Assistant โ
โ Google Gemini (gemini-2.0...) โ โ Shows current model
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [Conversation] โ
โ โ
โ [Thinking...] โ Loading โ โ During AI response
โ โ
โ [Type message...] โ
โ [Send] โ Disabled while AI โ
โ is thinking โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโSettings Modal - New AI Tab โ
[General] [AI Configuration] โ Tabs
AI Configuration:
[x] Enable AI Assistant
Provider: [Google Gemini โผ]
Model: gemini-3-flash
API Key: โขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโข
Temperature: 0.7
Max Tokens: 2048
[Cancel] [Save]๐งช Testing โ
Run npm test to see the current test count and status.
๐ What to Try First โ
1. Ask About OpenSCAD โ
"What is the difference between cube() and sphere()?"2. Get Code Help โ
"How do I create a hollow cylinder?"3. Debug Your Code โ
Write some invalid OpenSCAD, then ask:
"Why isn't this working?"4. Learn New Features โ
"Show me examples of the difference() function"5. Generate Complex Shapes โ
"Create a gear with 20 teeth"๐ Bonus Features โ
Context-Aware AI โ
The AI automatically knows what you're working on:
- Sees your current code
- Remembers conversation
- Gives relevant suggestions
- No need to paste code manually
Smart Error Handling โ
If AI fails:
- Clear error messages
- Suggests next steps
- Doesn't break the app
- Can retry immediately
Persistent Settings โ
- Settings saved automatically
- Survive app restarts
- Per-user configuration
- Easy to backup/restore
๐ Performance โ
AI Response Times โ
- Gemini Flash: 1-3 seconds (typical)
- First message: May take 3-5 seconds
- Follow-ups: Usually faster
Token Usage โ
- Average request: 500-1000 tokens
- With code context: 1000-1500 tokens
- Long conversations: Up to 3000 tokens
Costs (Gemini Free Tier) โ
- Free: 15 requests/minute
- Cost: $0.00 (free tier sufficient for testing)
- Paid: ~$0.01 per day typical use
โ ๏ธ Important Notes โ
API Key Security โ
Your API key is:
- โ Stored locally on your machine
- โ Not in version control
- โ Password-masked in UI
- โ Used only for your requests
Don't share your settings file!
Internet Required โ
The AI features require internet connection:
- Gemini API calls
- OpenAI (when implemented)
- Anthropic (when implemented)
Local models (when implemented) will work offline.
Rate Limits โ
Gemini free tier: 15 requests/minute
- Sufficient for normal use
- Upgrade if you hit limits
๐ Known Issues โ
None Critical! โ
Minor items may include local dependency warnings or backend-specific setup issues.
๐ฎ Coming Soon โ
Next Updates โ
More Providers
- OpenAI (GPT-4)
- Anthropic (Claude)
- Local models (Ollama)
Advanced AI Features
- Code modification
- Error auto-fix
- Inline suggestions
Editor Enhancements
- Custom OpenSCAD syntax highlighting
- Code snippets library
๐ Documentation โ
New Guides โ
LLM_INTEGRATION.md- Complete AI integration docsSESSION_SUMMARY.md- Work done this session- Updated
HANDOFF.md- Full development log
Updated Guides โ
README.md- Now mentions AI featuresQUICKSTART.md- AI setup instructions
โ Verification โ
To verify everything works:
# 1. Run tests
npm test
# Shows the current test count and pass/fail summary
# 2. Launch app
npm run electron:dev
# Should open without errors
# 3. Test AI
# Type "hello" in chat
# Should get real AI response (not mock)
# 4. Test rendering
# Press Ctrl+S
# Should see cube in preview
# 5. Check settings
# Click โ๏ธ
# Should see AI Configuration tab๐ Summary โ
What Changed:
- Mock AI โ Real Google Gemini
- Hardcoded โ Configurable
- Single provider โ Multi-provider ready
- Basic โ Production-ready
What Stayed the Same:
- All existing features work
- Tests still passing
- UI mostly unchanged
- OpenSCAD rendering works
Bottom Line: You now have a real, functional AI-assisted OpenSCAD IDE with room to grow!
๐ Quick Help โ
AI not responding? โ Check Settings โ AI Configuration โ Verify enabled
Want different AI? โ Other providers coming soon, or implement yourself using the guide
Need more help? โ Read LLM_INTEGRATION.md for complete details
Enjoy your AI-powered OpenSCAD IDE! ๐
๐ File Operations โ
Date: January 24, 2026
What's New โ
Torrify now supports direct file operations for .scad and .py files (backend-aware)!
New Features:
- Open Files: Open
.scador.pyfiles directly (Ctrl+O) - Save Files: Save files to disk (
Ctrl+Swhen file is open) - Save As: Save files with new names (
Ctrl+Shift+S) - New File: Create new files (
Ctrl+N) - Window Title: Shows current filename and unsaved changes indicator
- Unsaved Changes Warning: Prompts before losing unsaved work
How to Use:
- Click "Open" in the header or press
Ctrl+O - Select a
.scador.pyfile - Edit the code
- Click "Save" or press
Ctrl+Sto save - Window title shows
* filename.scadwhen you have unsaved changes
Benefits:
- Work directly with existing OpenSCAD/build123d files
- No need to copy/paste code
- Standard IDE file operations
- Unsaved changes protection
Keyboard Shortcuts:
Ctrl+O- Open fileCtrl+N- New fileCtrl+S- Save (if file open) or Render (if no file)Ctrl+Shift+S- Save As
๐ง Multi-Backend CAD Support โ
Date: January 24, 2026
What's New โ
Torrify now supports multiple CAD backends! You can choose between OpenSCAD (traditional) and build123d (Python-based).
Supported Backends โ
| Backend | Language | File Extension | Requirements |
|---|---|---|---|
| OpenSCAD (default) | OpenSCAD DSL | .scad | OpenSCAD CLI |
| build123d | Python | .py | Python + build123d |
How to Switch Backends โ
- Open Settings (โ๏ธ button)
- Go to "General" tab
- Select "CAD Backend" dropdown
- Choose your preferred backend
- Configure the required path (OpenSCAD executable or Python interpreter)
- Save settings
What Changes When You Switch โ
Editor:
- OpenSCAD: C-style syntax highlighting, 2-space tabs
- build123d: Python syntax highlighting, 4-space tabs
AI Assistant:
- Prompts automatically adapt to your selected backend
- OpenSCAD: Get help with OpenSCAD functions, modules, and syntax
- build123d: Get help with build123d, Python, and Open CASCADE concepts
Rendering:
- Both backends output STL for the 3D preview
- OpenSCAD: Uses OpenSCAD CLI directly
- build123d: Uses Python with auto-export wrapper
build123d Auto-Export โ
The build123d backend automatically detects and exports your geometry! Just write normal build123d code:
from build123d import *
# Create a box
box = Box(10, 10, 10)
result = box # Assign to 'result' for auto-exportSupported patterns:
- Algebra mode:
box = Box(10, 10, 10) - Builder mode:
with BuildPart() as part: Box(10, 10, 10) - Named variables:
result,part,model,obj,shape,solid,box, etc.
Installation โ
OpenSCAD:
- Install OpenSCAD from https://openscad.org
- Configure path in Settings
build123d:
pip install build123d- Configure Python path in Settings (default:
python)
Why Multiple Backends? โ
- Flexibility: Use your preferred CAD tool
- Python Power: build123d gives you Python's full ecosystem
- Learning: Try different approaches to 3D modeling
- Migration: Easily switch between tools
Documentation โ
See docs/features/CAD_BACKENDS.md for complete documentation.
Milestone - January 24, 2026