How trypear/pearai-submodule works
Main Components
a. IDE Extensions Layer
• VSCode Extension
• IntelliJ Extension
• Common IDE Protocol Interface
b. Core Services Layer
• LLM Integration Services
• Context Providers
• Autocomplete Engine
• Command Handlers
• Indexing Services
c. GUI Layer
• Webview Interface
• Editor Inset Components
• Dialog Systems
d. Infrastructure Layer
• Binary Communication Layer
• Authentication Services
• Analytics Services
• Configuration Management
Component Relationships
[IDE Extensions] → [Core Protocol Layer] → [Core Services] ↔ [External LLMs/Services]
• ↕ ↕ ↕
[Binary Communication] ← [Configuration] → [GUI Components]
Detailed Component Breakdown
a. IDE Extensions (Blue)
• VSCode Extension
• Command Handlers
• Editor Integration
• Extension Lifecycle
• IntelliJ Extension
• Action Handlers
• Editor Integration
• Plugin Lifecycle
b. Core Services (Green)
• LLM Integration
• Provider Adapters
• Stream Handling
• Token Management
• Context System
• File Context
• Code Context
• Custom Context
• Indexing
• Code Indexer
• Search
• Embeddings
c. GUI Components (Purple)
• Main Chat Interface
• Editor Insets
• Command Palette
• Settings Panels
Key Integration Points to Highlight
• Bidirectional communication between IDE extensions and core services
• Flow of code context from IDE to LLM services
• Configuration management affecting all layers
• Authentication flow through the system
Implementation Details to Note
• Version/configuration flow indicators
This system design should emphasize the extensible nature of the project, showing how new IDE integrations or LLM providers can be added without major architectural changes.