Skip to content

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.

MenuItems
FileNew, Open, Save, Save As, Export Source, Export STL, Quit
EditUndo, Redo, Cut, Copy, Paste, Select All
ViewRender, Reload, DevTools, Zoom controls, Fullscreen
LLMToggle AI, Switch to BYOK, Switch to PRO, LLM Settings
HelpHelp 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 โ€‹

  1. Code fails to render (syntax error, CAD error, etc.)
  2. Error message is displayed in the preview panel
  3. Click the purple "Ask AI to Diagnose" button
  4. AI receives your code + the error message
  5. 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! โ€‹

  1. Launch the app: npm run electron:dev
  2. Type in chat: "Explain the cube function"
  3. Watch AI respond with helpful OpenSCAD information
  4. 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 โ€‹

json
{
  "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 โ€‹

  1. More Providers

    • OpenAI (GPT-4)
    • Anthropic (Claude)
    • Local models (Ollama)
  2. Advanced AI Features

    • Code modification
    • Error auto-fix
    • Inline suggestions
  3. Editor Enhancements

    • Custom OpenSCAD syntax highlighting
    • Code snippets library

๐Ÿ“š Documentation โ€‹

New Guides โ€‹

  • LLM_INTEGRATION.md - Complete AI integration docs
  • SESSION_SUMMARY.md - Work done this session
  • Updated HANDOFF.md - Full development log

Updated Guides โ€‹

  • README.md - Now mentions AI features
  • QUICKSTART.md - AI setup instructions

โœ… Verification โ€‹

To verify everything works:

powershell
# 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 .scad or .py files directly (Ctrl+O)
  • Save Files: Save files to disk (Ctrl+S when 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:

  1. Click "Open" in the header or press Ctrl+O
  2. Select a .scad or .py file
  3. Edit the code
  4. Click "Save" or press Ctrl+S to save
  5. Window title shows * filename.scad when 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 file
  • Ctrl+N - New file
  • Ctrl+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 โ€‹

BackendLanguageFile ExtensionRequirements
OpenSCAD (default)OpenSCAD DSL.scadOpenSCAD CLI
build123dPython.pyPython + build123d

How to Switch Backends โ€‹

  1. Open Settings (โš™๏ธ button)
  2. Go to "General" tab
  3. Select "CAD Backend" dropdown
  4. Choose your preferred backend
  5. Configure the required path (OpenSCAD executable or Python interpreter)
  6. 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:

python
from build123d import *

# Create a box
box = Box(10, 10, 10)
result = box  # Assign to 'result' for auto-export

Supported 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:

build123d:

bash
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

Released under the GPL-3.0 License.