(p: HardwareProfile)
| 216 | |
| 217 | /** Pretty single-block summary for the wizard / `qx setup --check`. */ |
| 218 | export function formatHardwareSummary(p: HardwareProfile): string { |
| 219 | const osLabel = p.os === 'macos' ? `macOS${p.appleSilicon ? ` (${p.arch}, Apple Silicon)` : ` (${p.arch})`}` |
| 220 | : p.os === 'linux' ? `Linux (${p.arch})` |
| 221 | : p.os === 'windows' ? `Windows (${p.arch})` |
| 222 | : `${p.os} (${p.arch})`; |
| 223 | const diskLine = p.diskFreeGb !== null ? `${p.diskFreeGb} GB free` : 'unknown'; |
| 224 | const vramLine = p.gpu.vramGb !== null ? `${p.gpu.vramGb} GB` : 'unknown'; |
| 225 | const models = p.recommendedModels?.length ? p.recommendedModels.join(', ') : '(none)'; |
| 226 | return [ |
| 227 | ` OS: ${osLabel}`, |
| 228 | ` CPU: ${p.cpuLabel} (${p.cpuCores} cores)`, |
| 229 | ` RAM: ${p.ramGb} GB`, |
| 230 | ` GPU: ${p.gpu.label}${p.gpu.vramGb !== null ? ` (${vramLine})` : ''}`, |
| 231 | ` Disk: ${diskLine}`, |
| 232 | ``, |
| 233 | ` Recommended tier: ${p.tier}`, |
| 234 | ` Suggested local models: ${models}`, |
| 235 | ].join('\n'); |
| 236 | } |
no outgoing calls
no test coverage detected