How foxgem/tsw works
Main Components Identification
The system should be divided into these primary components:
A. Extension Components:
• Popup Interface
• Content Scripts
• Background Service
• Settings Management
• UI Components Library
• AI Services Integration
B. External Services:
• Gemini AI API
• Image Processing Services (for OCR)
• Translation Services
Component Relationships
• Data flow between popup and content scripts
• Communication with background services
• Integration with AI services
• Storage interactions
Specific Implementation Details
A. Extension Architecture:
[Popup Interface] ←→ [Background Service]
• ↕ ↕
[Content Scripts] ←→ [Storage Utils]
• ↕
[UI Components] ←→ [AI Tools]
B. Feature Modules:
• Image OCR Pipeline
• Translation Service
• Code Analysis Tools
• Timer System
• Chat Interface
C. Tools Integration:
How the various tools in /src/ai/tools connect:
• Geomap
• Knowledge Card
• Mindmap
• Weather
• Search
Technical Stack Representation
Technology badges or labels for:
• Plasmo (Extension Framework)
• React
• Tailwind CSS
• Vercel AI SDK
• Gemini API
Key Interactions
Highlight:
• User interaction flows
• API communication patterns
• State management
• Storage mechanisms