atlasbot: expand hardware and entity detection

This commit is contained in:
Brad Stein 2026-01-27 19:10:02 -03:00
parent 9bf822ec36
commit 12fa7d02aa
2 changed files with 15 additions and 4 deletions

View File

@ -16,7 +16,7 @@ spec:
labels:
app: atlasbot
annotations:
checksum/atlasbot-configmap: manual-atlasbot-64
checksum/atlasbot-configmap: manual-atlasbot-65
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: "comms"
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"

View File

@ -197,6 +197,8 @@ _INSIGHT_HINT_WORDS = {
"favorite",
"favourite",
"trivia",
"stand out",
"stands out",
}
_OVERVIEW_HINT_WORDS = {
@ -213,8 +215,8 @@ _OLLAMA_LOCK = threading.Lock()
HARDWARE_HINTS = {
"amd64": ("amd64", "x86", "x86_64", "x86-64"),
"jetson": ("jetson",),
"rpi4": ("rpi4",),
"rpi5": ("rpi5",),
"rpi4": ("rpi4", "raspberry pi 4", "raspberry pi-4"),
"rpi5": ("rpi5", "raspberry pi 5", "raspberry pi-5"),
"rpi": ("rpi", "raspberry"),
"arm64": ("arm64", "aarch64"),
}
@ -559,7 +561,16 @@ def _detect_role_filters(q: str) -> set[str]:
return roles
def _detect_entity(q: str) -> str | None:
if "node" in q or "nodes" in q or "worker" in q or "hardware" in q or "architecture" in q or TITAN_NODE_RE.search(q):
if (
"node" in q
or "nodes" in q
or "worker" in q
or "hardware" in q
or "architecture" in q
or "machine" in q
or "machines" in q
or TITAN_NODE_RE.search(q)
):
return "node"
if "pod" in q or "pods" in q:
return "pod"