How leighklotz/boxy works
Main Components
A. Core Editor Components:
• Text Editor Interface (boxy.html, style.css)
• Editor Logic Controller (boxy.js)
• Keymap Handler (keymap.js)
• Configuration System (config.js)
B. LLM Integration Module:
• LLM Inference Engine (modules/llm-infer/llm-infer.js)
• LLM Configuration (modules/llm-infer/docs/AICoder.yaml)
[User Interface Layer]
• HTML View (boxy.html)
• CSS Styling (style.css)
[Core Logic Layer]
• Editor Controller (boxy.js)
• Key Mapping System (keymap.js)
• Configuration Manager (config.js)
[Module Layer]
• LLM Integration
• Inference Engine (llm-infer.js)
• LLM Configuration (AICoder.yaml)
Key Interactions to Highlight
A. User Input Flow:
• How keyboard/mouse inputs flow through the keymap handler
• How commands are processed by the editor controller
C. LLM Integration:
• Flow from user input to LLM inference
• How responses are integrated back into the editor
Implementation Details
• Text selection and manipulation
• LLM prompt handling and response integration
• Command evaluation system (C-|)
External Dependencies
• Connection to external LLM services
• Browser APIs being used
• File system interactions for configuration
Remember to emphasize the modular nature of the system, particularly how the LLM integration is implemented as a separate module that extends the core editor functionality.