fix: allow hottest facts with class queries

This commit is contained in:
Brad Stein 2026-02-02 11:35:45 -03:00
parent 774fb24296
commit 789fbfa5f2

View File

@ -1195,8 +1195,6 @@ def _extract_hottest_facts(lines: list[str], question: str) -> list[str]:
if not lines:
return []
lowered = question.lower()
if "hardware" in lowered or "class" in lowered:
return []
if not any(
term in lowered
for term in ("hottest", "hot", "highest", "lowest", "most", "top", "peak", "loaded", "load", "busy")
@ -1245,7 +1243,7 @@ def _extract_hardware_usage_facts(lines: list[str], question: str) -> list[str]:
lowered = question.lower()
if "hardware" not in lowered:
return []
if not any(term in lowered for term in ("average", "avg", "mean", "load", "cpu", "ram", "memory")):
if not any(term in lowered for term in ("average", "avg", "mean", "per hardware", "by hardware", "typical")):
return []
avg_line = None
top_line = None