How socketteer/loom works
Main Components to Include:
User Interface Layer (View)
• Using a large container at the top
• Sub-components:
• Read Mode View
• Tree View
• Block Multiverse Interface
• Dialog Systems
Controller Layer
• Event handling and user interaction flow
• To both View and Model layers
Model Layer
• At the bottom
• Components:
• Tree Data Structure
• Node Management
• State Management
External Services
• On the right side
• Include:
• OpenAI GPT-3 API
• AI21 API
• GooseAI API
• Local LLama.cpp Integration
Utility Layer
• On the left side
• Utilities by function:
• File Operations
• Canvas Utilities
• Text Processing
• Keybindings
Connection Types
• Double lines: API communications
Component Organization
[Static Resources] -----> [View Layer]
[Utilities] ------------> [Controller] <-----> [External Services]
• [Model Layer]
• [File Storage]
Detailed Component Breakdown
View Layer:
• .py
• panes.py
• tree_vis.py
• styles.py
Controller Layer:
• controller.py
• keybindings
• dialog management
Model Layer:
• model.py
• block_multiverse.py
• modules.py
Utilities:
• file_utils.py
• canvas_util.py
• gpt_util.py
• tokenizer.py
Additional Elements
• Version/environment information
• Configuration flow from config/ directory
• Error handling paths