Spaces:
Build error
Build error
File size: 1,300 Bytes
51ff9e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
const vscode = require('vscode');
const MemoryMonitor = require('./memory_monitor');
function activate(context) {
// Create memory monitor instance
const memoryMonitor = new MemoryMonitor();
// Store the context in the memory monitor
memoryMonitor.context = context;
// Register memory monitor start command
let startMonitorCommand = vscode.commands.registerCommand('openhands-memory-monitor.startMemoryMonitor', function () {
memoryMonitor.start();
});
// Register memory monitor stop command
let stopMonitorCommand = vscode.commands.registerCommand('openhands-memory-monitor.stopMemoryMonitor', function () {
memoryMonitor.stop();
});
// Register memory details command
let showMemoryDetailsCommand = vscode.commands.registerCommand('openhands-memory-monitor.showMemoryDetails', function () {
memoryMonitor.showDetails();
});
// Add all commands to subscriptions
context.subscriptions.push(startMonitorCommand);
context.subscriptions.push(stopMonitorCommand);
context.subscriptions.push(showMemoryDetailsCommand);
// Start memory monitoring by default
memoryMonitor.start();
}
function deactivate() {
// Clean up resources if needed
}
module.exports = {
activate,
deactivate
}
|