openProject function
Implementation
Future<void> openProject(String name) async {
final db = await loadDB();
final project = db[name];
if (project == null) return print('🔴 Project not found: $name'.red);
final path = project['path'];
final cmd = 'code';
try {
await Process.start(cmd, [path], runInShell: true);
db[name]['last_opened'] = DateTime.now().toIso8601String();
await saveDB(db);
print('🟢 Opened in VS Code: $name'.green);
} catch (e) {
print('🔴 Error launching VS Code: $e'.red);
}
}