atlasbot: prioritize hardware for subjective prompts

This commit is contained in:
Brad Stein 2026-01-27 18:56:14 -03:00
parent 69d121aa07
commit 8bd4d9fc7a
2 changed files with 9 additions and 7 deletions

View File

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

View File

@ -1707,12 +1707,14 @@ def _select_insight(
return candidate return candidate
return candidates[1] return candidates[1]
if prefer_keys: if prefer_keys:
for key, text, conf in candidates: for prefer in prefer_keys:
if key in prefer_keys and key not in used: for key, text, conf in candidates:
return key, text, conf if key == prefer and key not in used:
for key, text, conf in candidates: return key, text, conf
if key in prefer_keys: for prefer in prefer_keys:
return key, text, conf for key, text, conf in candidates:
if key == prefer:
return key, text, conf
if used: if used:
for candidate in candidates: for candidate in candidates:
if candidate[0] not in used: if candidate[0] not in used: