atlasbot: preserve response text with confidence

This commit is contained in:
Brad Stein 2026-01-27 12:47:28 -03:00
parent 3b1e74d278
commit 41b131c347
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ spec:
labels: labels:
app: atlasbot app: atlasbot
annotations: annotations:
checksum/atlasbot-configmap: manual-atlasbot-34 checksum/atlasbot-configmap: manual-atlasbot-35
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

@ -149,7 +149,7 @@ def _ensure_confidence(text: str) -> str:
match = CONFIDENCE_RE.search(line) match = CONFIDENCE_RE.search(line)
if match: if match:
level = match.group(1).lower() level = match.group(1).lower()
lines[idx] = f"Confidence: {level}" lines[idx] = CONFIDENCE_RE.sub(f"Confidence: {level}", line)
return "\n".join(lines) return "\n".join(lines)
lines.append("Confidence: medium") lines.append("Confidence: medium")
return "\n".join(lines) return "\n".join(lines)