From f5ea0277f6c753a802327147171aeeac4aedf1cb Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 2 Feb 2026 13:55:02 -0300 Subject: [PATCH] atlasbot: answer hardware mix with snapshot --- atlasbot/engine/answerer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 326623e..0fc7917 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -661,6 +661,16 @@ class AnswerEngine: reply = f"From the latest snapshot: {target}={count} ({nodes})." else: reply = f"From the latest snapshot: {target}={count}." + if any(tok in lowered_q for tok in ("mix", "breakdown", "composition", "hardware mix", "hardware stack")) and any( + tok in lowered_q for tok in ("jetson", "rpi4", "rpi5", "amd64", "arm64", "hardware") + ): + hw_line = next((line for line in summary_lines if line.startswith("hardware:")), None) + hw_nodes_line = next((line for line in summary_lines if line.startswith("hardware_nodes:")), None) + if hw_line: + if hw_nodes_line: + reply = f"From the latest snapshot: {hw_line}; {hw_nodes_line}." + else: + reply = f"From the latest snapshot: {hw_line}." if _has_token(lowered_q, "io") and ("node" in lowered_q or "nodes" in lowered_q): io_facts = _extract_hottest_facts(summary_lines, lowered_q) io_line = next((fact for fact in io_facts if fact.startswith("hottest_io_node")), None)