How thegafo/tripleg works
Main Components
A. Core System Components:
• Input Handlers Layer
• Keyboard Listener (keyboard.js)
• Clipboard Monitor (clipboard.js)
• Screenshot Handler (screenshot/screenshot.js)
• OCR Processing (ocr/OCR.swift, ocr.js)
B. AI Provider Integration Layer:
• Provider Adapters
• OpenAI (openai.js)
• Anthropic (anthropic.js)
• Gemini (gemini.js)
• Other supported providers
C. System Integration Layer:
• Status Management (status/Status.swift, status.js)
• Tools Integration (tools.js)
• Utilities (utils.js)
• Watch System (watch.js)
Component Relationships
• Input handlers → AI Provider Integration (showing how user input gets processed)
• AI Provider Integration → External AI Services (API calls)
• System Integration Layer ↔ Core Components (bidirectional communication)
Data Flow Representation
• User Input → Input Handlers
• Input Handlers → Context Management
• Context → AI Provider Selection
• AI Provider → Completion Generation
• Completion → System Output
Specific Elements to Highlight
A. Input Processing:
[Keyboard Events] → [Trigger Detection (ggg/GGG)] → [Context Collection]
[Clipboard Events] → [Context Updates]
[Screenshot Events] → [OCR Processing] → [Context Updates]
B. AI Processing Pipeline:
[Context] → [Provider Selection] → [API Call] → [Response Processing] → [Output]