diff --git a/scripts/src/hwlab-node-web-observe-runner-source.ts b/scripts/src/hwlab-node-web-observe-runner-source.ts index 474f73cd..9371f668 100644 --- a/scripts/src/hwlab-node-web-observe-runner-source.ts +++ b/scripts/src/hwlab-node-web-observe-runner-source.ts @@ -929,6 +929,12 @@ async function collectProviderCandidates() { return page.evaluate(() => { const rows = []; const seen = new Set(); + const isNavigationLabel = (value) => { + const label = String(value || "").replace(/\s+/gu, " ").trim().toLowerCase(); + if (!label) return false; + if (label === "api keys" || label === "kapi keys" || label === "profiles" || label === "rprofiles") return true; + return /^(?:api keys|profiles)$/iu.test(label.replace(/^[a-z]\s*/iu, "")); + }; const visible = (element) => { const rect = element.getBoundingClientRect(); const style = window.getComputedStyle(element); @@ -966,7 +972,7 @@ async function collectProviderCandidates() { const ariaLabel = String(element.getAttribute("aria-label") || ""); const testId = String(element.getAttribute("data-testid") || ""); const haystack = text + " " + ariaLabel + " " + testId; - if (isProviderNavigationLabel(haystack)) continue; + if (isNavigationLabel(haystack)) continue; if (!/provider|profile|model|模型|提供|codex|openai|deepseek|gpt|api|flash|spark|claude|gemini|moon/iu.test(haystack)) continue; push("visible-control", element, element.getAttribute("value") || "", text || ariaLabel || testId); }