MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / formatHardwareSummary

Function formatHardwareSummary

src/setup/hardware-profile.ts:218–236  ·  view source on GitHub ↗
(p: HardwareProfile)

Source from the content-addressed store, hash-verified

216
217/** Pretty single-block summary for the wizard / `qx setup --check`. */
218export 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}

Callers 2

runSetupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected