You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Copilot Instructions for Magento Log Viewer Extension
2
+
3
+
## Architecture Overview
4
+
5
+
This is a VS Code extension that provides intelligent viewing and management of Magento log files. The extension follows a modular architecture with clear separation of concerns:
6
+
7
+
-**`src/extension.ts`** - Entry point with asynchronous initialization pattern to avoid blocking VS Code startup
-**`src/updateNotifier.ts`** - Version update notifications and changelog integration
11
+
12
+
## Key Architectural Patterns
13
+
14
+
### Workspace-Scoped Configuration
15
+
The extension uses workspace-scoped settings via `vscode.workspace.getConfiguration('magentoLogViewer', workspaceUri)`. All configuration is stored per-workspace, allowing different Magento projects to have independent settings.
16
+
17
+
### Asynchronous Initialization
18
+
```typescript
19
+
// Pattern: Delay heavy operations to let VS Code indexing settle
-**Status Bar**: Badge counts and search indicators
104
+
105
+
### External Dependencies
106
+
-**Webpack**: Bundles TypeScript to single `dist/extension.js`
107
+
-**Node.js fs**: Synchronous and async file operations
108
+
-**VS Code Test Framework**: `@vscode/test-cli` for extension testing
109
+
110
+
## Performance Considerations
111
+
112
+
-**Lazy loading**: Heavy operations delayed until user interaction
113
+
-**Throttled badge updates**: Maximum one badge update per second
114
+
-**Smart caching**: File content cached with automatic memory limits
115
+
-**Async file operations**: Uses `fs.promises` for non-blocking I/O where possible
116
+
117
+
When modifying this extension, prioritize user experience with immediate feedback, maintain the caching system integrity, and ensure proper disposal of resources to prevent memory leaks.
"markdownDescription": "Path to the Magento root folder. Use Command Palette: `Magento Log Viewer: Select Root Folder` to browse and select a folder.",
0 commit comments