local helper = jarvis.context.command_path .. "\\_sysinfo.ps1" local cmd = string.format('powershell -NoProfile -ExecutionPolicy Bypass -File "%s" -Topic all', helper) local res = jarvis.system.exec(cmd) local text = (res.stdout or ""):gsub("[\r\n]+$", "") if not res.success or text == "" then jarvis.log("error", "sysinfo all failed: " .. tostring(res.stderr)) return jarvis.cmd.error("Не получилось собрать состояние системы.") end jarvis.system.notify("Статус системы", text) jarvis.log("info", text) -- Multi-line output reads more naturally as a single sentence with commas -- between metrics, so TTS doesn't over-pause on linebreaks. local spoken = text:gsub("[\r\n]+", ", ") return jarvis.cmd.ok(spoken)