feat(group): 移除告警自動 AI 分析 — 老闆指示
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 7m3s
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 7m3s
告警發到群組只顯示卡片,不自動觸發 OpenClaw/NemoClaw 分析 老闆和 AI 可手動在群組討論告警內容 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1408,28 +1408,15 @@ class TelegramGateway:
|
||||
"""
|
||||
try:
|
||||
# 2026-04-03 ogt: 選項 C 區塊式格式(老闆指示)
|
||||
# 2026-04-03 ogt: 老闆指示移除自動 AI 分析,告警只發卡片
|
||||
risk_emoji = RISK_EMOJI_MAP.get(risk_level.lower(), "⚪")
|
||||
summary = (
|
||||
f"【{risk_emoji} {risk_level.upper()}】{html.escape(resource_name[:40])}\n\n"
|
||||
f"📋 <code>{html.escape(approval_id)}</code>\n"
|
||||
f"🔍 {html.escape(root_cause[:150])}\n"
|
||||
f"🔧 {html.escape(suggested_action[:80])}\n\n"
|
||||
f"─ OpenClaw 與 NemoClaw 分析中 ─"
|
||||
f"🔧 {html.escape(suggested_action[:80])}"
|
||||
)
|
||||
group_result = await self.send_to_group(text=summary)
|
||||
group_msg_id = (
|
||||
group_result.get("result", {}).get("message_id")
|
||||
if group_result.get("ok")
|
||||
else None
|
||||
)
|
||||
|
||||
if group_msg_id:
|
||||
await self.trigger_group_ai_discussion(
|
||||
alert_message_id=group_msg_id,
|
||||
alert_summary=f"[{risk_level.upper()}] 資源: {resource_name}\n根因: {root_cause}\n建議: {suggested_action}",
|
||||
)
|
||||
else:
|
||||
logger.warning("send_approval_card_to_group_no_msg_id", approval_id=approval_id)
|
||||
await self.send_to_group(text=summary)
|
||||
except Exception as e:
|
||||
logger.error("send_approval_card_to_group_failed", error=str(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user