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:
app: atlasbot
annotations:
checksum/atlasbot-configmap: manual-atlasbot-59
checksum/atlasbot-configmap: manual-atlasbot-60
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

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