From da68d4395a35d58d673da773926b7b8925c6a677 Mon Sep 17 00:00:00 2001 From: Jay Zeng Date: Thu, 21 May 2026 22:24:47 -0700 Subject: [PATCH] fix: use 'qmd collection list' for qmd detection 'qmd status' can trigger slow model/device probing (e.g. Vulkan fallback) that exceeds the 5s timeout on some systems, causing detectQmd() to return false and the install banner to appear even when qmd is installed and healthy. Switch to the lighter 'qmd collection list' probe and raise the timeout to 15s for headroom. Fixes #10 Co-Authored-By: Claude Opus 4.7 Signed-off-by: Jay Zeng --- index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index fbd3f36..5b68000 100644 --- a/index.ts +++ b/index.ts @@ -693,8 +693,10 @@ export async function setupQmdCollection(): Promise { export function detectQmd(): Promise { return new Promise((resolve) => { - // qmd doesn't reliably support --version; use a fast command that exits 0 when available. - execFileFn("qmd", ["status"], { timeout: 5_000 }, (err) => { + // `qmd status` can trigger slow model/device probing on some systems (e.g. Vulkan fallback), + // which may exceed short startup timeouts and produce false negatives. + // `qmd collection list` is much lighter and still validates the binary is callable. + execFileFn("qmd", ["collection", "list"], { timeout: 15_000 }, (err) => { resolve(!err); }); });