import cfg from "../config/gemini.config.json"; export async function withTrace(name: string, fn: () => Promise) { const start = Date.now(); try { return await fn(); } finally { if (cfg.telemetry.enabled) { const ms = Date.now() - start; console.log(`[TRACE] ${name} ${ms}ms`); } } }