import { tspmIpcClient } from '../../classes.ipcclient.js'; // Helper function to run IPC commands with automatic disconnect export async function runIpcCommand(body: () => Promise): Promise { try { return await body(); } finally { try { await tspmIpcClient.disconnect(); } catch { // Ignore disconnect errors } } }